summaryrefslogtreecommitdiff
path: root/libavformat/matroska.c
Commit message (Collapse)AuthorAge
* Add MKV tags for AVS2 and AVS3 codecs.TianBo Zheng2022-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: TianBo Zheng <naturalwalker@hotmail.com> MKV codec mappings: V_AVS2 and V_AVS3 (https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md) Encoding tool: Ffmpeg with AVS2/AVS3 enabled: https://github.com/xatabhk/FFmpeg-avs2-avs3/releases Command line: ffmpeg -i xxxx.mp4 -vcodec avs2 -acodec copy xxxx_avs2.mkv ffmpeg -i xxxx.mp4 -vcodec avs2 -speed_level 4 -acodec copy xxxx_avs2.mkv` Players: (1) Ffmpeg with avs2/avs3 enabled: (https://github.com/xatabhk/FFmpeg-avs2-avs3/releases): Command line: ffplay xxxx_avs2.mkv ffplay xxxx_avs3.mkv (2) VLC 3.0.x with AVS2/AVS3 enabled: https://github.com/xatabhk/vlc-3.0-avs2-avs3/releases (3) Mpc-hc 1.9.x with AVS2/AVS3 enabled: https://gitee.com/zhengtianbo/cavs-avs2-avs3_decoder_added_to_mpc_hc/releases AVS2/AVS3 MKV samples: https://github.com/xatabhk/avs2-avs3-video-samples Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroska: Move mime_tag lists to matroskadecAndreas Rheinhardt2020-04-20
| | | | | | They are not used any more by the muxer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: implement AVOutputFormat.query_codec for webmJames Almer2018-09-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'd42809f9835a4e9e5c7c63210abb09ad0ef19cfb'Clément Bœsch2017-03-19
|\ | | | | | | | | | | | | * commit 'd42809f9835a4e9e5c7c63210abb09ad0ef19cfb': av1: Add codec_id and basic demuxing support Merged-by: Clément Bœsch <u@pkh.me>
| * av1: Add codec_id and basic demuxing supportLuca Barbato2016-08-24
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavf/matroska: Support QDMC.Carl Eugen Hoyos2017-03-05
| |
* | lavf/matroska: Support codec ID V_FFV1 for demuxing.Carl Eugen Hoyos2017-03-03
| | | | | | | | Fixes ticket #6206.
* | matroska: demux BluRay text subtitlesPetri Hintukainen2017-02-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/matroska: Fix the codec_id for mkv tag A_MPEG/L1.Carl Eugen Hoyos2017-01-04
| | | | | | | | When the mapping was originally added AV_CODEC_ID_MP1 did not exist.
* | avformat/matroska: use av_stream_add_side_data() for stereo3d side dataJames Almer2016-11-19
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * matroska: Always consider S_TEXT/UTF8 as SRT when demuxingLuca Barbato2016-02-22
| | | | | | | | Reported-By: Maxim Koitsov <maksbotan@gentoo.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>
| * mkv: Add support for DVB subtitlesLuca Barbato2015-03-15
| | | | | | | | Bug-Id: 833
* | matroskadec: export cover art correctlywm42015-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Fixes trac #4423. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Kill timed SRTClément Bœsch2014-09-30
| |
* | avformat: remove FF_API_ASS_SSA dead codeClément Bœsch2014-09-09
| |
* | avformat: drop redundant MATROSKA_VIDEO_STEREO_MODE_COUNT identifierMichael Niedermayer2014-08-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd4ae8ac92f619507aadd021bb67b517d39d3a36f'Michael Niedermayer2014-08-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd4ae8ac92f619507aadd021bb67b517d39d3a36f': matroskadec: parse stereo mode on decoding Conflicts: Changelog libavformat/matroska.c libavformat/matroskadec.c See: 4c509fe305bc79a913ef1b690df6c910c732f608 and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroskadec: parse stereo mode on decodingVittorio Giovara2014-08-28
| | | | | | | | | | | | | | | | | | Convert the Matroska stereo format to the Stereo3D format, and add a Stereo3D side data to the stream. Bump the doctype version supported. Bug-Id: 728 / https://bugs.debian.org/757185
* | Correct few "ffmpeg" typosPaul B Mahol2014-08-24
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '141fdc763c2841b572d29a2ad78513e8d5325870'Michael Niedermayer2014-05-01
|\| | | | | | | | | | | | | | | | | | | | | * commit '141fdc763c2841b572d29a2ad78513e8d5325870': matroska: add the Opus mapping Conflicts: libavformat/matroska.c See: 30549294ef0f796d48b1ffa482bd9315d4dbb83c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroska: add the Opus mappingAnton Khirnov2014-05-01
| |
| * matroskadec: Support HEVC demuxingYusuke Nakamura2013-10-31
| |
* | lavf/matroska: add "binary" pseudo-MIME type.Nicolas George2014-04-29
| | | | | | | | | | Avoid long scan and "Could not find codec parameters for stream" error when an attachment has this type.
* | lavf/matroskadec: Support HEVC demuxing.Yusuke Nakamura2013-10-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/matroska: Removing experimental suffix for OpusVignesh Venkatasubramanian2013-09-12
| | | | | | | | | | | | | | | | | | Removing the /EXPERIMENTAL suffix for codec id field for Opus. Doing this as the implementation of embedding Opus in Matroska is complete. Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/matroskadec: add WebVTT supportMatthew Heaney2013-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | WebM files now support inband text tracks, as described in the following specification: http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm The Matroska demuxer now detects the presence of WebVTT tracks, synthesizing WebVTT packets (having codec id AV_CODEC_ID_WEBVTT) and pushing them downstream in the normal way. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | subtitles: introduce ASS codec id and use it.Clément Bœsch2013-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we have a AV_CODEC_ID_SSA, which matches the way the ASS/SSA markup is muxed in a standalone .ass/.ssa file. This means the AVPacket data starts with a "Dialogue:" string, followed by a timing information (start and end of the event as string) and a trailing CRLF after each line. One packet can contain several lines. We'll refer to this layout as "SSA" or "SSA lines". In matroska, this markup is not stored as such: it has no "Dialogue:" prefix, it contains a ReadOrder field, the timing information is not in the payload, and it doesn't contain the trailing CRLF. See [1] for more info. We'll refer to this layout as "ASS". Since we have only one common codec for both formats, the matroska demuxer is constructing an AVPacket following the "SSA lines" format. This causes several problems, so it was decided to change this into clean ASS packets. Some insight about what is changed or unchanged in this commit: CODECS ------ - the decoding process still writes "SSA lines" markup inside the ass fields of the subtitles rectangles (sub->rects[n]->ass), which is still the current common way of representing decoded subtitles markup. It is meant to change later. - new ASS codec id: AV_CODEC_ID_ASS (which is different from the legacy AV_CODEC_ID_SSA) - lavc/assdec: the "ass" decoder is renamed into "ssa" (instead of "ass") for consistency with the codec id and allows to add a real ass decoder. This ass decoder receives clean ASS lines (so it starts with a ReadOrder, is followed by the Layer, etc). We make sure this is decoded properly in a new ass-line rectangle of the decoded subtitles (the ssa decoder OTOH is doing a simple straightforward copy). Using the packet timing instead of data string makes sure the ass-line now contains the appropriate timing. - lavc/assenc: just like the ass decoder, the "ssa" encoder is renamed into "ssa" (instead of "ass") for consistency with the codec id, and allows to add a real "ass" encoder. One important thing about this encoder is that it only supports one ass rectangle: we could have put several dialogue events in the AVPacket (separated by a \0 for instance) but this would have cause trouble for the muxer which needs not only the start time, but also the duration: typically, you have merged events with the same start time (stored in the AVPacket->pts) but a different duration. At the moment, only the matroska do the merge with the SSA-line codec. We will need to make sure all the decoders in the future can't add more than one rectangle (and only one Dialogue line in it obviously). FORMATS ------- - lavf/assenc: the .ass/.ssa muxer can take both SSA and ASS packets. In the case of ASS packets as input, it adds the timing based on the AVPacket pts and duration, and mux it with "Dialogue:", trailing CRLF, etc. - lavf/assdec: unchanged; it currently still only outputs SSA-lines packets. - lavf/mkv: the demuxer can now output ASS packets without the need of any "SSA-lines" reconstruction hack. It will become the default at next libavformat bump, and the SSA support will be dropped from the demuxer. The muxer can take ASS packets since it's muxed normally, and still supports the old SSA packets. All the SSA support and hacks in Matroska code will be dropped at next lavf bump. [1]: http://www.matroska.org/technical/specs/subtitles/ssa.html
* | matroska: fix missing ,Andrea30002013-02-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroska: fixed missing S_DVBSUB subtitlesAllan Kristensen2013-02-01
| |
* | matroskaenc: add codec_tag lists back.Carl Eugen Hoyos2013-01-24
| | | | | | | | | | | | | | | | | | | | This reverts 312645e : "Do not set codec_tag property for matroska muxers." Also adds dummy codec_tag lists with codecs supported in mkv but not in wav / avi. Fixes ticket #2169.
* | lafv/matroska: add A_OPUS/EXPERIMENTAL codec name.Nicolas George2013-01-16
| | | | | | | | | | | | | | | | | | The exact packing of Opus inside Matroska is not finalized. Use A_OPUS/EXPERIMENTAL as codec name, like mkvtoolnix. The A_OPUS name stays to let ffmpeg open files it has produced until now, but newly produced file use the EXPERIMENTAL version. Once the spec is stabilized it will be possible to consider options to ensure compatibility with these files.
* | Merge commit '3f111804eb5c603a344706b84b7164cbf7b4e0df'Michael Niedermayer2013-01-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3f111804eb5c603a344706b84b7164cbf7b4e0df': libvpx: make vp8 and vp9 selectable libvpx: support vp9 nut: support vp9 tag mkv: support vp9 tag rtpdec: Make variables that should wrap unsigned Conflicts: configure libavcodec/Makefile libavcodec/allcodecs.c libavcodec/avcodec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mkv: support vp9 tagTom Finegan2013-01-14
| |
| * Drop Snow codecDiego Biurrun2013-01-06
| | | | | | | | Snow is a toy codec with no real-world use and horrible code.
* | Merge commit '117d8c6d1f1c187ffc6098d9618457e00534e013'Michael Niedermayer2012-09-20
|\| | | | | | | | | | | | | | | | | | | | | * commit '117d8c6d1f1c187ffc6098d9618457e00534e013': matroska: implement support for ProRes matroska: implement support for ALAC Conflicts: libavformat/matroskaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroska: implement support for ProResLuca Barbato2012-09-19
| | | | | | | | | | | | | | | | Support Matroska native formatting. On demuxing prepend a Frame container atom (32bit big endian encoded frame size and 'icpf' string). On muxing remove it.
| * matroska: implement support for ALACMoritz Bunkus2012-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support Matroska native formatting. On demuxing reconstruct the 36-bytes QuickTime atom that the ALAC decoder expects by prepending the "atom size", "tag" and "tag version" fields missing from the Matroska's CodecPrivate element. On muxing remove the initial 12 bytes Sample files are available: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka and the CoreAudio file it was created from with today's mkvmerge: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavf/mkv: prefix video stereo arrays with ff_.Clément Bœsch2012-09-16
| |
* | add OTF support for attachmentsSébastien Brochet2012-09-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroska: Mark S_TEXT/UTF-8 as Subrip encoded subtitles.Philip Langdale2012-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While not explicitly stated in the specs, the original author has stated that S_TEXT/UTF-8 is expected to be text using Subrip markup, but without Subrip in-band timing. So, now that we have a decoder that conforms to this expectation, let's use it. Note that this change will impact tools that use libavformat. If they expect srt subtitles to have CODEC_ID_TEXT, they must be adjusted to expect CODEC_ID_SUBRIP. The actual content is, obviously, unchanged. Signed-off-by: Philip Langdale <philipl@overt.org>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | matroskadec: Implement support for ALACMoritz Bunkus2012-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements support reading ALAC from Matroska files. The only non-trivial thing about it is that only the ALAC magic cookie is stored in Matroska's CodecPrivate element but not the "atom size", "tag" and "tag version" fields that FFMPEG's ALAC decoder expects. However, those are trivial to re-create. Sample files are available: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka and the CoreAudio file it was created from with today's mkvmerge: http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroska: add support for Opus.Nicolas George2012-07-20
| | | | | | | | Opus in Matroska is still a draft.
* | matroska: improve declaration of video_stereo_* constant tablesAurelien Jacobs2011-05-24
| |
* | matroska: cleanup handling of video stereo modeAurelien Jacobs2011-05-24
|/