summaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAgeFilesLines
* mov: Clarify tkhd flag settingsLuca Barbato2014-07-111-3/+6
|
* mov: Do not group tracks if more than one is enabled per typeLuca Barbato2014-07-111-5/+16
| | | | The specification requires at most 1 track enabled per alternate group.
* lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov2014-06-181-6/+8
| | | | | | | | | | | | Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
* movenc: write avg_frame_rate as the framerate, not the codec timebaseAnton Khirnov2014-05-291-1/+7
|
* movenc: use the "encoder" metadata tag to write stsd CompressornameAnton Khirnov2014-05-181-2/+5
| | | | | This mirrors the demuxer behaviour and avoids accessing AVCodecContext.codec, which should not be done in muxers.
* lavf: add AVFMT_FLAG_BITEXACT.Anton Khirnov2014-05-151-1/+1
| | | | | | | | Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's codec context. Using codec options inside lavf is fragile and can easily break when the muxing codec context is not the encoding context.
* mov: Emit the correct tags for clcp tracksMiles Gould2014-04-251-6/+24
| | | | | | Bug-Id: 664 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Write prof section of tapt tagAidan Skinner2014-04-251-0/+6
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* More correct printf format specifiersDiego Biurrun2014-04-021-2/+5
| | | | This avoids compiler warnings about argument and specifier type mismatch.
* mov: Unbreak sbtl writingMichael Niedermayer2014-03-311-3/+7
|
* movenc: Add dvd subtitle supportJohn Stebbins2014-03-281-5/+78
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* movenc: Allow override of major brand in ftyp atomJohn Stebbins2014-03-231-1/+4
| | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com>
* movenc: allow muxing HEVC in MODE_MP4.Tim Walker2014-03-091-0/+1
|
* movenc: enable Annex B to MP4 conversion for HEVC tracks.Tim Walker2014-03-091-0/+9
|
* movenc: write hvcC tag for HEVC.Tim Walker2014-03-091-0/+13
|
* movenc: allow override of "writing application" tagJohn Stebbins2014-03-081-1/+2
| | | | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com> CC: libav-stable@libav.org
* movenc: Add a fallback fragmentation method for plain mp4 as wellMartin Storsjö2014-02-191-4/+2
| | | | | | | Previously the default fragmentation method was only enabled if writing an ISM file. Signed-off-by: Martin Storsjö <martin@martin.st>
* Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-231-0/+2
|
* movenc: Add an F4V muxerClément Bœsch2013-10-231-1/+37
| | | | | | | | 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>
* movenc: Return a proper error code for invalid combinationsMartin Storsjö2013-09-221-2/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use keyframes as default fragmentation point in ismvMartin Storsjö2013-09-221-1/+1
| | | | | | | | Fragmenting blindly to a certain duration isn't a good choice if one should be able to switch between different qualities, therefore default to keyframes instead. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set all implicit flags immediately in mov_write_headerMartin Storsjö2013-09-221-2/+5
| | | | | | | | This makes sure other sanity checks for conflicting options can work properly, e.g. for the conflict between the faststart flag when using the ismv mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set mov->mode earlier in mov_write_headerMartin Storsjö2013-09-221-18/+19
| | | | | | | This allows simplifying some early checks that depend on the muxer mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use null buffers for measuring the amount of data to be writtenMartin Storsjö2013-09-191-12/+6
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add an option for omitting the tfhd base offsetMartin Storsjö2013-09-171-7/+16
| | | | | | | | | | 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>
* movenc: Write the moof atom in two passesMartin Storsjö2013-09-171-22/+25
| | | | | | | | | | | 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>
* movenc: Simplify setting the fragmentation flagMartin Storsjö2013-09-091-5/+3
| | | | | | | This makes sure the faststart vs fragmentation check works as intended when fragmentation is enabled due to using the ismv mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add a warning message if conflicting options have been specifiedMartin Storsjö2013-09-091-1/+4
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't flush after each written packetMartin Storsjö2013-09-031-2/+0
| | | | | | | | | | This should improve write performance quite significantly. --- Tested with both writing a normal mp4, by using the faststart feature and writing a fragmented mp4 file; all turn out with the same md5sum as before. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Check for errors from mov_create_chapter_trackMartin Storsjö2013-08-271-2/+5
| | | | | | | | | | | On failures in the write_trailer function, we could also ignore the errors and try to finish the file despite these errors (which would only leave an incomplete chapters track). It's probably better to signal the error clearly to the caller though (and if this function failed there's no guarantee that there's enough memory to finish the trailer either). Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Properly free allocated data on failures in mov_write_headerMartin Storsjö2013-08-271-15/+26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Check that tracks->enc exists before trying to free extradataMartin Storsjö2013-08-271-1/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Check for allocation failures in mov_create_chapter_trackMartin Storsjö2013-08-271-0/+4
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Write tmcd extradataLuca Barbato2013-08-251-0/+17
|
* movenc: Make tkhd "enabled" flag QuickTime compatibleJohn Stebbins2013-08-231-1/+55
| | | | | | | | 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>
* movenc: fix detection of 64bit offset requirementClément Bœsch2013-08-211-3/+9
| | | | | | The old method doesn't work when moov is relocated to beginning of file Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Make chapter track QuickTime compatibleJohn Stebbins2013-08-211-2/+13
| | | | | | QuickTime requires that the stsd.text box be completely filled in. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: add faststart option for web streamingClément Bœsch2013-08-211-4/+133
| | | | | | | 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>
* movenc: Allow chapters to be written in trailerJohn Stebbins2013-08-201-2/+15
| | | | | | | | 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>
* movenc: Allow chapter track in default MODE_MP4John Stebbins2013-08-201-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Prevent segfaults on mov_write_hdlr_tagLuca Barbato2013-08-201-5/+16
| | | | | Do not segfault when writing tracks such as tmcd by writing them down as generic DataHandlers if not known.
* mov: Compute max duration among the tracks with a timescaleLuca Barbato2013-08-201-1/+1
| | | | Prevent an assert.
* mov: Set the timescale for data streamsLuca Barbato2013-08-201-0/+2
| | | | Data streams have a defined timebase, do not ignore it.
* movenc: Indicate that negative timestamps are supportedMartin Storsjö2013-08-171-7/+7
| | | | | | | | | | | | | The mov/mp4 muxer has support for handling negative timestamps via edit lists (which customarily is used for handling the 1-frame delay due to B-frames as well). Using the muxer's native way of handling it is better than using the generic offsetting. The generic offsetting is a bit too crude when e.g. the timebase of one track is 1/fps, where the edit lists can handle it accurately. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: K&R formatting cosmeticsMartin Storsjö2013-07-071-189/+189
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Grow the frag_info array in chunksAndrey Semashev2013-06-041-3/+8
| | | | | | | | 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>
* movenc: Increase the cluster array allocation by doublingAndrey Semashev2013-06-041-1/+1
| | | | | | | | | | | | | | 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>
* movenc: Keep track of the allocated size for the cluster arrayAndrey Semashev2013-06-041-4/+6
| | | | | | | | | | | | | 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>
* movenc: Don't add base_data_offset in tfhd for PIFF filesJeremy Hinegardner2013-05-171-2/+4
| | | | | | | | | | | According to the PIFF specification[1] the base_data_offset field MUST be omitteed. See section 5.2.17. Since the ISMV files created by libavformat state that they are 'piff' compatible via 'ftyp' box, this needs to be corrected. [1] http://www.iis.net/learn/media/smooth-streaming/protected-interoperable-file-format Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Simplify code by using avio_wb24Martin Storsjö2013-01-301-2/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
OpenPOWER on IntegriCloud