I'm trying to stream huge MP4 videos (2.5Go) on an icecast server. After playing a lot with ffmpeg options to get the best quality/speed encoding settings, I'm facing a strange issue.
If I launch my ffmpeg streaming and load the video in the browser I can see it, but if I try to join it after 30s, I just get a black screen with the bottom video player bar.
Is there somewhere we can see errors ? And where ? I don't really get if the error is coming from ffmpeg / icecast / my web browser ...
If somebody can give me a clue.
Here is my setup on ffmpeg :
./ffmpeg -i stream/my_video.mp4 \
-acodec libopus -b:a 64k \
-vcodec libvpx -b:v 500K -crf 25 -vf scale=640:360 -content_type video/webm \
-loop 365 \
icecast://source:Password@server:8000/live.webm
Update 2020 The link is down. Looking it up from the Internet archive. Basically GOP ratio is set with the -g option
. So give it a value of -g 5
for example to set the value to 5.
Looking at your settings I'd guess you're not setting a GOP ratio and thus the browser, or rather the codec used by it, doesn't get any key-frame to start from.
cf. https://plus.google.com/+icecast/posts/iPsLfVaJ95C
Yes, this makes things less efficient, but that's the price for being able to tune into a stream and getting to see a picture right away. ;-)