[FFmpeg-trac] #4030(avdevice:new): V4L2 recording results in invalid data & buffer still owned errors
FFmpeg
trac at avcodec.org
Thu Oct 16 07:18:05 CEST 2014
#4030: V4L2 recording results in invalid data & buffer still owned errors
-------------------------------------+------------------------------------
Reporter: thender | Owner:
Type: defect | Status: new
Priority: normal | Component: avdevice
Version: unspecified | Resolution:
Keywords: v4l2 | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+------------------------------------
Comment (by thender):
So I compiled the latest ffmpeg from git repository, and turned off the
sound recording via alsa/pulse, and here is what I get. As you can see I
have to run the command several times before it works, it is totally
random whether I will get a recording or an error. This is better than
before, usually I have to run it 20-40 times before it works. Usually this
isn't an issue but since I am using parallel to record two devices at once
it means I have to be lucky enough to not get this error on two separate
capture devices, so it takes 100+ tries to get it working.
$ ffmpeg -f v4l2 -framerate 30 -s 1920x1080 -i /dev/video1 -c:v libx264
-preset ultrafast -qp 20 ffmpegtest.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 15 2014 13:52:31 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --enable-version3 --enable-
indev=v4l2 --enable-outdev=v4l2 --enable-bzlib --enable-hardcoded-tables
--enable-iconv --enable-network --enable-ffplay --enable-vaapi --enable-
zlib --enable-libvo-aacenc --enable-libmp3lame --enable-libfaac --enable-
libtheora --enable-libwavpack --enable-libx264 --enable-libxvid --enable-
opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --enable-frei0r
--enable-libfreetype --enable-libopus --enable-libspeex --enable-libvorbis
--enable-avx --enable-avx2 --enable-fma3 --enable-fma4 --enable-mmxext
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-nonfree
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 7.100 / 56. 7.100
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.106 / 5. 1.106
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[video4linux2,v4l2 @ 0x1584f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, bitrate: 995328 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x15876a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x15876a0] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 0x15876a0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20
ip_ratio=1.40 aq=0
Output #0, matroska, to 'ffmpegtest.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p,
1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x1584f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
/dev/video1: Invalid data found when processing input
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
louis at portablebauer ~/Videos/testing $ rm *mkv && ffmpeg -f v4l2
-framerate 30 -s 1920x1080 -i /dev/video1 -c:v libx264 -preset ultrafast
-qp 20 ffmpegtest.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 15 2014 13:52:31 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --enable-version3 --enable-
indev=v4l2 --enable-outdev=v4l2 --enable-bzlib --enable-hardcoded-tables
--enable-iconv --enable-network --enable-ffplay --enable-vaapi --enable-
zlib --enable-libvo-aacenc --enable-libmp3lame --enable-libfaac --enable-
libtheora --enable-libwavpack --enable-libx264 --enable-libxvid --enable-
opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --enable-frei0r
--enable-libfreetype --enable-libopus --enable-libspeex --enable-libvorbis
--enable-avx --enable-avx2 --enable-fma3 --enable-fma4 --enable-mmxext
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-nonfree
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 7.100 / 56. 7.100
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.106 / 5. 1.106
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[video4linux2,v4l2 @ 0xcacf80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, bitrate: 995328 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xcaf6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0xcaf6a0] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 0xcaf6a0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20
ip_ratio=1.40 aq=0
Output #0, matroska, to 'ffmpegtest.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p,
1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0xcacf80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
/dev/video1: Invalid data found when processing input
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
louis at portablebauer ~/Videos/testing $ rm *mkv && ffmpeg -f v4l2
-framerate 30 -s 1920x1080 -i /dev/video1 -c:v libx264 -preset ultrafast
-qp 20 ffmpegtest.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 15 2014 13:52:31 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --enable-version3 --enable-
indev=v4l2 --enable-outdev=v4l2 --enable-bzlib --enable-hardcoded-tables
--enable-iconv --enable-network --enable-ffplay --enable-vaapi --enable-
zlib --enable-libvo-aacenc --enable-libmp3lame --enable-libfaac --enable-
libtheora --enable-libwavpack --enable-libx264 --enable-libxvid --enable-
opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --enable-frei0r
--enable-libfreetype --enable-libopus --enable-libspeex --enable-libvorbis
--enable-avx --enable-avx2 --enable-fma3 --enable-fma4 --enable-mmxext
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-nonfree
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 7.100 / 56. 7.100
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.106 / 5. 1.106
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[video4linux2,v4l2 @ 0x14f4f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, bitrate: 995328 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x14f76a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x14f76a0] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 0x14f76a0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20
ip_ratio=1.40 aq=0
Output #0, matroska, to 'ffmpegtest.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p,
1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x14f4f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
/dev/video1: Invalid data found when processing input
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
louis at portablebauer ~/Videos/testing $ rm *mkv && ffmpeg -f v4l2
-framerate 30 -s 1920x1080 -i /dev/video1 -c:v libx264 -preset ultrafast
-qp 20 ffmpegtest.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 15 2014 13:52:31 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --enable-version3 --enable-
indev=v4l2 --enable-outdev=v4l2 --enable-bzlib --enable-hardcoded-tables
--enable-iconv --enable-network --enable-ffplay --enable-vaapi --enable-
zlib --enable-libvo-aacenc --enable-libmp3lame --enable-libfaac --enable-
libtheora --enable-libwavpack --enable-libx264 --enable-libxvid --enable-
opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --enable-frei0r
--enable-libfreetype --enable-libopus --enable-libspeex --enable-libvorbis
--enable-avx --enable-avx2 --enable-fma3 --enable-fma4 --enable-mmxext
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-nonfree
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 7.100 / 56. 7.100
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.106 / 5. 1.106
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 35107.096095, bitrate: 995328 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x1d55960] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x1d55960] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 0x1d55960] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20
ip_ratio=1.40 aq=0
Output #0, matroska, to 'ffmpegtest.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p,
1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 668 fps= 30 q=-1.0 Lsize= 67100kB time=00:00:22.26
bitrate=24685.9kbits/s dup=0 drop=665
video:67094kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.009107%
[libx264 @ 0x1d55960] frame I:3 Avg QP:17.00 size:288245
[libx264 @ 0x1d55960] frame P:665 Avg QP:20.00 size:102013
[libx264 @ 0x1d55960] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1d55960] mb P I16..4: 8.4% 0.0% 0.0% P16..4: 87.0% 0.0%
0.0% 0.0% 0.0% skip: 4.7%
[libx264 @ 0x1d55960] coded y,uvDC,uvAC intra: 21.2% 84.7% 23.6% inter:
49.6% 91.2% 16.0%
[libx264 @ 0x1d55960] i16 v,h,dc,p: 62% 21% 10% 7%
[libx264 @ 0x1d55960] i8c dc,h,v,p: 40% 23% 27% 10%
[libx264 @ 0x1d55960] kb/s:24683.82
Received signal 2: terminating.
louis at portablebauer ~/Videos/testing $ vlc ffmpegtest.mkv
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-1068-g2269959)
[0000000001037118] core libvlc: Running vlc with the default interface.
Use 'cvlc' to use vlc without interface.
[000000000111c4e8] qt4 interface error: Unable to load extensions module
louis at portablebauer ~/Videos/testing $ rm *mkv && ffmpeg -f v4l2
-framerate 30 -s 1920x1080 -i /dev/video1 -c:v libx264 -preset ultrafast
-qp 20 ffmpegtest.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 15 2014 13:52:31 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --enable-gpl --enable-postproc
--enable-avfilter --enable-avresample --enable-version3 --enable-
indev=v4l2 --enable-outdev=v4l2 --enable-bzlib --enable-hardcoded-tables
--enable-iconv --enable-network --enable-ffplay --enable-vaapi --enable-
zlib --enable-libvo-aacenc --enable-libmp3lame --enable-libfaac --enable-
libtheora --enable-libwavpack --enable-libx264 --enable-libxvid --enable-
opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --enable-frei0r
--enable-libfreetype --enable-libopus --enable-libspeex --enable-libvorbis
--enable-avx --enable-avx2 --enable-fma3 --enable-fma4 --enable-mmxext
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-nonfree
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 7.100 / 56. 7.100
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.106 / 5. 1.106
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[video4linux2,v4l2 @ 0x12a6f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, bitrate: 995328 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x12a96a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x12a96a0] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 0x12a96a0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20
ip_ratio=1.40 aq=0
Output #0, matroska, to 'ffmpegtest.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p,
1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x12a6f80] The v4l2 frame is 0 bytes, but 4147200
bytes are expected
/dev/video1: Invalid data found when processing input
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
louis at portablebauer ~/Videos/testing $
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4030#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list