summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAge
* 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>
* movenc: Return a proper error code for invalid combinationsMartin Storsjö2013-09-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use keyframes as default fragmentation point in ismvMartin Storsjö2013-09-22
| | | | | | | | 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-22
| | | | | | | | 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-22
| | | | | | | 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-19
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* 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>
* movenc: Simplify setting the fragmentation flagMartin Storsjö2013-09-09
| | | | | | | 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-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Don't flush after each written packetMartin Storsjö2013-09-03
| | | | | | | | | | 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-27
| | | | | | | | | | | 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-27
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Check that tracks->enc exists before trying to free extradataMartin Storsjö2013-08-27
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Check for allocation failures in mov_create_chapter_trackMartin Storsjö2013-08-27
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Write tmcd extradataLuca Barbato2013-08-25
|
* 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>
* movenc: fix detection of 64bit offset requirementClément Bœsch2013-08-21
| | | | | | 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-21
| | | | | | 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-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>
* movenc: Allow chapters to be written in trailerJohn Stebbins2013-08-20
| | | | | | | | 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-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Prevent segfaults on mov_write_hdlr_tagLuca Barbato2013-08-20
| | | | | 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-20
| | | | Prevent an assert.
* mov: Set the timescale for data streamsLuca Barbato2013-08-20
| | | | Data streams have a defined timebase, do not ignore it.
* movenc: Indicate that negative timestamps are supportedMartin Storsjö2013-08-17
| | | | | | | | | | | | | 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-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* 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>
* 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>
* movenc: Don't add base_data_offset in tfhd for PIFF filesJeremy Hinegardner2013-05-17
| | | | | | | | | | | 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-30
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: set the payload type as stream idLuca Barbato2012-11-14
| | | | | | | Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-01
| | | | statements
* lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-15
| | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-30
|
* lavf: use conditional notation for default codec in muxer declarations.Ronald S. Bultje2012-07-22
| | | | | This removes the use of macro nesting in these code constructs, which makes it easier to parse in pre-processors.
* rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.Ronald S. Bultje2012-07-21
| | | | | | | This makes usage of the macro look more natural when used with array entries. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mov: Support muxing/demuxing iLBCMartin Storsjö2012-06-18
| | | | | | | The packet size, signalled via block_align, has to be passed via the container. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write chan atom for all audio tracks in mov mode movies.Alex Converse2012-06-04
|
* movenc: Don't write the 'wave' atom or its child 'enda' for lpcm audio.Alex Converse2012-05-25
| | | | | It's left over from stsd v0. QuickTime 7 no longer writes 'wave' or 'enda' when 'lpcm' is the audio tag.
* movenc: Support high sample rates in isomedia formats by setting the sample ↵Alex Converse2012-04-20
| | | | | | rate field in stsd to 0. Libisomediafile appears to always set this field to zero.
* movenc: Remove a dead initializationAlex Converse2012-04-12
|
* movenc: small refactor mov_write_packetLuca Barbato2012-04-11
| | | | | | | | | | Share the formerly internal write_packet with the hinter and move the fragment flush logic to the user facing one since it is not concerned about movtrack-only streams. Fixes bug #263 Signed-off-by: Martin Storsjö <martin@martin.st>