aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit '9731cf4001377fa2f75c279072cc2b0cbd57bf8e'Michael Niedermayer2015-03-061-6/+6
|\| | | | | | | | | | | | | | | | | | | | | * commit '9731cf4001377fa2f75c279072cc2b0cbd57bf8e': movenc: Keep writing zero-entry stts atoms as intended Conflicts: libavformat/movenc.c See: 95165f7c1b533c121b890fa1e82e8ed596cfc108 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Keep writing zero-entry stts atoms as intendedMartin Storsjö2015-03-061-6/+6
| | | | | | | | | | | | | | | | a876585215 had the unintended side effect of returning AVERROR(ENOMEM) when track->entry is zero, while the code intentionally wants to continue in that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/movenc: Add support for writing 'gama' atom to QuickTime .mov files.Kevin Wheatley2015-03-051-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As this is depricated it should not be on by default, it is only supported for MOV containers, depends on avpriv_get_gamma_from_trc() Enable by: -movflags +write_gama This will use the color_trc to supply a gamma value, if desired an explicit value may be supplied using the -mov_gamma option supplying a suitable floating point value, values <=1e-6 will not be written. Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: mark write_colr as experimentalMichael Niedermayer2015-03-041-1/+1
| | | | | | | | | | | | This way the flag can be flipped to a nowrite_colr, if people prefer that Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | movenc: Write 'colr' box correctly for MP4Derek Buitenhuis2015-02-271-6/+23
| | | | | | | | | | | | | | This also restricts it to MOV and MP4, since it is only defined for those formats. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat/movenc: Fix writing ACLR atoms for DNxHDKevin Wheatley2015-02-241-4/+27
| | | | | | | | | | | | | | | | | | | | Using the copy codec ACLR atoms where incorrectly written During the creation of the ACLR atom we are assuming the vos_data contains the DNxHD header. This change makes this explicit and ensures we don't over write the stream with the extra_data. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Check for memory allocation failuresMichael Niedermayer2015-02-221-0/+4
| | | | | | | | | | Fixes CID1271049 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Move avid DNxHD padding to the correct spotKevin Wheatley2015-02-201-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Outputting DNxHD into .mov containers 'corrupts' following atoms until end of stsd ffmpeg and qtdump could not decode pasp/colr atoms in the files made by ffmpeg, when outputting DNxHD due to the incorrect padding placement. Now we add the padding in the correct place Tidy up FATE changes due to padding changes. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Fix use of uninitialized variable (ret)Michael Niedermayer2015-02-181-1/+3
| | | | | | | | | | | | Fixed CID1270823 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Fix stts_entries allocation checkMichael Niedermayer2015-02-171-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a8765852158ecb2ae34895fa35ff51dc95c186f9'Michael Niedermayer2015-02-171-0/+10
|\| | | | | | | | | | | | | | | | | | | * commit 'a8765852158ecb2ae34895fa35ff51dc95c186f9': movenc: Check memory allocations Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Check memory allocationsHugo Beauzée-Luyssen2015-02-171-0/+12
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | libavformat: DNxHD in .mov, switch unspecified color_range to mpegKevin Wheatley2015-02-101-1/+2
| | | | | | | | | | | | | | | | | | | | Avid prefers mpeg range [16-235] by default this change brings ffmpeg into line with that. To obtain the old behaviour use '-color_range jpeg' on the command line prior to the ouput filename. Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix standalone compilation of the mov muxer with --disable-optimizations.Carl Eugen Hoyos2015-02-081-1/+5
| | | | | | | | Reported-by: Bernhard Döbler
* | avformat/movenc: remove unneeded #include, there are no assert() only av_assert*Paul B Mahol2015-01-311-3/+0
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/movenc: Add simplistic 'colr' tag writing support to mov containerKevin Wheatley2015-01-261-8/+72
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Check failure of allocation of ctts_entries and propagate errorMichael Niedermayer2015-01-251-12/+39
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: fix cleanup on insufficient reserved_moov_sizeMichael Niedermayer2015-01-251-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Handle r10k endianess atom DpxE.Carl Eugen Hoyos2015-01-111-0/+16
| | | | | | | | | | | | Fixes playback and remuxing of r10k_full-range_big-endian.mov. Reported, analyzed and tested by Olaf Matthes, olaf matthes gmx de
* | avformat/movenc: move variable to a more local blockMichael Niedermayer2015-01-101-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: workaround bug in "PathScale EKOPath(tm) Compiler Suite ↵Michael Niedermayer2015-01-101-1/+2
| | | | | | | | | | | | Version 4.0.12.1" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2a1500fb552364488cfbee3e29e296788a3a6bdd'Michael Niedermayer2015-01-071-1/+1
|\| | | | | | | | | | | | | * commit '2a1500fb552364488cfbee3e29e296788a3a6bdd': movenc: Fix a typo in a comment Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Fix a typo in a commentMartin Storsjö2015-01-061-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e581e88cbdb3323ca0026a54b39a9716a3686e9f'Michael Niedermayer2015-01-071-1/+1
|\| | | | | | | | | | | | | * commit 'e581e88cbdb3323ca0026a54b39a9716a3686e9f': movenc: Readd an accidentally removed condition Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Readd an accidentally removed conditionMartin Storsjö2015-01-061-1/+1
| | | | | | | | | | | | | | This was removed accidentally as part of 847bf598. This could cause groundless warning logging. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '46808fdf04ab113df374157b90b506eb3110daf2'Michael Niedermayer2015-01-051-1/+2
|\| | | | | | | | | | | | | * commit '46808fdf04ab113df374157b90b506eb3110daf2': movenc: Enable editlists by default if delay_moov is enabled Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Enable editlists by default if delay_moov is enabledMartin Storsjö2015-01-041-1/+2
| | | | | | | | | | | | | | Being able to write editlists properly is one of the main points in the delay_moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/movenc: fix DELAY_MOOVMichael Niedermayer2015-01-031-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b3b0b35db2f3b61bf2f0f4fa85f5b6267d83c8fe'Michael Niedermayer2015-01-031-16/+4
|\| | | | | | | | | | | | | * commit 'b3b0b35db2f3b61bf2f0f4fa85f5b6267d83c8fe': movenc: Get rid of a hack for updating the dvc1 atom Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Get rid of a hack for updating the dvc1 atomMartin Storsjö2015-01-031-16/+4
| | | | | | | | | | | | | | Use the more generic approach with the delay_moov flag, instead of having a update mechanism specific to this one single atom. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '847bf5988fec1d3e65c1d8cf0cdb8caf0cfd0c1b'Michael Niedermayer2015-01-031-13/+58
|\| | | | | | | | | | | | | | | | | | | | | * commit '847bf5988fec1d3e65c1d8cf0cdb8caf0cfd0c1b': movenc: Add an option for delaying writing the moov with empty_moov Conflicts: libavformat/movenc.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Add an option for delaying writing the moov with empty_moovMartin Storsjö2015-01-031-13/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avformat/movenc: Use cluster timestamps when available in edtsMichael Niedermayer2015-01-031-3/+17
| | | | | | | | | | | | Also print both if they differ Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c725faebda9a516766d94c33b07972ab0f70cf93'Michael Niedermayer2015-01-031-6/+5
|\| | | | | | | | | | | | | | | | | | | * commit 'c725faebda9a516766d94c33b07972ab0f70cf93': movenc: Use start_dts/cts instead of cluster[0] for writing edit lists Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Use start_dts/cts instead of cluster[0] for writing edit listsMartin Storsjö2015-01-031-5/+5
| | | | | | | | | | | | | | This allows writing edit lists even when track->entry == 0, if the start times have been set. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '724cbea7193945fe5a5b4dea8ede344803572844'Michael Niedermayer2015-01-031-1/+1
|\| | | | | | | | | | | | | * commit '724cbea7193945fe5a5b4dea8ede344803572844': movenc: Remove an unnecessary condition when flushing fragments Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Remove an unnecessary condition when flushing fragmentsMartin Storsjö2015-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit '355d01a1bf55297b1d1f04e4bfbf0ddc93b6247e'Michael Niedermayer2015-01-031-19/+29
|\| | | | | | | | | | | | | | | | | | | * commit '355d01a1bf55297b1d1f04e4bfbf0ddc93b6247e': movenc: Factorize writing ftyp and other identification tags to a separate function Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Factorize writing ftyp and other identification tags to a separate ↵Martin Storsjö2015-01-031-9/+17
| | | | | | | | | | | | function Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '59f0275dd0a42a7f90271a83a78e9ca5e69ff5b0'Michael Niedermayer2014-12-191-0/+9
|\| | | | | | | | | | | | | * 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-181-0/+9
| | | | | | | | | | | | | | 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>
* | Allow mov musing if the ac3 parser was disabled.Carl Eugen Hoyos2014-12-091-1/+1
| | | | | | | | | | This reverts 8091fe30. Reported and tested by Takashi, ffmpeg-list dubistmeinheld de
* | avformat/movenc: Add 2048x1080 to the aivx caseRens Dijkshoorn2014-12-081-1/+2
| | | | | | | | | | | | This improves compatibility of such files with apple tools Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support muxing 4k AVC Intra in mov.Carl Eugen Hoyos2014-12-021-0/+3
| | | | | | | | Reported and tested by Rens Dijkshoorn, rens onlinemedia nl
* | Merge commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa'Michael Niedermayer2014-11-261-0/+1
|\| | | | | | | | | | | | | * commit '234fb81e3145e9c9aec4ec16266676fab7dc21fa': movenc: Expose the fragment index as an avoption Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Expose the fragment index as an avoptionMartin Storsjö2014-11-261-0/+1
| | | | | | | | | | | | | | | | 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: Martin Storsjö <martin@martin.st>
* | Merge commit 'ee37620b6ae4783cda637408422044b2d14a688c'Michael Niedermayer2014-11-261-6/+28
|\| | | | | | | | | | | | | | | | | | | * 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-261-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-24/+92
|\| | | | | | | | | | | | | | | | | | | * 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-171-26/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>