* commit '51da7d02748cc54b7d009115e76efa940b99a8ef':
matroskaenc: refuse to write AAC without valid extradata
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>
In dahsmode Matroska is not writing the first Cluster for every
audio stream in the Cues element.
Signed-off-by: Frank Galligan <frankgalligan@gmail.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '4d686fb721b485ebbc4c7779d927d876c1e630f7':
matroskaenc: convert avstream stereo3d side data during encoding
Conflicts:
libavformat/matroskaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fixes assertion failure
Fixes Ticket3822
as a side-effect this makes some mkv files a few bytes smaller
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b75a1f9892b5b715397edbf837e4d4cda337907b':
matroska: Factor out write_track from mkv_write_tracks
Conflicts:
libavformat/matroskaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fix a change that was broken by [1]. Cues must be added for audio frames
on cluster start for WebM when the DASH flag is passed. Restoring
correct functionality.
[1] http://goo.gl/xYLq7Z
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'e19d48dfce52f1417f7f06143b96fed00cbcdc52':
flac muxer: support reading updated extradata from side data
Conflicts:
libavformat/flacenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd2ef708c95ace2518deffe830a9c439aeb9edd5d':
matroskaenc: Allow VP9 and Opus in webm
Conflicts:
libavformat/matroskaenc.c
See: 820ffaed0f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '81eec081afea9fc017a175581ceea7c420a0dfc3':
matroskaenc: base DefaultDuration on the framerate, not the codec timebase
Conflicts:
libavformat/matroskaenc.c
tests/ref/lavf/mkv
tests/ref/seek/lavf-mkv
See: ea83b032af
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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.
Opus in WebM is no more experimental as we have everything necessary in
the container writing code as per the spec. So removing the experimental flag.
Note that we removed the experimental suffix from the CodecId field long
ago ( http://goo.gl/O0TYRB ).
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
WebM DASH specification [1] requires the Clusters and Cues to be output in a
specific way. Adding a flag to matroskaenc that will enable support for
creating WebM/Mkv files conforming to the WebM DASH specification.
[1] http://wiki.webmproject.org/adaptive-streaming/webm-dash-specification
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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.
* commit 'a1aa37dd0b96710d4a17718198a3f56aea2040c1':
matroskaenc: write CodecDelay
Conflicts:
libavformat/matroskaenc.c
tests/ref/lavf/mkv
tests/ref/seek/lavf-mkv
This is largely not merged as it causes assertion failures and av sync errors
Further investigation of this is warranted if the changes are found to
fix/improve something in relation to d92b1b1bab
See: d92b1b1bab
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Partially undoes commit 2c4e08d893:
riff: always generate a proper WAVEFORMATEX structure in
ff_put_wav_header
A new flag, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX, is added to force the
use of WAVEFORMATEX rather than PCMWAVEFORMAT even for PCM codecs.
This flag is used in the Matroska muxer (the cause of the original
change) and in the ASF muxer, because the specifications for
these formats indicate explicitly that WAVEFORMATEX should be used.
Muxers for other formats will return to the original behavior of writing
PCMWAVEFORMAT when writing a header for raw PCM.
In particular, this causes raw PCM in WAV to generate the canonical
44-byte header expected by some tools.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'a823d0948683bd97dd58556b5740e434166209a8':
matroskaenc: write private data in hvcC format for HEVC.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This is needed for matroska spec compliance
Fixes playback of SVQ3 in matroska with vlc
Fixes Ticket 3256
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This occurs for video codecs that have codec_tag set, but are are not listed
in ff_codec_bmp_tags (e.g. AV_CODEC_ID_BINKAUDIO, AV_CODEC_ID_IFF_ILBM).
Fixes ticket #3269.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
according to the Matriska Specification
http://matroska.org/technical/specs/index.html
DiscardPadding is a signed integer.
Tested-by: Jan Gerber <j@v2v.cc>
Tested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Use it only on subtitle CuePoints.
With proper demuxer/splitter support this should improve the display
of subtitles right after seeking to a given point in the stream.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Files won't validate with mkvalidtor if these two elements are missing.
Use a const "Lavf" string that wont change with library version bumps.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The muxer has been creating files with v4 elements for some time now,
and especially now that we can mux non-experimental Opus files, reporting
the DocTypeVersion as 2 is not correct.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring
Conflicts:
libavformat/matroskaenc.c
Mostly not merged as the buggy code was no longer part of FFmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
In order to represent the codec delay accurately in Matroska, a
new element CodecDelay has been introduced. It contains the
overall delay added by the codec in nanoseconds. This patch adds
support for muxing CodecDelay value in the container.
Matroska spec for CodecDelay element can be found here:
http://matroska.org/technical/specs/index.html#CodecDelay
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Support for end trimming Opus in Matroska is implemented by using
the DiscardPadding container element in the Block data. The last
chunk is stored as a Block instead of SimpleBlock and the
trimming information is stored and used to discard samples that
were padded by the Opus codec. This patch adds support for muxing
DiscardPadding element into the container with appropriate value.
Matroska spec for the DiscardPadding element can be found here:
http://matroska.org/technical/specs/index.html#DiscardPadding
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This fixes a bunch of possible overread in avformat with the idiom p +=
strcspn(p, "\n") + 1 (strcspn() can focus on the trailing '\0' if no
'\n' is found, so the +1 leads to an overread).
Note on lavf/matroskaenc: no extra subtitles.o Makefile dependency is
added because only the header is required for ff_subtitles_next_line().
Note on lavf/mpsubdec: code gets slightly complex to avoid an infinite
loop in the probing since there is no more forced increment.
* qatar/master:
matroskaenc: Allow chapters to be written in trailer
Conflicts:
libavformat/matroskaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>
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>
* commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4':
mkv: Allow flushing the current cluster in progress
Conflicts:
libavformat/matroskaenc.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe':
mkv: Flush the old cluster before writing a new one
Merged-by: Michael Niedermayer <michaelni@gmx.at>