Skip to content

Commit 59b3861

Browse files
committed
v2.0.0
1 parent 356b6c8 commit 59b3861

8 files changed

+957
-15
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Itz Random
3+
Copyright (c) 2024-2025 Itz Random
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the following conditions:
66

README.md

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<center><img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200&section=header&text=Live%20Stream%2024/7&fontSize=80&fontAlignY=35&animation=twinkling&fontColor=gradient" /></center>
22

3-
Are you a content creator looking to engage with your audience around the clock? Introducing our groundbreaking code that makes 24/7 YouTube livestreaming a breeze!
3+
Are you a content creator looking to engage with your audience around the clock? Introducing our groundbreaking code that makes 24/7 livestreaming a breeze across multiple platforms!
44

55
## Key Features:
66

@@ -14,17 +14,34 @@ Are you a content creator looking to engage with your audience around the clock?
1414

1515
5. **Resource Efficient:** Our code is designed to be resource-friendly, so it won't strain your hardware or bandwidth. Livestream 24/7 worry-free.
1616

17-
6. **YouTube Integration:** Easily connect your YouTube channel to the code, and your livestream will be broadcasted directly to your subscribers.
17+
6. **Multi-Platform Integration:** Easily connect the code to your preferred streaming platform (YouTube, Twitch, Facebook Live, DLive, Trovo, LinkedIn Live, and any other platform that supports RTMP), and your livestream will be broadcasted directly to your audience on multiple platforms simultaneously.
1818

19-
## Video Tutorial:
19+
## Customization:
20+
The following elements are customizable to fit your needs:
2021

21-
https://youtu.be/fLHlGo25BcE
22+
1. **Video Source:** set any video you want to stream.
23+
24+
2. **Resolution:** Set video resolution of your choice.
25+
26+
3. **Frames per Second:** Set the desired FPS (30, 50, 60).
27+
28+
4. **Bitrate:** Adjust video and audio bitrates for desired quality.
29+
30+
5. **Audio Channels:** Mono or Stereo audio options.
2231

23-
## Repl.it Project
32+
6. **Sample Rate:** Select the sample rate for audio.
2433

25-
https://replit.com/@CodingisLovexD/Live-on-Youtube
34+
7. **Thread Count:** Set the number of threads for processing based on your CPU core count.
35+
36+
8. **RTMP URL:** Customize the streaming destination URL (for services like YouTube).
37+
38+
To apply these changes, simply edit the `live.sh` file and adjust the parameters to your preferences.
39+
40+
## Video Tutorial:
41+
42+
https://youtu.be/fLHlGo25BcE
2643

27-
With our code, the world becomes your stage, and your audience can tune in whenever they want, day or night. Elevate your YouTube channel to the next level with 24/7 livestreaming. Get started today and watch your content reach new heights!
44+
With our code, the world becomes your stage, and your audience can tune in whenever they want, day or night. Elevate your online presence to the next level with 24/7 livestreaming across multiple platforms. Get started today and watch your content reach new heights!
2845

2946
## Support
3047

filelist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
file '/workspaces/Livestream-24-7/songs/Polvo Rodante.mp3'

live.sh

+54-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
1-
ffmpeg -stream_loop -1 -re -i **VIDEO FILE NAME** -stream_loop -1 -re -i **AUDIO FILE MP3 LINK** \
2-
-vcodec libx264 -preset veryfast -profile:v high -pix_fmt yuv420p -r 60 -g 60 -keyint_min 60 \
3-
-b:v 10000k -maxrate 11000k -bufsize 15000k -c:a aac -b:a 128k -ar 48000 -ac 2 -movflags +faststart \
4-
-tune zerolatency -vf "scale=1920:1080" \
5-
-f flv rtmp://a.rtmp.youtube.com/live2/*Stream Key* \
6-
-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 2 -y
1+
#!/bin/bash
2+
3+
file_list="filelist.txt"
4+
rm -f "$file_list"
5+
for f in songs/*.mp3; do
6+
echo "file '$PWD/$f'" >> "$file_list"
7+
done
8+
9+
video_file="video.mp4" # Name of your video file
10+
quality="854:480" # Set video resolution (e.g., 1280:720 for 720p, 1920:1080 for 1080p, 3840:2160 for 4K)
11+
# Resolution Options:
12+
# 480p -> "854:480" (Low quality, for small screens or low bandwidth)
13+
# 720p -> "1280:720" (Standard HD, good for most purposes)
14+
# 1080p -> "1920:1080" (Full HD, widely used for higher quality)
15+
# 1440p -> "2560:1440" (Quad HD, better quality than Full HD)
16+
# 4K -> "3840:2160" (Ultra HD, very high quality for large displays)
17+
fps=30 # Set frames per second (e.g., 30, 50, 60)
18+
# Recommended: 30 for standard, 50 or 60 for smooth motion
19+
bitrate="1500" # Set video bitrate (e.g., 1500k, 5000k, 10000k)
20+
# Video Bitrate Recommendations:
21+
# 480p -> 1500k
22+
# 720p -> 2500k-3500k
23+
# 1080p -> 5000k-10000k
24+
# 1440p -> 10000k-15000k
25+
# 4K -> 20000k-50000k or higher for ultra-high quality
26+
audio_bitrate="320k" # Set audio bitrate (e.g., 64k, 128k, 320k)
27+
# Audio Bitrate Recommendations:
28+
# 64k -> Low quality audio (for voice streams, e.g., podcasts)
29+
# 128k -> Good audio quality (stereo, standard quality)
30+
# 320k -> High quality audio (for music, good fidelity)
31+
audio_channels=2 # Set audio channels (1 for mono, 2 for stereo)
32+
# Audio Channels:
33+
# 1 -> Mono (single channel, lower quality)
34+
# 2 -> Stereo (dual channel, standard for most streams)
35+
sample_rate=44100 # Set audio sample rate (e.g., 44100, 48000)
36+
# Recommended: 44100 for most use cases, 48000 for professional audio
37+
threads=4 # Number of threads to use (depends on CPU cores)
38+
# Recommended: Match your CPU core count
39+
stream_url="rtmp://a.rtmp.youtube.com/live2/sch2-1qmh-zgam-x7za-4z9c" # Streaming destination URL
40+
# Replace with your platform's RTMP URL and stream key
41+
42+
43+
# FFmpeg Command
44+
ffmpeg -stream_loop -1 -re -i "$video_file" -f concat -safe 0 -i "$file_list" \
45+
-vcodec libx264 -preset ultrafast -pix_fmt yuv420p -r "$fps" -g "$((fps * 2))" -keyint_min "$((fps * 2))" \
46+
-b:v "$bitrate"k -maxrate "$bitrate"k -bufsize "$((2 * bitrate))k" \
47+
-c:a aac -b:a "$audio_bitrate" -ar "$sample_rate" -ac "$audio_channels" -movflags +faststart \
48+
-vf "scale=$quality" \
49+
-f flv "$stream_url" \
50+
-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 2 -threads "$threads" -y
51+
52+
53+
54+
rm -f "$file_list"

0 commit comments

Comments
 (0)