[FFmpeg-devel] libavformat/movenc : Change MOV_TIMESCALE from 1000 to 600

Submitted by Mark Burton on March 8, 2018, 11:26 p.m.

Details

Message ID 4438B914-3E58-4C06-8442-D2A7F2540B94@gmail.com
State New
Headers show

Commit Message

Mark Burton March 8, 2018, 11:26 p.m.
From 9c3cb06bb869e33daaf0c0dacfb4fa66d18a5722 Mon Sep 17 00:00:00 2001
From: mwjburton <mwjburton@gmail.com>
Date: Thu, 8 Mar 2018 22:58:31 +0000
Subject: [PATCH] libavformat/movenc : Change MOV_TIMESCALE from 1000 to 600

Changing the MOV_TIMESCALE value from 1000 to 600 results in
files that seek accurately in professional Quicktime software. This is
due to the fact 600 is cleanly divisible by more frame rates than 1000, for
example 24fps and 30fps. The Quicktime specification default is set to 600
for this reason. When set to 1000 seeking can be inaccurate for these fame
rates.

---
 libavformat/movenc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carl Eugen Hoyos March 9, 2018, 1:26 a.m.
2018-03-09 0:26 GMT+01:00, Mark Burton <mwjburton@gmail.com>:
> From 9c3cb06bb869e33daaf0c0dacfb4fa66d18a5722 Mon Sep 17 00:00:00 2001
> From: mwjburton <mwjburton@gmail.com>
> Date: Thu, 8 Mar 2018 22:58:31 +0000
> Subject: [PATCH] libavformat/movenc : Change MOV_TIMESCALE from 1000 to 600
>
> Changing the MOV_TIMESCALE value from 1000 to 600 results in
> files that seek accurately in professional Quicktime software. This is
> due to the fact 600 is cleanly divisible by more frame rates than 1000, for
> example 24fps and 30fps. The Quicktime specification default is set to 600
> for this reason. When set to 1000 seeking can be inaccurate for these fame
> rates.
>
> ---
>  libavformat/movenc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/movenc.h b/libavformat/movenc.h
> index ca2a9c9722..b7fc2c029d 100644
> --- a/libavformat/movenc.h
> +++ b/libavformat/movenc.h
> @@ -29,7 +29,7 @@
>
>  #define MOV_FRAG_INFO_ALLOC_INCREMENT 64
>  #define MOV_INDEX_CLUSTER_SIZE 1024
> -#define MOV_TIMESCALE 1000
> +#define MOV_TIMESCALE 600

This breaks fate, our regression testing suite (my mistake).
To download the test-suite:
$ make SAMPLES=fate-suite fate-rsync
$ make SAMPLES=fate-suite GEN=1 fate
This changes the values for fate, then commit again with:
$ git commit tests libavformat

Sorry, Carl Eugen

Patch hide | download patch | download mbox

diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index ca2a9c9722..b7fc2c029d 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -29,7 +29,7 @@ 
 
 #define MOV_FRAG_INFO_ALLOC_INCREMENT 64
 #define MOV_INDEX_CLUSTER_SIZE 1024
-#define MOV_TIMESCALE 1000
+#define MOV_TIMESCALE 600
 
 #define RTP_MAX_PACKET_SIZE 1450