Page 1 of 1

Trying to push RTMP stream to youtube, but youtube never display it.

Posted: 22 Mar 2020 08:41
by Seiken
I'm trying to push a webcam to YouTube Live with cvlc and RTMP, but YouTube never received the data.

First, this line works fine for flv streaming. Thus it generated working video data.

Code: Select all

cvlc v4l2:///dev/video0:width=1280:height=720:chroma=h264:input-slave=alsa://hw:C920,0:v4l2-standard=1:fps=30 --sout "#standard{mux=ffmpeg{mux=flv},access=http,dst=:8080/stream.flv"

Then, I tried push RTMP to YouTube with this line, but YouTube keeps black and never received any data. Also I didn't got any warning or error message in my console.

Code: Select all

cvlc -vvv v4l2:///dev/video0:width=1280:height=720:chroma=h264:input-slave=alsa://hw:C920,0:v4l2-standard=1:fps=30 --live-caching=2500 --sout "#std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx}"

Then, I changed few characters of the YouTube serial number in the last command, and it shows following error in my console, which make me believed that the previous command was actual pushed data to YouTube successfully but YouTube never accepted it for some reason.

Code: Select all

[rtmp @ 0x7fd6a0050800] Creating stream... [rtmp @ 0x7fd6a0050800] Sending publish command for 'xxxx-xxxx-xxxx-XXXX' [00007fd6a0002740] avio access out error: Failed to open rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-XXXX [00007fd6a0002740] main access out debug: no sout access modules matched [00007fd6a0001300] stream_out_standard stream out error: no suitable sout access module for `rtmp/ffmpeg{mux=flv}://rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-XXXX' [00007fd6a0001300] main stream out debug: no sout stream modules matched [00007fd6a0001300] main stream out debug: destroying chain... (name=(null)) [00007fd6a0001300] main stream out debug: destroying chain done [00007fd6a0000e80] main stream output error: stream chain failed for `std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-XXXX}' [00007fd6a8000c40] main input error: cannot start stream output instance, aborting [000055924e0e6500] main playlist debug: dead input [000055924e0e6500] main playlist debug: changing item without a request (current 0/1) [000055924e0e6500] main playlist debug: nothing to play

Now following is my webcam setting displayed with v4l2-ctl command.

Code: Select all

Video input : 0 (Camera 1: ok) Format Video Capture: Width/Height : 1280/720 Pixel Format : 'H264' (H.264) Field : None Bytes per Line : 2560 Size Image : 1843200 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) Flags : Crop Capability Video Capture: Bounds : Left 0, Top 0, Width 1280, Height 720 Default : Left 0, Top 0, Width 1280, Height 720 Pixel Aspect: 1/1 Selection: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags: Selection: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags: Streaming Parameters Video Capture: Capabilities : timeperframe Frames per second: 30.000 (30/1) Read buffers : 0

Any suggestion for how could I resolve this problem?

Re: Trying to push RTMP stream to youtube, but youtube never display it.

Posted: 19 Jun 2020 18:30
by Jean-Baptiste Kempf
Try to use avio://rtmp://