[FFmpeg-user] Can't detect resolution of .mov video

Manuel manuel.carrizo at intraway.com
Wed Mar 23 21:44:04 CET 2011


Hi, I'm recording videos of an Axis M 1031 camera with openRTSP (part of
live555 RTSP library), saving the output to a mov file [1], and then trying
to convert the video to flash with ffmpeg.
The ffmpeg syntax that I'm using is

ffmpeg -y -i video.mov -ar 44100 -ab 32000 -g 300 video.flv

But I'm having trouble with some videos, where ffmpeg outputs with the
following error

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov':
  Duration: 00:00:12.16, start: 0.000000, bitrate: 16 kb/s
    Stream #0.0(eng): Audio: aac, 8000 Hz, mono, s16, 15 kb/s
    Stream #0.1(eng): Video: mpeg4, yuv420p, 600 tbr, 600 tbn, 600 tbc
*[flv @ 0x8430190]dimensions not set*
Output #0, flv, to 'video.flv':
    Stream #0.0(eng): Video: flv, yuv420p, q=2-31, 200 kb/s, 90k tbn, 600
tbc
    Stream #0.1(eng): Audio: adpcm_swf, 44100 Hz, mono, s16, 32 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
*Could not write header for output file #0 (incorrect codec parameters ?)*

But in some cases I can't play the video with mplayer or VLC, or convert it
with ffmpeg, because none of them can get the resolution of the mov file.



I tried to play the video with mplayer and VLC, without success, so I
checked video information with mplayer

$ mplayer -identify video.mov -ao null -vo null -frames 0 2>&1 | grep ^ID_
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
ID_VIDEO_ID=0
ID_FILENAME=video.mov
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=MP4V
ID_VIDEO_BITRATE=0
*ID_VIDEO_WIDTH=0
ID_VIDEO_HEIGHT=0*
ID_VIDEO_FPS=600.000
ID_VIDEO_ASPECT=-nan
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=15560
ID_AUDIO_RATE=8000
ID_AUDIO_NCH=1
ID_START_TIME=0.00
ID_LENGTH=12.16
ID_SEEKABLE=1
ID_CHAPTERS=0
ID_VIDEO_CODEC=ffodivx
ID_AUDIO_BITRATE=15560
ID_AUDIO_RATE=16000
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=faad
ID_EXIT=EOF


I decided to check the source code of live555, comparing it with the
generated video using an hex editor, in the mp4v atom, the library
writes, (Width<<16) | Height before 0x 00 48 00 00 00 48 00 00, and that was
what I found in the mov. For the tkhd atom the library writes the matrix
structure and after that the Width and Height.

Can someone please help me to find what is wrong with the video?

The video in question can be found in
http://dl.dropbox.com/u/23705394/video.mov

And this video, that was recorded in the same way, can be converted to flash
http://dl.dropbox.com/u/23705394/working_video.mov

I'm using Kubuntu 10.10 and ffmpeg from the official Kubuntu repositories:

FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg
developers
  built on Oct  5 2010 22:35:47 with gcc 4.4.5
  configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
--enable-libgsm --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads
--enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect
--enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394
--enable-shared --disable-static



Thanks in advance.

Regards,

Manuel

[1] openRTSP syntax used is
./openRTSP -q -w 320 -h 240 -f 10 -d N -u UUUU PPPP
rtsp://<hostname>/mpeg4/media.amp?videocodec=h264 > video.mov


More information about the ffmpeg-user mailing list