Commit Graph

1075 Commits

Author SHA1 Message Date
Moritz Bunkus
e8857c36e4 propedit, header editor: don't force date element to be present
Fixes #2143.
2017-11-01 18:06:28 +01:00
Moritz Bunkus
c42124e11c identification: only output date_… attributes if file contains date header field 2017-11-01 17:58:27 +01:00
Moritz Bunkus
380a02ce33 WebVTT parser: hours are optional in timestamp lines
Fixes #2139.
2017-10-27 17:30:33 +02:00
Moritz Bunkus
366d990ca9 AC-3 packetizer: don't use timestamps from incomplete frames
Fixes #2129.
2017-10-14 15:35:31 +02:00
Moritz Bunkus
c709cf94a9 merge: try reliable audio (AAC, AC-3, MP3) detection before MPEG TS/PS detection
Audio frames at the start of the file should have higher precedence,
especially over formats that don't always have start codes at the
beginning of the file.

Fixes certain AC-3 files being mis-detected as encrypted MPEG program streams.
2017-10-07 17:27:16 +02:00
Moritz Bunkus
2a286c6c0f SRT reader: fix duration of entries with negative start timestamp 2017-10-07 15:48:59 +02:00
Moritz Bunkus
0d7f08000f mkvmerge: fix --timecodes and --timecode-scale being recognized 2017-10-07 15:07:25 +02:00
Moritz Bunkus
2866cbab0c tests: fix error propagation for simple test's merge function 2017-10-07 15:00:00 +02:00
Moritz Bunkus
ca67e757bb mkvmerge: use timestamps instead of timecodes in JSON identification
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-04 20:45:30 +02:00
Moritz Bunkus
67e2a0e3e6 extract: use timestamp in cue extraction
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-04 19:18:25 +02:00
Moritz Bunkus
9fcef391ad Dirac: re-render track headers after changing them 2017-10-04 18:35:41 +02:00
Moritz Bunkus
3a76340d0c VC-1: re-render track headers after changing them
Fixes #2113.
2017-10-04 18:35:41 +02:00
Moritz Bunkus
0f43bd5b05 mkvmerge, mkvextract: use timestamp in format line of timestamp files
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-04 18:35:41 +02:00
Moritz Bunkus
0d158357be mkvextract: accept timestamps_v2 in addition to timecodes_v2
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-04 14:53:09 +02:00
Moritz Bunkus
1f7f3ef02b mkvmerge: accept --timestamp* in addition to --timecode*
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-04 14:51:41 +02:00
Moritz Bunkus
ec0b8c627c all: replace timecode with timestamp in the code
Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
2017-10-03 23:26:41 +02:00
Moritz Bunkus
f3ea2937ad byte_buffer_c: move to namespace mtx::bytes 2017-10-03 11:26:03 +02:00
Moritz Bunkus
56adacc202 bit_reader_c, bit_writer_c: move to namespace mtx::bits 2017-10-03 10:41:52 +02:00
Moritz Bunkus
5b91030a8a at_scope_exit: move at_scope_exit_c class to namespace mtx 2017-10-03 10:23:17 +02:00
Moritz Bunkus
ed67f1000c AC-3: identify regular AC-3 and E-AC-3 tracks differently via their codec 2017-10-03 10:23:17 +02:00
Moritz Bunkus
e6f3c42796 Matroska reader: AC-3: let packetizer re-frame content
There are Matroska files where the AC-3 core and the corresponding
E-AC-3 extension are stored in two different blocks. That's against
the specs, so mkvmerge has to fix it. Additionally only the first
block's timestamp should be used; otherwise mkvmerge will double the
total duration: in the source the core's and the extension's timestamp
are the same, but mkvmerge was assigning the core's block one
timestamp and the extension's block an incremented timestamp.
2017-10-01 23:34:04 +02:00
Moritz Bunkus
958af14d27 AAC ADTS parser: parse program_config_element in frame for channel detection
The `program_config_element` (PCE) in the frame is authoritative
regarding the number of channels encoded in the frame. The container
information might be wrong (e.g. the ADTS headers containing a channel
configuration of 0, which is invalid). Therefore parse the PCE if it's
located at the start of the frame and override the ADTS header
content.

