<div dir="ltr">Hi,<div><br></div><div style>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.</div>

<div style><br></div><div style>The external library that I am using is FLITr: <a href="https://code.google.com/p/flitr/">https://code.google.com/p/flitr/</a></div><div style><br></div><div style>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.</div>

<div style><br></div><div style>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:<br><br></div>

<div style><b>Using ffplay:</b></div><div style>Recording that works (recorded on 12 September 2012):<br><div><font face="courier new, monospace">>ffplay Recording_01.avi</font></div><div><font face="courier new, monospace">ffplay version N-51683-g9dc88ac Copyright (c) 2003-2013 the FFmpeg developers</font></div>

<div><font face="courier new, monospace">  built on Apr  8 2013 21:22:02 with gcc 4.8.0 (GCC)</font></div><div><font face="courier new, monospace">  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontco</font><span style="font-family:'courier new',monospace">nfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-</span><span style="font-family:'courier new',monospace">libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libs</span><span style="font-family:'courier new',monospace">chroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis</span><span style="font-family:'courier new',monospace"> --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib</span></div>

<div><font face="courier new, monospace">  libavutil      52. 25.100 / 52. 25.100</font></div><div><font face="courier new, monospace">  libavcodec     55.  2.100 / 55.  2.100</font></div><div><font face="courier new, monospace">  libavformat    55.  1.100 / 55.  1.100</font></div>

<div><font face="courier new, monospace">  libavdevice    55.  0.100 / 55.  0.100</font></div><div><font face="courier new, monospace">  libavfilter     3. 49.101 /  3. 49.101</font></div><div><font face="courier new, monospace">  libswscale      2.  2.100 /  2.  2.100</font></div>

<div><font face="courier new, monospace">  libswresample   0. 17.102 /  0. 17.102</font></div><div><font face="courier new, monospace">  libpostproc    52.  2.100 / 52.  2.100</font></div><div><font face="courier new, monospace">Input #0, matroska,webm, from 'LAB_OCON_Recording_01.avi':B f=0/0</font></div>

<div><font face="courier new, monospace">  Metadata:</font></div><div><font face="courier new, monospace">    ENCODER         : <b>Lavf54.25.104</b></font></div><div><font face="courier new, monospace">  Duration: 00:00:13.35, start: 0.000000, <b>bitrate: 503329 kb/s</b></font></div>

<div><font face="courier new, monospace">    Stream #0:0: Video: rawvideo <b>(Y1[0][16] / 0x10003159), gray16le,</b> 1024x768, SAR 1:1 DAR 4:3, 40 fps, 40 tbr, 1k tbn, 1k tbc (default)</font></div><div><font face="courier new, monospace">   4.27 A-V:  0.000 fd=  14 aq=    0KB vq= 9216KB sq=    0B f=0/0</font></div>

<div><font face="courier new, monospace"><br></font></div>New Recording: </div><div style><div><font face="courier new, monospace">>ffplay Recording.avi</font></div><div><font face="courier new, monospace">ffplay version N-51683-g9dc88ac Copyright (c) 2003-2013 the FFmpeg developers</font></div>

<div><font face="courier new, monospace">  built on Apr  8 2013 21:22:02 with gcc 4.8.0 (GCC)</font></div><div><font face="courier new, monospace">  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontco</font><span style="font-family:'courier new',monospace">nfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-</span><span style="font-family:'courier new',monospace">libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libs</span><span style="font-family:'courier new',monospace">chroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis</span><span style="font-family:'courier new',monospace"> --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib</span></div>

<div><font face="courier new, monospace">  libavutil      52. 25.100 / 52. 25.100</font></div><div><font face="courier new, monospace">  libavcodec     55.  2.100 / 55.  2.100</font></div><div><font face="courier new, monospace">  libavformat    55.  1.100 / 55.  1.100</font></div>

<div><font face="courier new, monospace">  libavdevice    55.  0.100 / 55.  0.100</font></div><div><font face="courier new, monospace">  libavfilter     3. 49.101 /  3. 49.101</font></div><div><font face="courier new, monospace">  libswscale      2.  2.100 /  2.  2.100</font></div>

<div><font face="courier new, monospace">  libswresample   0. 17.102 /  0. 17.102</font></div><div><font face="courier new, monospace">  libpostproc    52.  2.100 / 52.  2.100</font></div><div><font face="courier new, monospace">    nan A-V:  0.000 fd=   0 aq[rawvideo @ 01dc8c40] = Invalid pixel format.</font></div>

<div><font face="courier new, monospace">    Last message repeated 1 times/ 0  L a s</font></div><div><font face="courier new, monospace">Input #0, matroska,webm, from 'Recording.avi':</font></div><div><font face="courier new, monospace">  Metadata:</font></div>

<div><font face="courier new, monospace">    ENCODER         : <b>Lavf55.1.100</b></font></div><div><font face="courier new, monospace">  Duration: 00:00:00.70, start: 0.000000, <b>bitrate: N/A</b></font></div><div><font face="courier new, monospace">    Stream #0:0: Video: rawvideo, 1024x768, SAR 1:1 DAR 4:3, 40 fps, 40 tbr, 1k tbn, 1k tbc (default)</font></div>

<div><font face="courier new, monospace">[rawvideo @ 01dc8c40] Invalid pixel format.</font></div><div><font face="courier new, monospace"><b>Recording.avi: could not open codecs</b></font></div><div><font face="courier new, monospace"><br>

</font></div>In <b>bold </b>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.</div><div style><br></div><div style>Is there something that we are doing wrong when creating the recording or is this a problem with FFmpeg?</div>

<div style><br></div><div style>PS: To look at the source code that starts the recording look at the following file in FLITr: <a href="https://code.google.com/p/flitr/source/browse/trunk/src/flitr/ffmpeg_writer.cpp">https://code.google.com/p/flitr/source/browse/trunk/src/flitr/ffmpeg_writer.cpp</a></div>

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<div><br></div><div>Any help will be appreciated.</div><div><br></div><div>Regards,</div><div>Carel<br>

<div style><br></div><div style><br></div></div></div>