The format is slightly proprietary.
DVDs use a format of
code byte (0x00, 0x01, 0xfe or 0xff), two data bytes
MOV uses instead
cdat/cdt2 atom, two data bytes
Auto-detecting and supporting both in one decoder is trivial,
so a single codec ID is used.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Searching for packet markers doesn't make sense for this use case,
where packets are fed one at a time to the demuxer.
This fixes playing back streams that have packets not starting
with the 0x82, 0x00, 0x00 marker.
Signed-off-by: Martin Storsjö <martin@martin.st>
It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
The correct point that seperates ISO and MAC language codes is 0x400
according to the current QT spec. Old QT specs did not list where this
seperation is but apparently only defined the meaning of the first 137.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The handler name is stored as a pascal string in the QT specs (first
byte is the length of the string), thus leading to an invalid metadata
string export.
Also add a second length check based on the first character to avoid
overwriting an already specified handler_name (it happens with Youtube
videos for instance, the handler_name get masked), or specifying an
empty string metadata.
To reproduce the problem, using ffprobe:
./ffprobe -show_packets -print_format compact -fflags +genpts -i
fate_samples/mxf/C0023S01.mxf
You will notice that the last video frame does not have it's PTS being
set, even with using genpts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Allows avoiding the buffer when using avio read, write and seek functions.
When using the ffmpeg executable -avioflags direct can be used to enable
this mode for input files, but has no effect on output files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
The reason for this is that such files have IndexTableSegments which when parsed
cover EditUnit ranges like this:
[0,1)
[249,250)
[249,377)
[0,249)
where each interval is [IndexStartPosition,IndexStartPosition+IndexDuration).
This would be reduced to a sparse index like:
[0,1), [249,250)
instead of the full range:
[0,249), [249,377)
See TimeCode_HD.mxf, UMID =
060a2b340101010101010410130000000004001aa0e59175025b2a5600da4101.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The audio codecs property is composed by all values except
SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are
unused.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This fixes crashes when copying a data track as in trac
issue #236.
No proper timecode tracks will be written though.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This patch fixes the sample from trac issue #522.
The issue is that the mov demuxer insists on using its
calculated sample_size (which is nonsense for old-style tracks)
instead of the one encoded in the track.
The old raw audio code should be using the value in stsz, because
the size of a single sample never makes sense for the size of
a full audio packet, whereas the new code will multiply the
sample size by the chunk size, so it should use the calculated value.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This patch fixes the sample from trac issue #733.
The issue is that the size of the trak elements is coded
too large, so that the next trak element would be parsed
as part of the first and truncated incorrectly.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
tilde expansion should/can be done by the shell
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This changes globbing support to only be used if the character
contains at least one glob meta character that is preceded by
an unescaped %. To escape a literal % one would use %% which is
identical to the way to match a % with image2 sequence generation
feature.
* Makes it possible to have patterns like %04d-[720p].jpg work
again with sequence number generation. Previously this would
always be detected as a glob pattern and was interpreted by
the image2 glob code instead.
* Makes it possible to use %*-[720p].jpg to match above pattern
without having to double escape it to be not interpreted by most
shells and not by the image2 glob code (previously one would
need to use \*-\\\[720p\\\].jpg to achieve the same)
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>