1

I am trying to convert raw video frames that I have captured using a Blackmagic Design Intensity card. The output frames are of the format:

YCbCr 4:2:2 packed 8 Bit UYVY Abekas

How can I convert this to a more usable format? My goals are to extract frames as images and sets of frames as videos.

I have tried using FFmpeg to convert the files but I cannot find the correct format. The example I am using is a file containing the raw data of a single frame. FFmpeg converts the file but it is distorted so I know that means my pixel format is incorrect. I am starting to think FFmpeg does not support the pixel format I need.

ffmpeg -s 720x486 -i snapshot.yuv snapshot.jpg

The output comes out almost correct but is mostly green.

Here is the output from FFmpeg. The rawvideo format is detects is incorrect. It should be Y422 instead of I420.

ffmpeg version N-64009-g389d453 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 16 2014 15:43:30 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: 
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 67.100 / 55. 67.100
  libavformat    55. 43.100 / 55. 43.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  8.100 /  4.  8.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
[rawvideo @ 0x2af1c20] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'snapshot.yuv':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 139968 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x486, 104976 kb/s, 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x2ae13e0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'snapshot.jpg':
  Metadata:
    encoder         : Lavf55.43.100
    Stream #0:0: Video: mjpeg, yuvj420p, 720x486, q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc55.67.100 mjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (mjpeg))
Press [q] to stop, [?] for help
[swscaler @ 0x2ae13e0] Warning: data is not aligned! This can lead to a speedloss
[rawvideo @ 0x2af2ec0] Invalid buffer size, packet size 174960 < expected frame_size 524880
Error while decoding stream #0:0: Invalid argument
frame=    1 fps=0.0 q=7.0 Lsize=N/A time=00:00:00.04 bitrate=N/A    
video:140kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

0 Answers0