summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
Commit message (Collapse)AuthorAge
* matroskaenc: Provide output bytestream markersMartin Storsjö2016-05-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* matroska: Write the field order informationLuca Barbato2016-04-03
| | | | And bump the document version to 4.
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* avpacket: Deprecate av_dup_packetLuca Barbato2015-10-26
| | | | | As documented, `av_dup_packet` is broken by design, `av_packet_ref` matches the AVFrame ref-counted API and can be safely used instead.
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* matroskaenc: Don't write a track language tagJohn Stebbins2015-10-03
| | | | | | | | | "language" is not an offical matroska tag. Track languages are specified with the MATROSKA_ID_TRACKLANGUAGE ebml. Writing the tag overrides the ebml specified language during playback with libav and some other players. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-29
| | | | | | | | | Note that convergence_duration had another meaning, one which was in practice never used. The only real use for it was a 64 bit replacement for the duration field. It's better just to make duration 64 bits, and to get rid of it. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* webm: Explicitly select libvpx, libopus and libvorbis encodersLuca Barbato2015-08-25
| | | | | | | | And update the preference for the newer codecs now that the libraries seem stable and widespread enough. Bug-Id: 695 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mkv: Correctly report the latest packet had been flushedLuca Barbato2015-06-09
| | | | | Bug-Id: 865 CC: libav-stable@libav.org
* matroskadec: export cover art correctlywm42015-04-08
| | | | | | | | | | | | | | | | | | Generally, libavformat exports cover art pictures as video streams with 1 packet and AV_DISPOSITION_ATTACHED_PIC set. Only matroskadec exported it as attachment with codec_id set to AV_CODEC_ID_MJPEG. Obviously, this should be consistent, so change the Matroska demuxer to export a AV_DISPOSITION_ATTACHED_PIC pseudo video stream. Matroska muxing is probably incorrect too. I know that it can create broken files with an audio track and just 1 video frame when e.g. remuxing mp3 with APIC to mkv. But for now this commit does not change anything about muxing, and also continues to write attachments with AV_CODEC_ID_MJPEG should the muxer application have special knowledge that the Matroska is broken in this way. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* matroskaenc: Fix type used for chapter timestampsVittorio Giovara2015-03-11
|
* matroskaenc: Also validate chapter end timeVittorio Giovara2015-03-09
| | | | | | | This prevents it to be written as unsigned. Also add an error message. CC: libav-stable@libav.org Bug-Id: CID 1265717
* matroskaenc: Allow writing track "forced" flagJohn Stebbins2015-02-24
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* matroskaenc: Validate chapter start and end timesVittorio Giovara2015-02-17
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1265717
* avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* matroskaenc: refuse to write AAC without valid extradataAnton Khirnov2015-01-09
|
* check memory errors from av_strdup()Vittorio Giovara2014-12-18
|
* mkv: Validate ASS Start and End fieldsLuca Barbato2014-12-03
| | | | CC: libav-stable@libav.org
* matroskaenc: write correct Display{Width, Height} in stereo encodingVittorio Giovara2014-10-27
| | | | | | | | | | | | | should be the raw amount of pixels (for example 3840x1080 for full HD side by side) and the DisplayWidth/Height in pixels should be the amount of pixels for one plane (1920x1080 for that full HD stream)." So, move the aspect ratio check in the mkv_write_stereo_mode() function and always write the embl when stereo format and/or aspect ration is set. Also add a few comments to that function. CC: libav-stable@libav.org Found-by: Asan Usipov <asan.usipov@gmail.com>
* matroskaenc: check avio_open_dyn_buf return valueVittorio Giovara2014-10-24
| | | | | CC: libav-stable@libav.org Bug-Id: CID 703629
* lavf: use initial_padding instead of deprecated delayAnton Khirnov2014-10-13
|
* matroskaenc: convert avstream stereo3d side data during encodingVittorio Giovara2014-08-28
| | | | Write the StereoMode Embl to bitstream.
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* matroska: Factor out mkv_write_stereo_modeLuca Barbato2014-07-01
|
* matroska: Factor out write_track from mkv_write_tracksLuca Barbato2014-07-01
|
* matroska: K&R formatting cosmeticsLuca Barbato2014-07-01
|
* flac muxer: support reading updated extradata from side dataAnton Khirnov2014-06-01
|
* matroskaenc: Allow VP9 and Opus in webmTudor Suciu2014-06-01
| | | | | | Bug-Id: 695 Signed-off-by: Anton Khirnov <anton@khirnov.net>
* matroskaenc: set the stream timebase earlierAnton Khirnov2014-05-29
| | | | Fixes calculating the ts offset for audio codecs with delay.
* matroskaenc: base DefaultDuration on the framerate, not the codec timebaseAnton Khirnov2014-05-29
| | | | | | This results in DefaultDuration not being written when the framerate is not known, but as this field is purely informative, this should not break any sane demuxers.
* matroskaenc: write the channel mask for FLACAnton Khirnov2014-05-28
|
* lavf: add AVFMT_FLAG_BITEXACT.Anton Khirnov2014-05-15
| | | | | | | | 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.
* matroskaenc: write CodecDelayAnton Khirnov2014-05-01
|
* matroskaenc: enable Annex B to MP4 conversion for HEVC tracks.Tim Walker2014-03-09
|
* matroskaenc: write private data in hvcC format for HEVC.Tim Walker2014-03-09
|
* matroskaenc: allow override of "writing application" tagJohn Stebbins2014-03-08
| | | | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com> CC: libav-stable@libav.org
* Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-23
|
* matroskaenc: Fix stray pointers left over from av_reallocp_array refactoringAlexandra Khirnova2013-09-12
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* matroskaenc: Allow chapters to be written in trailerJohn Stebbins2013-09-04
| | | | | | | | 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: Anton Khirnov <anton@khirnov.net>
* matroskaenc: Fix writing TRACKDEFAULTFLAGJohn Stebbins2013-08-27
| | | | | | | | The element was only being written when the value == 1. But the default value of this element is 1, so this has no useful effect. This element needs to be written when the value == 0. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mkv: Allow flushing the current cluster in progressMartin Storsjö2013-08-19
| | | | | | | | Allow emitting the current cluster that is being written before starting a new one, simplifying how to figure out where clusters are positioned in the output stream (for live streaming). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mkv: Flush the old cluster before writing a new oneLuca Barbato2013-08-19
| | | | | | | This simplifies keeping track of cluster boundaries for e.g. livestreaming of WebM. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mkv: Add options for specifying cluster limitsLuca Barbato2013-08-19
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mkv: Refactor mkv_write_packetLuca Barbato2013-08-19
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* matroskaenc: restore compatibility with non referenced AVPacketRafaël Carré2013-06-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* matroskaenc: support muxing WavPackAnton Khirnov2013-05-28
|
* matroskaenc: add an option to put the index at the start of the fileAnton Khirnov2013-05-03
|
* matroskaenc: cosmetics, reorder the #includesAnton Khirnov2013-05-03
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.