Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to convert videos to a format that my camera reads with ffmpeg.

I have some sample videos from the camera and analyzed them with

mplayer -frames 0 -identify

and with


Then I tried everything I could find in the documentation to create a video of the same type. My command was

ffmpeg -i movie.flv -vcodec mjpeg -b:v 2128296 -pix_fmt yuvj422p -r 15 -acodec pcm_u8 -ac 1 -ar 7875 -vf scale=320:240

But when I try to play the video with the camera, the camera tells me The file contains no image data (translated).

This is the diff from the ffprobe analysis

< Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '':
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '':
<     creation_time   : 2011-10-08 17:17:30
<     comment         : NIKON DIGITAL CAMERA                             
<     comment-eng     : NIKON DIGITAL CAMERA                             
<   Duration: 00:00:03.40, start: 0.000000, bitrate: 1977 kb/s
<     Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj422p, 320x240, 1879 kb/s, 15 fps, 15 tbr, 600 tbn, 600 tbc
>     major_brand     : qt  
>     minor_version   : 512
>     compatible_brands: qt  
>     encoder         : Lavf53.32.100
>   Duration: 00:05:09.06, start: 0.000000, bitrate: 2196 kb/s
>     Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj422p, 320x240 [SAR 25:24 DAR 25:18], 2131 kb/s, 15 fps, 15 tbr, 15 tbn, 15 tbc
<       creation_time   : 2011-10-08 17:17:30
>                         DataHandler
<       creation_time   : 2011-10-08 17:17:30
<       handler_name    :
>       handler_name    : 
>                         DataHandler

and from the mplayer analysis (I’ve cut out the lines that were equal, to make this paste smaller).

< Playing
< VIDEO:  [jpeg]  320x240  24bpp  15.000 fps  2053.4 kbps (250.7 kbyte/s)
<  creation_time: 2011-10-08 17:14:54
< ID_CLIP_INFO_NAME0=creation_time
< ID_CLIP_INFO_VALUE0=2011-10-08 17:14:54
<  comment: NIKON DIGITAL CAMERA                             
< ID_CLIP_INFO_NAME1=comment
< ID_CLIP_INFO_VALUE1=NIKON DIGITAL CAMERA                             
<  comment-eng: NIKON DIGITAL CAMERA                             
< ID_CLIP_INFO_NAME2=comment-eng
< ID_CLIP_INFO_VALUE2=NIKON DIGITAL CAMERA                             
< ID_LENGTH=91.00
> Playing
> VIDEO:  [jpeg]  320x240  24bpp  15.000 fps  1953.5 kbps (238.5 kbyte/s)
>  major_brand: qt  
> ID_CLIP_INFO_NAME0=major_brand
>  minor_version: 512
> ID_CLIP_INFO_NAME1=minor_version
>  compatible_brands: qt  
> ID_CLIP_INFO_NAME2=compatible_brands
>  encoder: Lavf53.32.100
> ID_CLIP_INFO_NAME3=encoder
> ID_CLIP_INFO_VALUE3=Lavf53.32.100
> ID_LENGTH=309.07

What I immediately noticed was

  1. the ID_VIDEO_ASPECT of the mplayer analysis. The original video has 0.0000 and the fake one has 1.3889.
  2. the original has 600 tbn, 600 tbc and the fake has 15 tbn, 15 tbc at ffmpeg analysis.
  3. the fake has [SAR 25:24 DAR 25:18] where the original has nothing. This is probably the aspect ratio of the video.
  4. And of course the different comments and the creation time and so on. I hope they are not important. I changed the NIKON DIGITAL CAMERA to something else in the original video with a hex editor and the video still played.

Any ideas how to improve my fake video?


Another difference. I get the following with the file command. :-(

$ file                  data                  ISO Media, Apple QuickTime movie

The first video is the original one. The second is my ffmpeg creation.

Update 2

I’ve tried to just copy the input streams from the original file to a new file with, in my opinion, same container (mov).

ffmpeg -i -c:v copy -c:a copy

And file tells me for this copied video ISO Media, Apple QuickTime movie

The new file was a bit smaller. Comparing them with a hex editor I saw, that they have different magic numbers. So I think this is a container problem, not a codec problem. The camera is a Nikon Coolpix. Maybe I should ask ffmpeg developers if this container format is supported. At least it is readable and playable by mplayer and ffmpeg.

share|improve this question
My first guess would be the colorspace difference (yuvj422p vs yuvj420p) is causing the issue, but I don't know how to make FFMPEG change that. – heavyd Feb 11 '13 at 23:58
I added -pix_fmt yuvj422p to conversion command. Now there is nomore difference, but still the same error from the camera. – erik Feb 12 '13 at 0:20
If you ask on ffmpeg-user mailing list (or #ffmepg IRC) then make sure you are using the most recent ffmpeg build that you can and also include your ffmpeg commands and the complete ffmpeg console outputs and not just a diff. – LordNeckbeard Feb 12 '13 at 19:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.