Commit Graph

827 Commits

Author SHA1 Message Date
Moritz Bunkus
11f6ca8c19 mkvmerge: add container ID as "number" attribute in verbose/JSON identification
Several container formats provide an internal ID of some kind. mkvmerge
already output that ID for some of the container formats it supports
albeit under different property names:

- Matroska: "number"
- MPEG program streams: "stream_id" and "sub_stream_id", encoded as a
  hexadecimal string instead of integers
- MPEG transport streams: "ts_pid"

With this commit the support is extended to other container formats. The
MPEG program and transport stream reader modules output their IDs as the
property "number" (in addition to the older identifiers) in order to
have a consistent naming scheme which makes using the output easier for
other applications.

The changes are:

- QuickTime/MP4: the track ID from the 'tkhd' atom
- MPEG program stream: the sub-stream ID in the upper 32 bits and the
  stream ID in the lower 32 bits
- MPEG transport stream: the program ID
- Ogg/OGM: the stream's serial number field
- RealMedia: the track ID

Implements #1541.
2015-12-17 20:05:32 +01:00
Moritz Bunkus
a3a25225c6 mkvmerge: output warnings/errors as JSON in JSON identification mode
Implements #1537.
2015-12-16 21:58:51 +01:00
Moritz Bunkus
de4734f962 doc: change identification JSON schema file name to contain version number
That will make distinguishing between and validating the various versions
easier.
2015-12-16 21:53:28 +01:00
Moritz Bunkus
d5a02a8bda Revert "all: don't write BOMs for UTF-* encoded text files"
This reverts commits 2c11d3f3bd and
9436271a04.

The reason is that users have chimed in with legitimate use cases,
especially extracting text subtitles on Windows, modifying them and
re-muxing them later. This worked out of the box before but requires
setting the subtitle character set to UTF-8 upon re-muxing now.
2015-12-16 10:27:20 +01:00
Moritz Bunkus
8d29ad2f51 tests: add case for removing track statistics tags during remux 2015-12-15 13:43:36 +01:00
Moritz Bunkus
aa99f9464c mkvpropedit: implement setting attachment UIDs
See #1532.
2015-12-12 15:19:45 +01:00
Moritz Bunkus
e1209eec79 mkvpropedit: implementing updating attachment properties
Implements #1532.
2015-12-12 15:19:45 +01:00
Moritz Bunkus
0d27238adb tests: add case for VP9 key frame detection fixed in 237cef3 2015-12-08 22:46:42 +01:00
Moritz Bunkus
322749efa8 tests: intentional update due to translation updates in 3f6c6f9 2015-12-08 22:45:10 +01:00
Moritz Bunkus
f1e4055e3e tests: add test case for mkvmerge's JSON identification output 2015-12-07 22:49:41 +01:00
Moritz Bunkus
5f05a366cc kax_analyzer_c: ensure there's always a seek head at the front
It is possible that the seek head at the front has been removed due to
moving the seek head at the back one byte to the front which calls
remove_from_meta_seeks() with that second seek head. This leads to the
first seek head being empty and therefore being removed.

Later calls to add_to_meta_seek() must therefore make sure that, even if
the element could be added to an existing seek head at the end, a new
seek head is created at the start referencing the one at the end.

Fixes #1513.
2015-11-29 19:41:01 +01:00
Moritz Bunkus
9436271a04 tests: adjust for UTF-BOM changes in 2c11d3f 2015-11-28 15:22:06 +01:00
Moritz Bunkus
2c11d3f3bd all: don't write BOMs for UTF-* encoded text files 2015-11-28 13:11:36 +01:00
Moritz Bunkus
1e0a545e72 Matroska reader: identification: output audio bits per sample track property 2015-11-22 17:13:43 +01:00
Moritz Bunkus
7993dd346c kax_analyzer: make room for seek head if neither room nor seek head is present
Fixes #1516.
2015-11-21 10:12:54 +01:00
Moritz Bunkus
1574e31433 kax_file_c: cath std::runtime_error instead of libEBML's CRTError 2015-11-18 19:20:27 +01:00
Moritz Bunkus
4f81ecb899 mkvmerge: handle chapters and attachments when re-writing track headers
The layout is: track headers, void, attachments, chapters,
clusters. When extending the void there are elements for attachments and
chapters in memory whose position will change; therefore their in-memory
copies will have to be updated, too.

Fixes #1498 but also applies to #1485.
2015-11-15 23:07:17 +01:00
Moritz Bunkus
90ea8cee82 mkvmerge: extend file by right amount when rewriting track headers
The number of bytes the file will grow by is "delta", not the amount of
bytes having to be relocated.

