[FFmpeg-user] Trying to stream to rtmp from my rsp4 and a GoPro

Mike Soultanian mike at soultanian.com
Sun Feb 14 18:52:59 EET 2021


On 2/14/2021 3:27 AM, Carl Eugen Hoyos wrote:
> Please provide this command line including complete, uncut console
> output to allow us understanding what's going on:
> $ ffmpeg -ts abs -i /dev/video0 -f alsa -ac 2 -i hw:CARD=capture,DEV=0
>
Sure!  Here you go:

*pi at raspberrypi:~ $ ffmpeg -ts abs -i /dev/video0 -f alsa -ac 2 -i 
hw:CARD=capture,DEV=0*
ffmpeg version N-101069-g000b250 Copyright (c) 2000-2021 the FFmpeg 
developers
   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
   configuration: --prefix=/home/pi/ffmpeg_build 
--pkg-config-flags=--static 
--extra-cflags=-I/home/pi/ffmpeg_build/include 
--extra-ldflags=-L/home/pi/ffmpeg_build/lib --extra-libs='-lpthread -lm' 
--bindir=/home/pi/bin --enable-gpl --enable-gnutls --enable-libass 
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame 
--enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libvorbis 
--enable-libvpx --enable-libx264 --enable-libx265 --enable-omx 
--enable-omx-rpi --enable-nonfree
   libavutil      56. 65.100 / 56. 65.100
   libavcodec     58.122.100 / 58.122.100
   libavformat    58. 67.100 / 58. 67.100
   libavdevice    58. 11.103 / 58. 11.103
   libavfilter     7.106.100 /  7.106.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
   libpostproc    55.  8.100 / 55.  8.100
[video4linux2,v4l2 @ 0x2c75320] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x2c75320] Unknown timestamps
Input #0, video4linux2,v4l2, from '/dev/video0':
   Duration: N/A, start: 0.000000, bitrate: 442368 kb/s
   Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 
442368 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:CARD=capture,DEV=0':
   Duration: N/A, start: 1613320991.151065, bitrate: 1536 kb/s
   Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
At least one output file must be specified


And I'm not sure if you wanted it, but I figured I'd include the output 
if I specified a file (I hit "q" to stop the output because it kept 
going on and on):

*pi at raspberrypi:~ $ ffmpeg -ts abs -i /dev/video0 -f alsa -ac 2 -i 
hw:CARD=capture,DEV=0 -y Desktop/test.mp4 *
ffmpeg version N-101069-g000b250 Copyright (c) 2000-2021 the FFmpeg 
developers
   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
   configuration: --prefix=/home/pi/ffmpeg_build 
--pkg-config-flags=--static 
--extra-cflags=-I/home/pi/ffmpeg_build/include 
--extra-ldflags=-L/home/pi/ffmpeg_build/lib --extra-libs='-lpthread -lm' 
--bindir=/home/pi/bin --enable-gpl --enable-gnutls --enable-libass 
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame 
--enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libvorbis 
--enable-libvpx --enable-libx264 --enable-libx265 --enable-omx 
--enable-omx-rpi --enable-nonfree
   libavutil      56. 65.100 / 56. 65.100
   libavcodec     58.122.100 / 58.122.100
   libavformat    58. 67.100 / 58. 67.100
   libavdevice    58. 11.103 / 58. 11.103
   libavfilter     7.106.100 /  7.106.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
   libpostproc    55.  8.100 / 55.  8.100
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
Input #0, video4linux2,v4l2, from '/dev/video0':
   Duration: N/A, start: 0.000000, bitrate: 442368 kb/s
   Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 
442368 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:CARD=capture,DEV=0':
   Duration: N/A, start: 1613321366.545618, bitrate: 1536 kb/s
   Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
   Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Dequeued v4l2 buffer contains corrupted 
data (0 bytes).
[video4linux2,v4l2 @ 0x3225370] Unknown timestamps
[video4linux2,v4l2 @ 0x3225370] Detected monotonic timestamps, converting
DTS 1613321372039847, next:33333 st:0 invalid dropping
PTS 1613321372039847, next:33333 invalid dropping st:0
[libx264 @ 0x323a770] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x323a770] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0x323a770] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 
2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 
deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf 
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 
aq=1:1.00
[alsa @ 0x32280f0] Thread message queue blocking; consider raising the 
thread_queue_size option (current value: 8)
[alsa @ 0x32280f0] ALSA buffer xrun.
Output #0, mp4, to 'Desktop/test.mp4':
   Metadata:
     encoder         : Lavf58.67.100
   Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p(tv, 
progressive), 1280x720, q=2-31, 30 fps, 15360 tbn
     Metadata:
       encoder         : Lavc58.122.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
   Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, 
fltp, 128 kb/s
     Metadata:
       encoder         : Lavc58.122.100 aac
