summaryrefslogtreecommitdiff
path: root/libavformat/movenc.h
Commit message (Collapse)AuthorAge
...
| * movenc: Add an option for delaying writing the moov with empty_moovMartin Storsjö2015-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | * commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0': movenc: Adjust the pts of new fragments similarly to what is done for dts Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Adjust the pts of new fragments similarly to what is done for dtsMartin Storsjö2014-12-18
| | | | | | | | | | | | | | The pts and the corresponding duration is written in sidx atoms, thus make sure these match up correctly. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ee37620b6ae4783cda637408422044b2d14a688c'Michael Niedermayer2014-11-26
|\| | | | | | | | | | | | | | | | | | | * commit 'ee37620b6ae4783cda637408422044b2d14a688c': movenc: Add a flag for indicating a discontinuous fragment Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add a flag for indicating a discontinuous fragmentMartin Storsjö2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '40ed1cbf147d09fc0894bee160f0b6b6d9159fc5'Michael Niedermayer2014-11-17
|\| | | | | | | | | | | | | | | | | | | * commit '40ed1cbf147d09fc0894bee160f0b6b6d9159fc5': movenc: Allow writing a DASH sidx atom at the start of files Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Allow writing a DASH sidx atom at the start of filesMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '2ded57371abead879bcee56da5131e5fac0d17ef'Michael Niedermayer2014-11-17
|\| | | | | | | | | | | | | | | | | | | | | * commit '2ded57371abead879bcee56da5131e5fac0d17ef': movenc: Add support for writing sidx atoms for DASH segments Conflicts: Changelog libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add support for writing sidx atoms for DASH segmentsMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '2d9d6afb8d2f284f5e620ecc19f643d5cd3facb8'Michael Niedermayer2014-11-17
|\| | | | | | | | | | | | | * commit '2d9d6afb8d2f284f5e620ecc19f643d5cd3facb8': movenc: Factorize adding fragment info into a separate function Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Factorize adding fragment info into a separate functionMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '1d8a0c1b43e58332a3a15c67d4adc161713cade8'Michael Niedermayer2014-11-08
|\| | | | | | | | | | | | | | | | | | | | | * commit '1d8a0c1b43e58332a3a15c67d4adc161713cade8': movenc: Allow to request not to use edit lists Conflicts: libavformat/movenc.c See: 537ef8bebf8a35aab448db6ec876e275a10f0f15 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Allow to request not to use edit listsMartin Storsjö2014-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '2f221b6a9365aa400061e16266f2d1242f7169f8'Michael Niedermayer2014-11-03
|\| | | | | | | | | | | | | * commit '2f221b6a9365aa400061e16266f2d1242f7169f8': movenc: Define the flag bits using shifts instead of as decimal numbers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Define the flag bits using shifts instead of as decimal numbersMartin Storsjö2014-11-03
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'cf589faa5b7aed3bb38e08dcd00bd951e69686d1'Michael Niedermayer2014-10-31
|\| | | | | | | | | | | | | | | | | | | * commit 'cf589faa5b7aed3bb38e08dcd00bd951e69686d1': movenc: Add a flag for using default-base-is-moof in tfhd atoms Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add a flag for using default-base-is-moof in tfhd atomsMartin Storsjö2014-10-29
| | | | | | | | | | | | | | | | | | | | | | | | 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 20f95f21f in July 2014). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6'Michael Niedermayer2014-10-30
|\| | | | | | | | | | | | | * commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6': movenc: Don't use track_id to decide which track is the first in a moof Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't use track_id to decide which track is the first in a moofMartin Storsjö2014-10-29
| | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | avformat/movenc: add EAC3 muxing support.Benoit Fouet2014-10-10
| | | | | | | | | | | | | | | | | | Support only one independent substream right now, and only syncframes containing 6 blocks. Fixes part of ticket #3074 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'da9cc22d5bd5f59756c2037b02966376da2cf323'Michael Niedermayer2014-08-07
|\| | | | | | | | | | | | | | | | | | | * commit 'da9cc22d5bd5f59756c2037b02966376da2cf323': movenc: add track title to tracks Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: add track title to tracksJohn Stebbins2014-08-06
| |
* | Merge commit '0897d2fdc7755849c3ae58d8b543ef734c200d3c'Michael Niedermayer2014-08-05
|\| | | | | | | | | | | | | | | | | | | * commit '0897d2fdc7755849c3ae58d8b543ef734c200d3c': movenc: Add option to disable nero chapters Conflicts: doc/muxers.texi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add option to disable nero chaptersJohn Stebbins2014-08-05
| | | | | | | | | | | | | | And add flag to muxer documentation. Nero chapters break some taggers (mp3tag and iTunes). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/movenc: dont mark multichannel as mono tracks as containing the ↵Michael Niedermayer2014-07-14
| | | | | | | | | | | | | | | | center channel Fixes Ticket3727 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f90729699db9ede2bef2b28000f1795dab1b8996'Michael Niedermayer2014-07-11
|\| | | | | | | | | | | | | | | | | | | * commit 'f90729699db9ede2bef2b28000f1795dab1b8996': mov: Do not group tracks if more than one is enabled per type Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Do not group tracks if more than one is enabled per typeLuca Barbato2014-07-11
| | | | | | | | The specification requires at most 1 track enabled per alternate group.
* | Merge commit '0ba5299a805e9ccaef1a757381fc2ada4d54b8a1'Michael Niedermayer2014-05-18
|\| | | | | | | | | | | | | | | | | | | | | * commit '0ba5299a805e9ccaef1a757381fc2ada4d54b8a1': movenc: use the "encoder" metadata tag to write stsd Compressorname Conflicts: libavformat/movenc.c libavformat/movenc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: use the "encoder" metadata tag to write stsd CompressornameAnton Khirnov2014-05-18
| | | | | | | | | | This mirrors the demuxer behaviour and avoids accessing AVCodecContext.codec, which should not be done in muxers.
* | Merge commit '1e9db41e2a2166be5671b088ef4ad06a40af459f'Michael Niedermayer2014-03-23
|\| | | | | | | | | | | | | | | | | | | * commit '1e9db41e2a2166be5671b088ef4ad06a40af459f': movenc: Allow override of major brand in ftyp atom Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Allow override of major brand in ftyp atomJohn Stebbins2014-03-23
| | | | | | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com>
| * movenc: Add an F4V muxerClément Bœsch2013-10-23
| | | | | | | | | | | | | | | | F4V is Adobe's mp4/iso media variant, with the most significant addition/change being supporting other flash codecs than just aac/h264. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/movenc: only ommit encoder tag of the metadata for bitexact modeMichael Niedermayer2014-03-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: make AVStream easier to accessMichael Niedermayer2013-10-12
| | | | | | | | | | | | This adds a AVStream pointer to Track Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-18
|\| | | | | | | | | | | | | | | | | | | * qatar/master: movenc: Add an option for omitting the tfhd base offset Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add an option for omitting the tfhd base offsetMartin Storsjö2013-09-17
| | | | | | | | | | | | | | | | | | | | This makes the output fragments independent of their position in the output stream, making the output work better when streamed. QuickTime Player doesn't support fragmented mp4 without the base data offset, though. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4'Michael Niedermayer2013-09-18
|\| | | | | | | | | | | | | * commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4': movenc: Write the moof atom in two passes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write the moof atom in two passesMartin Storsjö2013-09-17
| | | | | | | | | | | | | | | | | | | | | | This is a bit more work, but avoids having to fill in the data offset field afterwards instead of directly when the rest of the trun atom is written. This simplifies future cases where this field needs to be set to something different. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-08-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: movenc: Make tkhd "enabled" flag QuickTime compatible Conflicts: libavformat/movenc.c tests/ref/acodec/alac tests/ref/acodec/pcm-s16be tests/ref/acodec/pcm-s24be tests/ref/acodec/pcm-s32be tests/ref/acodec/pcm-s8 tests/ref/lavf/mov tests/ref/vsynth/vsynth1-dnxhd-1080i tests/ref/vsynth/vsynth1-mpeg4 tests/ref/vsynth/vsynth1-prores tests/ref/vsynth/vsynth1-qtrle tests/ref/vsynth/vsynth1-svq1 tests/ref/vsynth/vsynth2-dnxhd-1080i tests/ref/vsynth/vsynth2-mpeg4 tests/ref/vsynth/vsynth2-prores tests/ref/vsynth/vsynth2-qtrle tests/ref/vsynth/vsynth2-svq1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Make tkhd "enabled" flag QuickTime compatibleJohn Stebbins2013-08-23
| | | | | | | | | | | | | | | | 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>
* | Merge commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b'Michael Niedermayer2013-08-22
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b': movenc: add faststart option for web streaming Conflicts: doc/muxers.texi libavformat/movenc.c libavformat/movenc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: add faststart option for web streamingClément Bœsch2013-08-21
| | | | | | | | | | | | | | 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>
* | Merge commit '7c020e1ad37d27c9d5db4d714401f09c80e3cc44'Michael Niedermayer2013-06-05
|\| | | | | | | | | | | | | * commit '7c020e1ad37d27c9d5db4d714401f09c80e3cc44': movenc: Grow the frag_info array in chunks Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Grow the frag_info array in chunksAndrey Semashev2013-06-04
| | | | | | | | | | | | | | | | Previously it was grown one element at a time, which leads to excessive reallocations. Bug-Id: 525 Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ab1189766a82a95f108005463cde75f73fcc0ae5'Michael Niedermayer2013-06-05
|\| | | | | | | | | | | | | * commit 'ab1189766a82a95f108005463cde75f73fcc0ae5': movenc: Increase the cluster array allocation by doubling Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Increase the cluster array allocation by doublingAndrey Semashev2013-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous allocation increment of 16384 meant that the cluster array was allocated for 0.6 MB initially, which is a bit excessive for cases with fragmentation where only a fraction of that ever actually is used. Therefore, start off at a much smaller value, and increase by doubling (to avoid reallocating too often when writing long non-fragmented mp4 files). Bug-Id: 525 Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e'Michael Niedermayer2013-06-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e': movenc: Keep track of the allocated size for the cluster array mem: Add av_realloc_array and av_reallocp_array Conflicts: doc/APIchanges libavformat/movenc.c libavutil/mem.c libavutil/mem.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Keep track of the allocated size for the cluster arrayAndrey Semashev2013-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | When writing fragmented mp4, the cluster array is reset when a fragment is written. Instead of starting off reallocating the array only based on the number of current elements in it, keep track of how many elements there were allocated earlier. This avoids reallocating this array needlessly when writing fragmented mp4 files. Bug-Id: 525 Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-03
|\| | | | | | | | | | | | | * qatar/master: movenc: Change the track struct name to match the typedef Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Change the track struct name to match the typedefMartin Storsjö2013-06-03
| | | | | | | | | | | | | | | | This makes the struct name (which isn't used anywhere) match the name of the typedef, as for all the other structs declared in this header. Signed-off-by: Martin Storsjö <martin@martin.st>