- 03 1月, 2015 4 次提交
-
-
由 Martin Storsjö 提交于
This delays writing the moov until the first fragment is written, or can be flushed by the caller explicitly when wanted. If the first sample in all streams is available at this point, we can write a proper editlist at this point, allowing streams to start at something else than dts=0. For AC3 and DNXHD, a packet is needed in order to write the moov header properly. This isn't added to the normal behaviour for empty_moov, since the behaviour that ftyp+moov is written during avformat_write_header would be changed. Callers that split the output stream into header+segments (either by flushing manually, with the custom_frag flag set, or by just differentiating between data written during avformat_write_header and the rest) will need to be adjusted to take this option into use. For handling streams that start at something else than dts=0, an alternative would be to use different kinds of heuristics for guessing the start dts (using AVCodecContext delay or has_b_frames together with the frame rate), but this is not reliable and doesn't necessarily work well with stream copy, and wouldn't work for getting the right initialization data for AC3 or DNXHD either. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
This allows writing edit lists even when track->entry == 0, if the start times have been set. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
If fragments == 0 it means we haven't written any moov atom yet. If the empty_moov flag is set, we already have written an empty moov atom at startup. Thus, the check for empty_moov is redundant. This is in preparation for allowing writing the moov atom later, even when using the empty moov flag. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 19 12月, 2014 1 次提交
-
-
由 Martin Storsjö 提交于
The pts and the corresponding duration is written in sidx atoms, thus make sure these match up correctly. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 26 11月, 2014 2 次提交
-
-
由 Martin Storsjö 提交于
This allows setting the right fragment number if doing random-access writing of fragments, and also allows reading the current sequence number. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
This allows creating a later mp4 fragment without sequentially writing the earlier ones before (when called from a segmenter). Normally when writing a fragmented mp4 file sequentially, the first timestamps of a fragment are adjusted to match the end of the previous fragment, to make sure the timestamp is the same, even if it is calculated as the sum of previous fragment durations. (And for the first packet in a file, the offset of the first packet is written using an edit list.) When writing an individual mp4 fragment discontinuously like this (with potentially writing the earlier fragments separately later), there's a risk of getting a gap in the timeline if the duration field of the last packet in the previous fragment doesn't match up with the start time of the next fragment. Using this requires setting -avoid_negative_ts make_non_negative (or -avoid_negative_ts 0). Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 17 11月, 2014 5 次提交
-
-
由 Martin Storsjö 提交于
This is mapped to the faststart flag (which in this case perhaps should be called "shift and write index at the start of the file"), which for fragmented files will write a sidx index at the start. When segmenting DASH into files, there's usually one sidx at the start of each segment (although it's not clear to me whether that actually is necessary). When storing all of it in one file, the MPD doesn't necessarily need to describe the individual segments, but the offsets of the fragments can be fetched from one large sidx atom at the start of the file. This allows creating files for the DASH ISO BMFF on-demand profile. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Previously only tfra entries were added for the first track in each moof. The frag_info array used for tfra can also be used for writing other kinds of fragment indexes, where it's more important to include all tracks. When the separate_moof option is enabled (as in ismv), we write a separate moof for each track, so this doesn't make any difference in that case. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
A flag "dash" is added, which enables the necessary flags for creating DASH compatible fragments. When this is enabled, one sidx atom is written for each track before every moof atom. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
By calling this after writing the moof the first time (for calculating the moof size), we can avoid intermediate storage of tfrf_offset in MOVTrack. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
When writing fragmented streams with an empty initial moov, we won't have any samples in any tracks when writing the moov atom, thus trust that any tracks that are added actually will be present. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 08 11月, 2014 3 次提交
-
-
由 Martin Storsjö 提交于
This avoids a potential crash if writing a fragmented psp mp4 (which probably is only a hypothetical scenario). Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
QuickTime does support files with an empty initial movie these days. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 07 11月, 2014 3 次提交
-
-
由 Martin Storsjö 提交于
Previously we wrote decoding timestamps here, while the specs say it should be presentation timestamps. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
When using the new first_trun flag instead of checking the track id, we don't need to have a special case for the separate_moof flag any longer. This simplifies the complicated codepath ever so slightly. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
In this case, shift tracks to start from zero instead (potentially stretching the first sample in tracks that start later than the first one). Some software does not support edit lists at all, the adobe flash player seems to be one of these. This results in AV sync errors when edit lists are used to adjust AV sync. Some players, such as QuickTime, don't respect the duration for audio packets, so if an audio track starts later than the video track and the first audio sample gets a duration longer than the actual amount of data in it, the result will be out of sync. Based on patches by Michael Niedermayer. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 06 11月, 2014 1 次提交
-
-
由 Anton Khirnov 提交于
-
- 31 10月, 2014 3 次提交
-
-
由 Martin Storsjö 提交于
We deviate slightly from the iso specs for these files. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
The tfdt atom shouldn't be needed in those cases, we already write tfxd atoms for ismv anyway, which is roughly equivalent. This avoids having to declare the iso6 brand for ismv files. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
ISO/IEC 14496-12:2012/Cor 1:2013 is explicit about how this should be handled. All zeros doesn't mean that the full file has got a zero duration, only that the track samples described within the initial moov have got zero duration. An all ones duration means an indeterminate duration. Keep writing a duration consisting of all ones for the ISM mode - older windows media player versions won't play a file if this is zero. (Newer windows media player versions play either version fine.) Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 30 10月, 2014 5 次提交
-
-
由 Martin Storsjö 提交于
Similarly to the omit_tfhd_offset flag added in e7bf085b, this avoids writing absolute byte positions to the file, making them more easily streamable. This is a new feature from 14496-12:2012, so application support isn't necessarily too widespread yet (support for it in libav was added in 20f95f21 in July 2014). Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
The custom IO flag actually never is set for muxers, only for demuxers, so the check was pointless (unless a user intentionally would set the flag to signal using custom IO). Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
If one track doesn't have any samples within a moof, no traf/trun is written for it. When the omit_tfhd_offset flag is set, none of the tfhd atoms have any base_data_offset set, and the implicit offset (end of previous track fragment data, or start of the moof for the first trun) is used. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 14 10月, 2014 1 次提交
-
-
由 Martin Storsjö 提交于
These allow getting the absolute start timestamp of a fragment without reading preceding timestamps. This fixes sync between tracks if starting from fragments in different streams that don't align exactly. This also is a prerequisite for producing DASH content. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 12 10月, 2014 5 次提交
-
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
This is necessary to get the right timestamp offset for content that starts with dts != 0. This currently only helps when writing fragmented files with a non-empty moov atom. When writing an empty moov atom, we don't have any packets yet, so we don't know the starting dts for the tracks. Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Martin Storsjö 提交于
Signed-off-by: NMartin Storsjö <martin@martin.st>
-
由 Michael Niedermayer 提交于
This makes sure that audio preroll for e.g. AAC is signaled correctly. Previously we only wrote the edit list correctly if we had negative dts but started with pts == 0 (e.g. for video with B-frames). Signed-off-by: NMartin Storsjö <martin@martin.st>
-
- 04 9月, 2014 1 次提交
-
-
由 Diego Biurrun 提交于
This reduces inter-library dependencies.
-
- 15 8月, 2014 2 次提交
-
-
由 Gabriel Dume 提交于
Signed-off-by: NDiego Biurrun <diego@biurrun.de>
-
由 Gabriel Dume 提交于
Signed-off-by: NDiego Biurrun <diego@biurrun.de>
-
- 07 8月, 2014 3 次提交
-
-
由 John Stebbins 提交于
An encoding ("encd") box is required to tell QT that the string is UTF8
-
由 John Stebbins 提交于
-
由 John Stebbins 提交于
-
- 05 8月, 2014 1 次提交
-
-
由 John Stebbins 提交于
And add flag to muxer documentation. Nero chapters break some taggers (mp3tag and iTunes). Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
-