[FFmpeg-user] How to compress .MOV file compatible to Canon camera

Moritz Barsnick barsnick at gmx.net
Sun Feb 16 14:49:56 EET 2020


On Sun, Feb 16, 2020 at 09:58:16 +0100, Ulf Zibis wrote:
> When I copy them back to the camera, they are no more playable on the
> camera. Damn, I wanted to save space on the memory card.
>
> Does anyone have an idea, which options maybe could help to get a
> compatible format for my camera?

You'll have to do some experimenting. On such a camera, video encoding
and decoding are mostly done in hardware. For H.264 on can say, the
more complex the format, the more complex the hardware needs to be.

H.264 and other codecs have so-called profiles and levels to describe
encoding characteristics. Your camera's hardware is likely to be
restricted to a certain maximum profile/level combination.

With ffmpeg's libx264 encoder (which was automatically selected when
you re-encoded to MOV), you can change the default profile with the
encoding options "-profile:v" and "-level:v". (The defaults
ffmpeg/libx264 use without these options depend on other things, such
as "-preset" and possibly resolution.)

Indeed, as you presume, your best bet is to try to copy the original
format:

> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_1334.MOV':
>    Metadata:
>      major_brand     : qt
>      minor_version   : 537331968
>      compatible_brands: qt  CAEP
>      creation_time   : 2020-02-07T11:35:24.000000Z
>    Duration: 00:00:23.76, start: 0.000000, bitrate: 22892 kb/s
>      Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1280x720, 22763 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)

Note the "Constrained Baseline".

Alas, I don't know how to tell ffmpeg/libx264 to use this profile -
only "Baseline". But you can try some of the others profile/level
combinations, as suggested in this Compatibity section in the wiki:

https://trac.ffmpeg.org/wiki/Encode/H.264#Compatibility

(The examples are for iOS, but apply to any hardware playback.)

Try from most complex (High) to most simple (Baseline) until it works.
Please note that the simpler profiles again result in larger file
sizes! You may get smaller results be reducing the quality slightly,
i.e. increasing the CRF (option "-crf") from its default 23 until you
actually notice changes.

Good luck,
Moritz


More information about the ffmpeg-user mailing list