DTS 1613321372073177, next:66666 st:0 invalid dropping0.00 bitrate=N/A 
speed=   0x
PTS 1613321372073177, next:66666 invalid dropping st:0
DTS 1613321372106513, next:99999 st:0 invalid dropping
PTS 1613321372106513, next:99999 invalid dropping st:0
DTS 1613321372139842, next:133332 st:0 invalid dropping
PTS 1613321372139842, next:133332 invalid dropping st:0
DTS 1613321372173211, next:166665 st:0 invalid dropping
PTS 1613321372173211, next:166665 invalid dropping st:0
DTS 1613321372206518, next:199998 st:0 invalid dropping
PTS 1613321372206518, next:199998 invalid dropping st:0
DTS 1613321372239838, next:233331 st:0 invalid dropping
PTS 1613321372239838, next:233331 invalid dropping st:0
DTS 1613321372743443, next:266664 st:0 invalid dropping.00 bitrate=N/A 
speed=   0x
PTS 1613321372743443, next:266664 invalid dropping st:0
DTS 1613321372776774, next:299997 st:0 invalid dropping
PTS 1613321372776774, next:299997 invalid dropping st:0
DTS 1613321372810107, next:333330 st:0 invalid dropping
PTS 1613321372810107, next:333330 invalid dropping st:0
DTS 1613321372843443, next:366663 st:0 invalid dropping
PTS 1613321372843443, next:366663 invalid dropping st:0
DTS 1613321372876794, next:399996 st:0 invalid dropping
PTS 1613321372876794, next:399996 invalid dropping st:0
DTS 1613321372910108, next:433329 st:0 invalid dropping
PTS 1613321372910108, next:433329 invalid dropping st:0
DTS 1613321372943447, next:466662 st:0 invalid dropping
PTS 1613321372943447, next:466662 invalid dropping st:0
DTS 1613321372976767, next:499995 st:0 invalid dropping
PTS 1613321372976767, next:499995 invalid dropping st:0
DTS 1613321373010104, next:533328 st:0 invalid dropping
PTS 1613321373010104, next:533328 invalid dropping st:0
DTS 1613321373043432, next:566661 st:0 invalid dropping
PTS 1613321373043432, next:566661 invalid dropping st:0
DTS 1613321373076764, next:599994 st:0 invalid dropping
PTS 1613321373076764, next:599994 invalid dropping st:0
DTS 1613321373110095, next:633327 st:0 invalid dropping
PTS 1613321373110095, next:633327 invalid dropping st:0
DTS 1613321373143428, next:666660 st:0 invalid dropping.00 bitrate=N/A 
speed=   0x
PTS 1613321373143428, next:666660 invalid dropping st:0
DTS 1613321373176757, next:699993 st:0 invalid dropping
PTS 1613321373176757, next:699993 invalid dropping st:0
DTS 1613321373210094, next:733326 st:0 invalid dropping
PTS 1613321373210094, next:733326 invalid dropping st:0
DTS 1613321373243433, next:766659 st:0 invalid dropping
PTS 1613321373243433, next:766659 invalid dropping st:0
DTS 1613321373276759, next:799992 st:0 invalid dropping
PTS 1613321373276759, next:799992 invalid dropping st:0
DTS 1613321373310097, next:833325 st:0 invalid dropping
PTS 1613321373310097, next:833325 invalid dropping st:0
DTS 1613321373343424, next:866658 st:0 invalid dropping
PTS 1613321373343424, next:866658 invalid dropping st:0
DTS 1613321373376771, next:899991 st:0 invalid dropping
PTS 1613321373376771, next:899991 invalid dropping st:0
DTS 1613321373410080, next:933324 st:0 invalid dropping
PTS 1613321373410080, next:933324 invalid dropping st:0
DTS 1613321373443421, next:966657 st:0 invalid dropping
PTS 1613321373443421, next:966657 invalid dropping st:0
DTS 1613321373476769, next:999990 st:0 invalid dropping
PTS 1613321373476769, next:999990 invalid dropping st:0
DTS 1613321373510076, next:1033323 st:0 invalid dropping
PTS 1613321373510076, next:1033323 invalid dropping st:0
DTS 1613321373543554, next:1066656 st:0 invalid dropping
PTS 1613321373543554, next:1066656 invalid dropping st:0
DTS 1613321373576761, next:1099989 st:0 invalid dropping
PTS 1613321373576761, next:1099989 invalid dropping st:0
DTS 1613321373610071, next:1133322 st:0 invalid dropping00 bitrate=N/A 
speed=   0x
PTS 1613321373610071, next:1133322 invalid dropping st:0
DTS 1613321373643411, next:1166655 st:0 invalid dropping
PTS 1613321373643411, next:1166655 invalid dropping st:0
DTS 1613321373676739, next:1199988 st:0 invalid dropping
PTS 1613321373676739, next:1199988 invalid dropping st:0
DTS 1613321373710067, next:1233321 st:0 invalid dropping
PTS 1613321373710067, next:1233321 invalid dropping st:0
DTS 1613321373743404, next:1266654 st:0 invalid dropping
PTS 1613321373743404, next:1266654 invalid dropping st:0
DTS 1613321373776731, next:1299987 st:0 invalid dropping
PTS 1613321373776731, next:1299987 invalid dropping st:0
DTS 1613321373810065, next:1333320 st:0 invalid dropping
PTS 1613321373810065, next:1333320 invalid dropping st:0
DTS 1613321373843401, next:1366653 st:0 invalid dropping
PTS 1613321373843401, next:1366653 invalid dropping st:0
DTS 1613321373876735, next:1399986 st:0 invalid dropping
PTS 1613321373876735, next:1399986 invalid dropping st:0
DTS 1613321373910059, next:1433319 st:0 invalid dropping
PTS 1613321373910059, next:1433319 invalid dropping st:0
DTS 1613321373943402, next:1466652 st:0 invalid dropping
PTS 1613321373943402, next:1466652 invalid dropping st:0
DTS 1613321373976725, next:1499985 st:0 invalid dropping
PTS 1613321373976725, next:1499985 invalid dropping st:0
DTS 1613321374010053, next:1533318 st:0 invalid dropping
PTS 1613321374010053, next:1533318 invalid dropping st:0
[video4linux2,v4l2 @ 0x3225370] Thread message queue blocking; consider 
raising the thread_queue_size option (current value: 8)
DTS 1613321374043382, next:1566651 st:0 invalid dropping
PTS 1613321374043382, next:1566651 invalid dropping st:0
DTS 1613321374076722, next:1599984 st:0 invalid dropping00 bitrate=N/A 
speed=   0x
PTS 1613321374076722, next:1599984 invalid dropping st:0
DTS 1613321374110045, next:1633317 st:0 invalid dropping
PTS 1613321374110045, next:1633317 invalid dropping st:0
DTS 1613321374143376, next:1666650 st:0 invalid dropping
PTS 1613321374143376, next:1666650 invalid dropping st:0
DTS 1613321374176774, next:1699983 st:0 invalid dropping
PTS 1613321374176774, next:1699983 invalid dropping st:0
DTS 1613321374210039, next:1733316 st:0 invalid dropping
PTS 1613321374210039, next:1733316 invalid dropping st:0
DTS 1613321374243371, next:1766649 st:0 invalid dropping
PTS 1613321374243371, next:1766649 invalid dropping st:0
DTS 1613321374276712, next:1799982 st:0 invalid dropping
PTS 1613321374276712, next:1799982 invalid dropping st:0
DTS 1613321374310034, next:1833315 st:0 invalid dropping
PTS 1613321374310034, next:1833315 invalid dropping st:0
DTS 1613321374343367, next:1866648 st:0 invalid dropping
PTS 1613321374343367, next:1866648 invalid dropping st:0
DTS 1613321374376697, next:1899981 st:0 invalid dropping
PTS 1613321374376697, next:1899981 invalid dropping st:0
DTS 1613321374410029, next:1933314 st:0 invalid dropping
PTS 1613321374410029, next:1933314 invalid dropping st:0
frame=   58 fps=5.5 q=-1.0 Lsize=     214kB time=00:00:05.63 bitrate= 
310.2kbits/s speed=0.532x
video:210kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 1.022506%
[libx264 @ 0x323a770] frame I:2     Avg QP:11.64  size: 37356
[libx264 @ 0x323a770] frame P:17    Avg QP:21.50  size:  5701
[libx264 @ 0x323a770] frame B:39    Avg QP:25.34  size:  1096
[libx264 @ 0x323a770] consecutive B-frames:  6.9% 10.3%  0.0% 82.8%
[libx264 @ 0x323a770] mb I  I16..4: 68.5% 18.6% 12.8%
[libx264 @ 0x323a770] mb P  I16..4:  2.9%  4.2%  0.4%  P16..4: 15.3%  
5.1%  1.4%  0.0%  0.0%    skip:70.8%
[libx264 @ 0x323a770] mb B  I16..4:  0.2%  0.2%  0.0%  B16..8: 11.6%  
1.0%  0.1%  direct: 0.3%  skip:86.6%  L0:38.7% L1:57.5% BI: 3.8%
[libx264 @ 0x323a770] 8x8 transform intra:33.6% inter:83.0%
[libx264 @ 0x323a770] coded y,uvDC,uvAC intra: 23.8% 43.6% 6.4% inter: 
2.7% 4.8% 0.0%
[libx264 @ 0x323a770] i16 v,h,dc,p: 59% 20%  2% 19%
[libx264 @ 0x323a770] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 19% 7%  8%  
7%  7%  6%  7%
[libx264 @ 0x323a770] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 30% 16% 4%  4%  
4%  5%  4%  5%
[libx264 @ 0x323a770] i8c dc,h,v,p: 62% 17% 15%  6%
[libx264 @ 0x323a770] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x323a770] ref P L0: 65.8% 16.3% 14.8%  3.1%
[libx264 @ 0x323a770] ref B L0: 94.2%  5.1%  0.7%
[libx264 @ 0x323a770] ref B L1: 97.9%  2.1%
[libx264 @ 0x323a770] kb/s:887.12
[aac @ 0x3240070] Qavg: 147.016


Thanks!

Mike



More information about the ffmpeg-user mailing list