aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit '3847f3ab58b3b74604807394247bf68827258103'Michael Niedermayer2014-11-171-4/+0
|\| | | | | | | | | | | | | * commit '3847f3ab58b3b74604807394247bf68827258103': movenc: Add tfra entries for all tracks in a moof Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add tfra entries for all tracks in a moofMartin Storsjö2014-11-171-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '2ded57371abead879bcee56da5131e5fac0d17ef'Michael Niedermayer2014-11-171-2/+80
|\| | | | | | | | | | | | | | | | | | | | | * 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-171-2/+80
| | | | | | | | | | | | | | | | | | | | 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-171-28/+49
|\| | | | | | | | | | | | | * 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-171-28/+49
| | | | | | | | | | | | | | | | 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 '0f9eb9165bb7d7982fdedf64f6bcec856f1bedd6'Michael Niedermayer2014-11-171-1/+1
|\| | | | | | | | | | | | | * commit '0f9eb9165bb7d7982fdedf64f6bcec856f1bedd6': movenc: Include empty tracks in iods when writing fragmented mp4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Include empty tracks in iods when writing fragmented mp4Martin Storsjö2014-11-171-1/+1
| | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '9a5ac36b69ede4563e9ecd734141b12ea3280fbc'Michael Niedermayer2014-11-081-5/+8
|\| | | | | | | | | | | | | | | | | | | * commit '9a5ac36b69ede4563e9ecd734141b12ea3280fbc': movenc: Require samples before trying to write edts Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Require samples before trying to write edtsMartin Storsjö2014-11-081-3/+3
| | | | | | | | | | | | | | This avoids a potential crash if writing a fragmented psp mp4 (which probably is only a hypothetical scenario). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8cb7b7b461b52898765b38e3eff68c0ce88347f3'Michael Niedermayer2014-11-081-6/+13
|\| | | | | | | | | | | | | | | | | | | * commit '8cb7b7b461b52898765b38e3eff68c0ce88347f3': movenc: Avoid leaking locally allocated data when returning on errors Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Avoid leaking locally allocated data when returning on errorsMartin Storsjö2014-11-081-6/+12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '95a449d3ce8e15522df47a80a8a4593ea5c2b1bb'Michael Niedermayer2014-11-081-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit '95a449d3ce8e15522df47a80a8a4593ea5c2b1bb': movenc: Remove an outdated comment Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Remove an outdated commentMartin Storsjö2014-11-081-1/+1
| | | | | | | | | | | | | | QuickTime does support files with an empty initial movie these days. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '9cbf70fa0e44613590b019cef1fe99aa3f3c5d9d'Michael Niedermayer2014-11-081-0/+11
|\| | | | | | | | | | | | | | | | | | | * commit '9cbf70fa0e44613590b019cef1fe99aa3f3c5d9d': movenc: Write correct presentation timestamps in tfra Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write correct presentation timestamps in tfraMartin Storsjö2014-11-071-0/+11
| | | | | | | | | | | | | | Previously we wrote decoding timestamps here, while the specs say it should be presentation timestamps. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e7d20f12c5eff5570cd897f3ce3a88456024036b'Michael Niedermayer2014-11-081-1/+1
|\| | | | | | | | | | | | | * commit 'e7d20f12c5eff5570cd897f3ce3a88456024036b': movenc: Remove a now redundant check Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Remove a now redundant checkMartin Storsjö2014-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '1d8a0c1b43e58332a3a15c67d4adc161713cade8'Michael Niedermayer2014-11-081-12/+32
|\| | | | | | | | | | | | | | | | | | | | | * 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-071-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 '91e8d2eb1f7bf3af949008b106ec1ca037b88b0e'Michael Niedermayer2014-11-061-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit '91e8d2eb1f7bf3af949008b106ec1ca037b88b0e': lavf: use the format context strict_std_compliance instead of the codec one Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use the format context strict_std_compliance instead of the codec oneAnton Khirnov2014-11-061-1/+1
| |
* | lavf/movenc: Write G.726 bitrate to make the files decodable.Carl Eugen Hoyos2014-11-031-0/+2
| | | | | | | | Fixes ticket #4069.
* | Merge commit 'aae6b3b918b4133b8cc2d1631196c1d406d0351a'Michael Niedermayer2014-10-311-2/+0
|\| | | | | | | | | | | | | * commit 'aae6b3b918b4133b8cc2d1631196c1d406d0351a': movenc: Don't write any iso brands in ismv files Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't write any iso brands in ismv filesMartin Storsjö2014-10-301-2/+0
| | | | | | | | | | | | We deviate slightly from the iso specs for these files. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c55d1d382cd41345a79782ace41f9b43f45dca9a'Michael Niedermayer2014-10-311-2/+3
|\| | | | | | | | | | | | | * commit 'c55d1d382cd41345a79782ace41f9b43f45dca9a': movenc: Don't write any tfdt atom for ismv files Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't write any tfdt atom for ismv filesMartin Storsjö2014-10-301-2/+3
| | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '00c67fe1d0bc7c2ce49daac9c80ea39d5a663b73'Michael Niedermayer2014-10-311-6/+12
|\| | | | | | | | | | | | | * commit '00c67fe1d0bc7c2ce49daac9c80ea39d5a663b73': movenc: Write a 0 duration in mdhd and tkhd for an empty initial moov Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write a 0 duration in mdhd and tkhd for an empty initial moovMartin Storsjö2014-10-301-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit 'cf589faa5b7aed3bb38e08dcd00bd951e69686d1'Michael Niedermayer2014-10-311-3/+11
|\| | | | | | | | | | | | | | | | | | | * 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-291-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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 '600d5ee6b12bad144756b0772319bb04796bc528'Michael Niedermayer2014-10-301-0/+5
|\| | | | | | | | | | | | | * commit '600d5ee6b12bad144756b0772319bb04796bc528': movenc: Signal iso6 in compatible_brands when using tfdt Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Signal iso6 in compatible_brands when using tfdtMartin Storsjö2014-10-291-0/+5
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1e0b81abe86dc09dd34d60d57f92de5f12d65818'Michael Niedermayer2014-10-301-1/+1
|\| | | | | | | | | | | | | * commit '1e0b81abe86dc09dd34d60d57f92de5f12d65818': movenc: Use a local variable consistently Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Use a local variable consistentlyMartin Storsjö2014-10-291-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b2b79eca6fae2466a53c5daa163a37e2474364fc'Michael Niedermayer2014-10-301-3/+2
|\| | | | | | | | | | | | | * commit 'b2b79eca6fae2466a53c5daa163a37e2474364fc': movenc: Don't check the custom IO flag when using faststart Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't check the custom IO flag when using faststartMartin Storsjö2014-10-291-3/+2
| | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6'Michael Niedermayer2014-10-301-1/+3
|\| | | | | | | | | | | | | * 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-291-1/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'Michael Niedermayer2014-10-141-0/+13
|\| | | | | | | | | | | | | * commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea': movenc: Write tfdt atoms Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write tfdt atomsMartin Storsjö2014-10-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | avformat/movenc: add support for syncframes concatenation for E-AC-3.Benoit Fouet2014-10-131-6/+37
| | | | | | | | | | | | | | E-AC-3 samples should contain 6 audio blocks, so concatenate syncframes in order to achieve this. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e44ee1eb8db7393e9d43207c2e1812720e292e6d'Michael Niedermayer2014-10-131-1/+1
|\| | | | | | | | | | | | | * commit 'e44ee1eb8db7393e9d43207c2e1812720e292e6d': movenc: Simplify code by using an existing local pointer Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Simplify code by using an existing local pointerMartin Storsjö2014-10-121-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'dad12ce452a9d69c0d9d53c375003947d5f1b02e'Michael Niedermayer2014-10-131-1/+7
|\| | | | | | | | | | | | | | | | | | | * commit 'dad12ce452a9d69c0d9d53c375003947d5f1b02e': movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Print a warning for an unhandled case of nonzero start dts with ↵Martin Storsjö2014-10-121-1/+7
| | | | | | | | | | | | empty_moov Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'dbb472cb2f2f799295a12b4922a6a8be2cccfdee'Michael Niedermayer2014-10-131-2/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dbb472cb2f2f799295a12b4922a6a8be2cccfdee': movenc: Write edit lists for fragmented files as well, if necessary Conflicts: libavformat/movenc.c The default for writing EDTS for fragmented mp4 is left at disabled this can be overridden via command line with -use_editlist but EDTS + fragments still does not fully work, which is why it is left disabled by default Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write edit lists for fragmented files as well, if necessaryMartin Storsjö2014-10-121-3/+10
| | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '95ee4e2ce774e0339632d067161596bf3dadfc72'Michael Niedermayer2014-10-121-0/+8
|\| | | | | | | | | | | | | * commit '95ee4e2ce774e0339632d067161596bf3dadfc72': movenc: Add some comments explaining subtle details in writing the edit lists Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add some comments explaining subtle details in writing the edit listsMartin Storsjö2014-10-121-0/+8
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>