Fred85
Posts: 13
Joined: Tue Sep 15, 2020 11:47 am

Re: Raspberry 4 + CAM LINK for Youtube Live

Tue Sep 22, 2020 10:14 am

Hello,

Thank you very much for your support 6by9.

I tried to put "yuv420p" but I have this :

Code: Select all

Input #0, alsa, from 'hw:2,0':
  Duration: N/A, start: 1600768340.856694, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x81a5f0] The driver changed the time per frame from 1/30 to 1/50
[video4linux2,v4l2 @ 0x81a5f0] Dequeued v4l2 buffer contains 1843200 bytes, but 1382400 were expected. Flags: 0x00012001.
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, bitrate: 552960 kb/s
    Stream #1:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 552960 kb/s, 50 fps, 50 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x81a5f0] Dequeued v4l2 buffer contains 1843200 bytes, but 1382400 were expected. Flags: 0x00012001.
/dev/video0: Invalid data found when processing input
[alsa @ 0x80d3d0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/77wj-s691-6xb5-b01t-aq5s':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720, q=2-31, 5000 kb/s, 50 fps, 1k tbn, 50 tbc
    Metadata:
      encoder         : Lavc58.35.100 flv
    Side data:
      cpb: bitrate max/min/avg: 0/0/5000000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.35.100 aac
Pushing this command :

Code: Select all

ffmpeg -ar 44100 -ac 2 -f alsa -i hw:2,0 -f v4l2 -pix_fmt yuyv422 -framerate 30 -video_size 1280x720 -itsoffset -5 -i /dev/video0 -copyinkf -codec:v flv1 -codec:a aac -ab 128k -b:v 5000k -g 10 -f flv rtmp://a.rtmp.youtube.com/live2/
I have this result : https://youtu.be/zlp16rNrYzk

Really better !

But not good for the moment. video is not fluid and sound is really cut.

Maybe another codec ? What do you think ?
Do I have to decrease resolution ?

Thank you !

Return to “Troubleshooting”