* commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7':
mov: use tkhd enabled flag to set the default track
Merged-by: Michael Niedermayer <michaelni@gmx.at>
QuickTime will play multiple audio tracks concurrently if this flag is
set for multiple audio tracks. And if no subtitle track has this flag
set, QuickTime will show no subtitles in the subtitle menu.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Faststart moves the moov atom to the beginning of the file and rewrites
the rest of the file after muxing is complete.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '6c786765cd5eb794dedd4a0970dfe689b16dfeeb':
movenc: Allow chapters to be written in trailer
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '64af59bc4916fac5578b31c89da13c30b591bddf':
avformat: Fix references to removed av_close_input_file in Doxygen
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This allows creation of frame accurate chapter marks from sources
like DVD and BD where the precise chapter location is not known until
the chapter mark has been reached during reading.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '22de0f8369f1f3edf1a55e1d275f3c07c617b53e':
mov: Compute max duration among the tracks with a timescale
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '39523030108815242178ac5e209c83070bd1baef':
mov: Set the timescale for data streams
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4':
mkv: Allow flushing the current cluster in progress
Conflicts:
libavformat/matroskaenc.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe':
mkv: Flush the old cluster before writing a new one
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Allow emitting the current cluster that is being written before
starting a new one, simplifying how to figure out where clusters
are positioned in the output stream (for live streaming).
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
WebM files now support inband text tracks, as described in the
following specification:
http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm
The Matroska demuxer now detects the presence of WebVTT tracks,
synthesizing WebVTT packets (having codec id AV_CODEC_ID_WEBVTT) and
pushing them downstream in the normal way.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Seeking in certain broken files would cause ogg_read_timestamp
to fail because ogg_packet would go into a state where all packets
of stream 1 would be discarded until the end of the stream.
Bug-Id: 553
CC: libav-stable@libav.org
Signed-off-by: Jan Gerber <j@v2v.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
No case is known to have triggered this, but its more correct to check that the
new size differs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Calculate the duration as accurately as possible to improve decoding of samples
where the last frame is smaller than the rest.
Example:
Take lossless-audio/luckynight-partial.tak from the FATE suit and convert it
to TTA muxed into matroska:
ffmpeg -i $(SAMPLES)/lossless-audio/luckynight-partial.tak -c:a tta lucky.mka
The framemd5 output for lucky.mka without this patch:
0, 0, 0, 46080, 184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0, 46080, 46080, 46080, 184320, 6b70c782ba1da3f933fde2daa4f96b73
0, 92160, 92160, 46080, 184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0, 138240, 138240, 46080, 184320, 48713ca38b388d2ea4abf5b86ed1226f
0, 184320, 184320, 46080, 184320, 12188a23648e7ebfb07cd6fe9197b2ea
0, 230400, 230400, 46080, 184320, 49653ab8186a5d4a044ed284671a26e0
0, 276480, 276480, 46080, 184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0, 322560, 322560, 46080, 184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0, 368640, 368640, 46080, 184320, bdd6b92c23d30978d4e802d305b0fc49
With this patch:
0, 0, 0, 46080, 184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0, 46080, 46080, 46080, 184320, 6b70c782ba1da3f933fde2daa4f96b73
0, 92160, 92160, 46080, 184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0, 138240, 138240, 46080, 184320, 48713ca38b388d2ea4abf5b86ed1226f
0, 184320, 184320, 46080, 184320, 12188a23648e7ebfb07cd6fe9197b2ea
0, 230400, 230400, 46080, 184320, 49653ab8186a5d4a044ed284671a26e0
0, 276480, 276480, 46080, 184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0, 322560, 322560, 46080, 184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0, 368640, 368640, 46080, 184320, bdd6b92c23d30978d4e802d305b0fc49
0, 414720, 414720, 4230, 16920, b50b440c5bbcecb8e9fbece643447593
The duration without this patch was calculated as 418950000000, which is bigger
than uint32_t and as such stored as 2338172288.
With this patch the duration is correctly calculated as 418950.
Signed-off-by: James Almer <jamrial@gmail.com>
Approved-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>