YouTube live says not receiving data
Asked Answered
S

2

6

So, I'm using ffmpeg. I can stream videos to YouTube live I've downloaded from the internet successfully using this command:

ffmpeg -re -i "C:\video.flv" -c:v libx264 -preset slow -crf 18 -c:a copy -f flv "rtmp://a.rtmp.youtube.com/live2/xyz"

When I try to stream a video that's been recorded from a specific device, that is also flv and with same command, it's not working. FFMpeg says it's transmitting, no errors there. In the live dashboard on YouTube I get a green "Starting" briefly but then it goes grey to say it's not receiving data. The only difference is the actual flv files.

Any idea why YouTube Live would say it's not receiving any data instead of giving me an error, when it clearly is receiving it because it works with other video files? Thanks

Sloth answered 14/8, 2016 at 17:28 Comment(0)
S
16

Well for anyone else that may come across this, my problem was that my video did not have audio. Not sure why that should matter, but putting a silent audio track over the video fixed my issue.

Sloth answered 15/8, 2016 at 12:32 Comment(1)
You can add silent audio with the anullsrc audio filter.Hygrometric
B
3

Yes, audio track is needed, thanks Steve.

This is my ffmpeg command (for instance) with audio null source:

ffmpeg -f lavfi -i anullsrc=r=16000:cl=mono \
   -f v4l2 -r 10 -i /dev/video1 -c:v libx264 -pix_fmt yuv420p -preset ultrafast -g 20 -b:v 2500k \
   -c:a aac -ar 44100 -threads 0 -bufsize 512k -strict experimental \
   -f flv rtmp://a.rtmp.youtube.com/live2/$CHANNELID
Barkentine answered 17/11, 2018 at 17:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.