scivision / PyLivestream

Pure Python FFmpeg-based live video / audio streaming to YouTube, Facebook, Periscope, Twitch, and more
Apache License 2.0
707 stars 156 forks source link

No errors, not working #62

Closed samdev-7 closed 1 year ago

samdev-7 commented 3 years ago

Describe the bug My code

import pylivestream.api as stream
stream.stream_file(ini_file="config.ini", video_file="video.mp4", websites=["youtube"])

Output:

Press Enter to go live on ['youtube'],looping file video.mp4
Or Ctrl C to abort.

 ffmpeg -loglevel error -re -i video.mp4 -codec:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 20000k -g 120.0 -codec:a aac -b:a 128k -ar 44100 -m
axrate 20000k -bufsize 10000k -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<private key>

Then nothing happens... System Parameters

scivision commented 3 years ago

Note: please refresh/change your YouTube Live stream id as pasting it here means anyone can copy your key and stream anything on your Youtube Live (!)

It could be that the YouTube Live stream key was not correct. Please try copy and pasting that FFmpeg command into your Terminal and see what results. That's in effect the same thing PyLivestream does

scivision commented 3 years ago

If the stream key is not correct, there will be no errors. YouTube or other service provider just silently discards your RTMP packets from FFmpeg, so FFmpeg doesn't know something is wrong, and so neither does PyLivestream.

samdev-7 commented 3 years ago

I confirm that my stream key is correct, i tested the same key with pure ffmpeg and it works.