Partial fix for #1498; also applies to #1485.
2015-11-15 23:07:08 +01:00
Moritz Bunkus
4279d26c85 VC-1: fix duplication of the first sequence headers
Fixes #1503.
2015-11-09 21:52:26 +01:00
Moritz Bunkus
6a594e6b87 mkvmerge: don't generate segment UIDs for discarded segments on splitting
Fixes #1497.
2015-11-03 20:59:45 +01:00
Moritz Bunkus
31bc8633d4 SimpleTest class: avoid a couple of warnings 2015-11-03 20:40:13 +01:00
Moritz Bunkus
616f17bac5 mkvmerge: don't write "next segment UID" in last split file 2015-11-03 20:33:17 +01:00
Moritz Bunkus
8078f78725 Test runner: improve regex name matching 2015-10-26 20:29:51 +01:00
TMTisFree
e5d25c46fd Translations: update French 2015-10-26 20:19:19 +01:00
Moritz Bunkus
9097f64d56 mkvmerge: rerender track headers: handle required size > void and not data written yet
Fixes ##1485.
2015-10-22 11:35:37 +02:00
Moritz Bunkus
b549136c13 Tests: sort files from Dir.glob for consistent order 2015-10-20 18:04:19 +02:00
Moritz Bunkus
ae463673f6 Tests: add test cases for Cisco TALOS-CAN-0036 and TALOS-CAN-0037 2015-10-20 16:13:14 +02:00
Moritz Bunkus
62dcf96cea Tests: intentional update due to 510206d 2015-10-18 11:31:36 +02:00
Moritz Bunkus
745da353b6 Translations: intentional update due to c63e0b0
c63e0b0 all: don't use Guillemets in English text
2015-10-15 14:39:02 +02:00
Moritz Bunkus
0ffb2b592c test runner: prefix regex for "run.rb /re/" syntax with .* 2015-10-11 22:19:23 +02:00
Moritz Bunkus
cd5820911d tests: intentional update due to 5a7f979 2015-10-11 22:17:59 +02:00
Moritz Bunkus
b1c4f7f47f all: rename format_timecode to format_timestamp
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.
2015-10-07 20:21:59 +02:00
Moritz Bunkus
6ed482588d all: rename timecode_calculator_c to timestamp_calculator_c
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.
2015-10-07 19:57:05 +02:00
Moritz Bunkus
e476208bdd all: rename (basic_)timecode_c to (basic_)timestamp_c
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.
2015-10-07 09:59:42 +02:00
Moritz Bunkus
a348a72744 DTS: add a VOB to the 96/24 test case 2015-10-06 22:45:56 +02:00
Moritz Bunkus
656fd8df74 DTS: improve identification for DTS 96/24
Implements #1431.
2015-10-06 22:40:56 +02:00
Moritz Bunkus
6039e60af1 mkvmerge: no default duration for PCM with varying no. samples/packet
Fixes #1426.
2015-10-04 21:59:16 +02:00
Moritz Bunkus
20a448d2af format_timecode: formatting by a format string like %H:%M:%S 2015-10-04 11:10:37 +02:00
Moritz Bunkus
4da5f7db4d format_timecode: round for precision == 0, too
For every other precision the timestamp output is rounded, so for
consistency's sake do it for precision == 0, too.

Add unit tests.
2015-10-04 11:10:37 +02:00
Moritz Bunkus
475c20d8e7 tests: intentional update due to e96fbcd 2015-10-03 22:27:04 +02:00
Moritz Bunkus
738df974c8 test runner: fail if regex doesn't match anything 2015-10-03 22:26:44 +02:00
Moritz Bunkus
80f75dcac7 tests: intentional update due to b299963 (actual fix) 2015-09-28 20:33:05 +02:00
Moritz Bunkus
6daa3e0537 tests: intentional update due to b299963 2015-09-28 19:29:15 +02:00
Moritz Bunkus
56a887c4f4 tests: intentional update due to 00217b2 2015-09-27 12:44:24 +02:00
Moritz Bunkus
f1b5f1bb16 fix spelling of AC3/EAC3 to AC-3/E-AC-3 2015-09-22 20:42:51 +02:00
Moritz Bunkus
90b3b6543f fix spelling of VC-1 2015-09-22 19:44:54 +02:00
Moritz Bunkus
c6a376cda2 tests run.rb: add help text 2015-09-17 21:48:05 +02:00
Moritz Bunkus
2803700df5 merge: store channels/sample rate for DTS in track fields for verbose info 2015-09-17 21:36:52 +02:00
Moritz Bunkus
aa69ec3775 merge: verbose identification: don't output values that aren't known 2015-09-17 21:05:39 +02:00
Moritz Bunkus
538d86b6b6 merge: sort verbose info properties
The net win is that changes in the order the properties are added won't
affect the output and therefore the test cases anymore allowing for
easier refactoring of file identification.
2015-09-17 19:55:47 +02:00