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

Reino Wijnsma rwijnsma at xs4all.nl
Fri Mar 13 18:21:59 EET 2020


On 2020-03-12T10:38:43+0100, Ulf Zibis <Ulf.Zibis at gmx.de> wrote:
> Am 12.03.20 um 02:24 schrieb Ted Park:
>>> ... and how can I avoid this, or which argument should I pass to
>>> -video_track_timescale ?
>> Passing the timescale to that option would work I think.
> And which value should I choose?
See https://stackoverflow.com/a/43337235.
So -video_track_timescale 60k for instance.

> (difficult to know, as "video_track_timescale" is nowhere documented)
ffmpeg -hide_banner -h muxer=mov | grep "video_track_timescale"
  -video_track_timescale <int>        E......... set timescale of all video tracks (from 0 to INT_MAX) (default 0)


I had a look at your 'MVI_1324.MOV'.
ffmpeg -i MVI_1324.MOV -c:v libx264 -preset ultrafast -level 4.1 -g 15 -colorspace smpte170m -color_primaries bt709 -color_trc bt709 -video_track_timescale 60k -c:a copy -map_metadata 0 MVI_1324_test.MOV

diff -u <(ffmpeg -i MVI_1324.MOV 2>&1) <(ffmpeg -i MVI_1324_test.MOV 2>&1)
--- /dev/fd/63  2020-03-13 16:54:23.000000000 +0100
+++ /dev/fd/62  2020-03-13 16:54:23.000000000 +0100
@@ -9,17 +9,21 @@
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
-Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_1324.MOV':
+Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_1324_test.MOV':
   Metadata:
     major_brand     : qt
-    minor_version   : 537331968
-    compatible_brands: qt  CAEP
+    minor_version   : 512
+    compatible_brands: qt
     creation_time   : 2020-02-05T20:17:27.000000Z
-  Duration: 00:00:29.10, start: 0.000000, bitrate: 23351 kb/s
-    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1280x720, 23228 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
+    encoder         : Lavf58.35.101
+  Duration: 00:00:29.10, start: 0.000000, bitrate: 9374 kb/s
+    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1280x720, 9276 kb/s, 29.97 fps, 29.97 tbr, 60k tbn, 59.94 tbc (default)
     Metadata:
       creation_time   : 2020-02-05T20:17:27.000000Z
+      handler_name    : VideoHandler
+      encoder         : Lavc58.65.102 libx264
     Stream #0:1(eng): Audio: pcm_u8 (raw  / 0x20776172), 12000 Hz, mono, u8, 96 kb/s (default)
     Metadata:
       creation_time   : 2020-02-05T20:17:27.000000Z
+      handler_name    : SoundHandler
 At least one output file must be specified

-video_track_timescale 60k changes "30k tbn" to "60k tbn". So it doesn't change "tbc" at all.

-- Reino


More information about the ffmpeg-user mailing list