[Libav-user] 16-Bit RAW Video Recording Problem
Carel Combrink
carel.combrink at gmail.com
Thu Apr 11 14:56:15 CEST 2013
Hi,
I am using FFmpeg and an external open source library to record video to
file. I want to record the RAW video to the file because I do not want to
waste time to do compression and I can not afford to lose information. In
most cases the video will be 1024x768 @ 40 fps ,16 bit greyscale.
The external library that I am using is FLITr:
https://code.google.com/p/flitr/
Using a previous version of FFmpeg this was working but after some updates
on FFmpeg and subsequently updates on FLITr to support the changes, the
recording is not working any more I have spoken to the developers of FLITr
and we are not sure what we are doing wrong.
I have an old recording recorded when everything still worked and I compare
that to a recording made with the latest versions of the libraries and I
get the following results:
*Using ffplay:*
Recording that works (recorded on 12 September 2012):
>ffplay Recording_01.avi
ffplay version N-51683-g9dc88ac Copyright (c) 2003-2013 the FFmpeg
developers
built on Apr 8 2013 21:22:02 with gcc 4.8.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl
--enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib
--enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 25.100 / 52. 25.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 1.100 / 55. 1.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 49.101 / 3. 49.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'LAB_OCON_Recording_01.avi':B f=0/0
Metadata:
ENCODER : *Lavf54.25.104*
Duration: 00:00:13.35, start: 0.000000, *bitrate: 503329 kb/s*
Stream #0:0: Video: rawvideo *(Y1[0][16] / 0x10003159),
gray16le,*1024x768, SAR 1:1 DAR 4:3, 40 fps, 40 tbr, 1k tbn, 1k tbc
(default)
4.27 A-V: 0.000 fd= 14 aq= 0KB vq= 9216KB sq= 0B f=0/0
New Recording:
>ffplay Recording.avi
ffplay version N-51683-g9dc88ac Copyright (c) 2003-2013 the FFmpeg
developers
built on Apr 8 2013 21:22:02 with gcc 4.8.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl
--enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib
--enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 25.100 / 52. 25.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 1.100 / 55. 1.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 49.101 / 3. 49.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
nan A-V: 0.000 fd= 0 aq[rawvideo @ 01dc8c40] = Invalid pixel format.
Last message repeated 1 times/ 0 L a s
Input #0, matroska,webm, from 'Recording.avi':
Metadata:
ENCODER : *Lavf55.1.100*
Duration: 00:00:00.70, start: 0.000000, *bitrate: N/A*
Stream #0:0: Video: rawvideo, 1024x768, SAR 1:1 DAR 4:3, 40 fps, 40
tbr, 1k tbn, 1k tbc (default)
[rawvideo @ 01dc8c40] Invalid pixel format.
*Recording.avi: could not open codecs*
In *bold *I have marked the things that are very different on the 2
recordings. It appears that the header of the new recording is not set up
correctly.
Is there something that we are doing wrong when creating the recording or
is this a problem with FFmpeg?
PS: To look at the source code that starts the recording look at the
following file in FLITr:
https://code.google.com/p/flitr/source/browse/trunk/src/flitr/ffmpeg_writer.cpp
As mentioned, in the end I am using AV_CODEC_ID_RAWVIDEO as the codec and
the pixel format is chosen by FLITr as gray16le
Any help will be appreciated.
Regards,
Carel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130411/52e183cb/attachment.html>
More information about the Libav-user
mailing list