mbox series

[FFmpeg-devel,V2,0/2] avformat movenc extend video_track_timescale flag to allow use of video stream timescale for track

Message ID 20200505144516.6458-1-hello.vectronic@gmail.com
Headers show
Series avformat movenc extend video_track_timescale flag to allow use of video stream timescale for track | expand

Message

vectronic May 5, 2020, 2:45 p.m. UTC
Revised patch based on feedback. Instead of introducing a new flag, this extend the range of video_track_timescale down to -1
which indicates to use the video stream timescale for video the track.

Still providing a debug message in default case if video timescale specified has been clamped to above 10000.

The example scenario is where the input mov file has a video track timebase of e.g. 600.

Currently, if the following is run, the output file has a modified video track timebase of 19200:

    ffmpeg -i in.mov -c:v copy out.mov

With this patch, if you run:

    ffmpeg -loglevel debug -i in.mov -c:v copy out.mov

you will see in the output:

    Stream timescale was low (600), the track timescale has been forced to 19200.

And if you run the following, you will get an output file with the same video track timebase as the input e.g. 600:

    ffmpeg -i in.mov -c:v copy -video_track_timescale -1 out.mov

The previous would be the same behaviour as the following, but it does not rely on the user knowing and specifying the input timebase:

    ffmpeg -i in.mov -c:v copy -video_track_timescale 600 out.mov



vectronic (2):
  avformat movenc extend video_track_timescale flag range to allow use
    of video stream timescale for track
  avformat movenc extend video_track_timescale flag range to allow use
    of video stream timescale for track

 libavformat/movenc.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)