Fixes #2107.
2017-10-01 20:20:54 +02:00
Moritz Bunkus
4bb8ad6f55 hevcc_c: fix reserved bits in lists & number of sub-layers 2017-09-26 22:04:31 +02:00
Moritz Bunkus
2e238ed122 configure: require libMatroska v1.4.8
That version fixes writing block groups and simple blocks for tracks
with track number 128 (see #2103).

Also adds a test case for writing 130 tracks.
2017-09-25 20:27:25 +02:00
Moritz Bunkus
6d21a24a42 Opus output: give frames with discard padding their own BlockGroup
Fixes #2100.
2017-09-24 23:06:03 +02:00
Moritz Bunkus
46832b5f30 tests: intentional update due to a2887a3ab 2017-09-16 18:21:38 +02:00
Moritz Bunkus
12720e2eec Matroska reader: don't write "white colour coordinate x" to "…coordinate y" 2017-09-16 11:45:27 +02:00
Moritz Bunkus
08f6adfb63 MP4 reader: add support for Vorbis
Implements #2093.
2017-09-10 18:01:18 +02:00
Moritz Bunkus
06bebb1613 AVC ES: only mark frames with nal_ref_idc==0 as "discardable" in SimpleBlocks
Fixes #2047.
2017-08-30 21:00:16 +02:00
Moritz Bunkus
c61a8a1e74 Matroska reader: keep SimpleBlock's "key" and "discardable" flags as they are
Partial fix for #2047.
2017-08-30 20:18:04 +02:00
Moritz Bunkus
01a6380760 AVC: fix reference calculation for P and B frames 2017-08-30 19:33:46 +02:00
Moritz Bunkus
52d51e78a8 mkvmerge: don't write MinCache, MaxCache 2017-08-23 09:50:33 +02:00
Moritz Bunkus
394a38acec DTS packetizer: take stream position of provided timestamps into account
Some source files only provide one timestamp every `n` DTS frames. In
such situations the next provided timestamp might arrive before all of
the data for the previous DTS frame has been flushed (due to the DTS
parser buffering data in order to determine whether or not a dependent
frame is following). The result is a single gap of one frame after frame
number `n - 1`.

Fixes #2071.
2017-08-13 17:52:05 +02:00
Moritz Bunkus
bb896d49e3 tests: add case for mkvinfo null pointer dereference bug #2072. 2017-08-13 10:40:23 +02:00
Moritz Bunkus
a7bccabdd1 merge: add support for "video projection" track header attributes
Part of the implementation of #2064.
2017-08-13 09:52:37 +02:00
Moritz Bunkus
a0889bb88c all: don't add missing mandatory Matroska elements with known default values
This change requires the upcoming libEBML release v1.3.5 as earlier
versions will complain about missing mandatory elements even if said
mandatory elements have default values in the specifications.
2017-08-12 10:59:11 +02:00
Moritz Bunkus
932fc8f8bd tests: mark certain commands as not to produce a hash result
This is used by the controller to determine which commands to prefix
with (*) markers in case of test failure.
2017-08-12 10:51:33 +02:00
Moritz Bunkus
9282f65953 tests: don't record ebml_validator calls in old test classes 2017-08-12 10:51:33 +02:00
Moritz Bunkus
97747396d8 propedit: change colour-matrix property to colour-matrix-coefficients
That's more in line with the specs, and it's clearer for the user what
this is actually about. See #2038.
2017-08-05 16:09:34 +02:00
Moritz Bunkus
07ed6bd656 propedit: add support for video colour attributes
This implements one half of #2038.

Note that this commit breaks the GUI's header editor until support for
editing sub-sub-sub-masters will be added to it (soon).
2017-08-03 21:06:55 +02:00
Moritz Bunkus
95092247aa mkvmerge: identify track's "encoding" if known and fixed
This is preparation for making the GUI present the encoding detected
by e.g. a byte order mark to the user so that she doesn't have to (and
cannot) chose a subtitle character set herself. Implements mkvmerge's
part of #2053.
2017-07-23 09:22:31 +02:00
Moritz Bunkus
4037f1aa0d translations: integrate Romanian translation 2017-07-22 16:00:11 +02:00
Moritz Bunkus
8e270adcef WAV reader: implement Wave64 support
Implements #2042.
2017-07-21 22:17:04 +02:00
Moritz Bunkus
3b2ff9b6ae memory_c: add comparison operators with strings constants 2017-07-21 17:16:18 +02:00
Moritz Bunkus
7fb3003919 AAC: store GA specific config & handle 960 samples/frame
Implements #2031.
2017-07-20 21:57:53 +02:00
Moritz Bunkus
9baa010848 bit_writer_c: let writer manage memory on its own 2017-07-19 23:07:27 +02:00
Moritz Bunkus
319c8009e0 bit_writer_c: tests, eof(), get_remaining_bits() 2017-07-19 16:45:27 +02:00
Moritz Bunkus
f01afa73fb bit_cursor.h: split into bit_reader.h and bit_writer.h 2017-07-19 15:49:06 +02:00
Moritz Bunkus
b6276208b0 AAC: refactor packetizer to take audio_config_t
Also refactors SBR detection & handling. There were cases in which
reading AAC from MPEG TS resulted in 2-byte `CodecPrivate` with no
`OutputSamplingFrequency` set, even though the sampling frequency was
24.000 Hz and therefore an indicator for SBR.
2017-07-16 17:26:44 +02:00
Moritz Bunkus
541348d7da MPEG-1/-2: remove feature "remove stuffing bytes"
The feature was implemented by removing all 0 bytes in before the next
start code (and all 0 bytes at the end of the buffer). The problem is
that a slice structure may very well end in 0 bytes. The only way to
determine the end of the slice structure with confidence is
implementing a parser for the whole slice structure.

The result of removing bytes belonging to the slice structure may or
may not end in visual artifacts upon decoding. Other results include
error message by the decoder (e.g. ffmpeg which reports errors such as
"slice mismatch" or "motion vectors not available").

I lack the time and motivation to implement a proper slice parser. As
the current behavior is dangerous and just plain wrong, I'm removing
the feature again. It was introduced in release 5.8.0 response to
issue #734, which will now remain not implemented.

Fixes #2045.
2017-07-15 21:37:04 +02:00