[FFmpeg-trac] #4030(avdevice:new): V4L2 recording results in invalid data & buffer still owned errors
FFmpeg
trac at avcodec.org
Sat Oct 18 02:09:27 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):
I tried recompiling with just configure, and I also tried your patch.
Since compiling with nothing but ./configure does not give you x264 as a
codec, I just decided to specify no video codec which defaulted to mpeg4.
It still doesn't work.
$ ffmpeg -f v4l2 -framerate 30 -s 1920x1080 -i /dev/video0
microtester.mkv
ffmpeg version N-66880-ga92192d Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 16 2014 14:08:29 with gcc 4.8.3 (Gentoo 4.8.3 p1.1,
pie-0.5.9)
configuration: --prefix=/usr
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
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
[video4linux2,v4l2 @ 0x1e46dc0] The v4l2 frame is 0 bytes, but 4147200
bytes are expected. Flags: 0x00002045
Input #0, video4linux2,v4l2, from '/dev/video0':
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
Output #0, matroska, to 'microtester.mkv':
Metadata:
encoder : Lavf56.9.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080,
q=2-31, 200 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.7.100 mpeg4
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x1e46dc0] The v4l2 frame is 0 bytes, but 4147200
bytes are expected. Flags: 0x00002045
/dev/video0: 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
If anyone else has this problem, VLC version 3 works with framerate. The
reason I was using ffmpeg is because VLC was not letting me set the
framerate of an input source with the stable version, but version 3 of VLC
adds this functionality. If this buffer stuff gets fixed in ffmpeg, I'd
love to go back to ffmpeg, but just incase someone else is in the same
situation I am with a magewell USB3 HDMI capture device and needs
something that works now, you can use a command line like this with VLC to
record video & audio just fine. It never freezes and always works.
cvlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-fps=30 :v4l2-width=1920
:v4l2-height=1080 --input-slave pulse:// --sout
"#transcode{vcodec=h264,venc=x264{preset=ultrafast,crf=10}}:standard{access=file,dst=camcorder.avi}"
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4030#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list