2

I have video file that is capture of uncompressed video stream. Its media info is as follows:

  • Format : AVI
  • Format/Info : Audio Video Interleave
  • Format profile : OpenDML
  • File size : 21.5 GiB
  • Duration : 11mn 44s
  • Overall bit rate : 262 Mbps

  • Video ID : 0

  • Format : YUV
  • Codec ID : GREY
  • Codec ID/Info : Simple grayscale video
  • Duration : 11mn 44s
  • Bit rate : 262 Mbps
  • Width : 1 280 pixels
  • Height : 1 024 pixels
  • Display aspect ratio : 5:4
  • Frame rate : 25.000 fps
  • Color space : YUV
  • Compression mode : Lossless
  • Bits/(Pixel*Frame) : 8.000
  • Stream size : 21.5 GiB (100%)

Ths should be the most simple video to display, but not a single one of my players can do that, for some reason. How do i work with it?

Edit: here is command line output of ffmpeg conversion command:

ffmpeg -pix_fmt grey -i input.avi -c:v libx264 -pix_fmt yuv420p output.mp4

ffmpeg version N-55966-gfdd1aaf Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  2 2013 18:01:19 with gcc 4.7.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 31.100 / 55. 31.100
  libavformat    55. 15.100 / 55. 15.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Trailing options were found on the commandline.
Option pixel_format not found.

This is output for just probing the file (ffmpeg -i input.avi):

[avi @ 02a7b5c0] Could not find codec parameters for stream 0 (Video: none (GREY / 0x59455247), 1280x1024): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
i:/sun2M.avi: could not find codec parameters
  • Can ffmpeg read the video on its own, i.e. if you leave out -pix_fmt grey altogether? – slhck Sep 3 '13 at 14:43
  • No, it fails to do so as well. – Srv19 Sep 3 '13 at 15:07
  • Hm. It seems the AVI was incorrectly written and does not declare the right codec to use – ideally ffmpeg should show it as rawvideo. No way to get the file in a different format, I presume? – slhck Sep 3 '13 at 15:40
2

The "unknown codec" message indicates that it cannot determine the codec used by the input file. Therefore, specify the input codec on the command line (rawvideo in this case). To convert to 4:2:0 H.264:

ffmpeg -c:v rawvideo -i input.avi -c:v libx264 -pix_fmt yuv420p output.mp4
  • this worked just fine – Srv19 Sep 4 '13 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.