[FFmpeg-devel] [PATCH] lavf/movenc: suggest video_track_timescale for invalid timescale

Josh de Kock josh at itanimul.li
Tue Oct 11 14:30:30 EEST 2016

Fixes ticket #5882. While it doesn't automatically set the timescale
for the user as that would destroy data without prompt, it will tell
the user how they could set the timescale (as this is mostly likely
what they want).

Signed-off-by: Josh de Kock <josh at itanimul.li>
 libavformat/movenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d7c7158..1f4f2b0 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5681,7 +5681,9 @@ static int mov_write_header(AVFormatContext *s)
                 av_log(s, AV_LOG_WARNING,
                        "WARNING codec timebase is very high. If duration is too long,\n"
                        "file may not be playable by quicktime. Specify a shorter timebase\n"
-                       "or choose different container.\n");
+                       "or choose different container. You may find the -video_track_timescale\n"
+                       "flag useful to forcibly set a specific timescale. Ex. 30000/1001 FPS\n"
+                       "would be -video_track_timescale 30000.\n");
             if (track->mode == MODE_MOV &&
                 track->par->codec_id == AV_CODEC_ID_RAWVIDEO &&
                 track->tag == MKTAG('r','a','w',' ')) {
2.8.4 (Apple Git-73)

More information about the ffmpeg-devel mailing list