Hi, this is how you can start livestreaming on youtube with notepad script.
Go to specific video chapters for details
Code # 1 : For streaming video you already have downloaded
🔴
@echo off
REM Replace with the full path to your video file
set video_file="C:\path\to\your\video.mp4"
REM Get your YouTube stream key from your YouTube Studio dashboard
set stream_key=YOUR_STREAM_KEY
REM Start the livestream with looping enabled
ffmpeg -re -stream_loop -1 -i "%video_file%" -vcodec libx264 -preset veryfast -tune zerolatency -b:v 4000k -maxrate 4000k -bufsize 4000k -pix_fmt yuv420p -g 50 -f flv "rtmp://a.rtmp.youtube.com/live2/%stream_key%"
Code # 2 : For Streaming a video by copying link
🔴
@echo off
REM Replace with the YouTube video URL
set video_url=null
REM Get your YouTube stream key from your YouTube Studio dashboard
set stream_key=YOUR_STREAM_KEY
REM Download the YouTube video using youtube-dl
youtube-dl -f best -o "temp.mp4" "%video_url%"
REM Start the livestream with looping enabled
ffmpeg -re -stream_loop -1 -i "temp.mp4" -vcodec libx264 -preset veryfast -tune zerolatency -b:v 4000k -maxrate 4000k -bufsize 4000k -pix_fmt yuv420p -g 50 -f flv "rtmp://a.rtmp.youtube.com/live2/%stream_key%"
REM Delete the temporary video file
del "temp.mp4"
Leave Your Questions in the Comments!
Follow me here :
facebook.com/ilyas626
Join Our Community :
facebook.com/groups/skillsexc
6 Comments