Commit Graph

832 Commits

Author SHA1 Message Date
Moritz Bunkus
571343f2af MP4 reader: support random access point sample grouping
The current MP4 specs (ISO/IEC 14496-15:2015) say that open GOP random
access points aren't normal sync entries anymore. Therefore such frames
aren't present in the normal key frame table anymore. Instead sample
grouping information of type "rap " (random access point) is used for
signalling that decoding can start from those frames, too.

Fixes #1543.
2015-12-28 12:55:09 +01:00
Moritz Bunkus
c4012c7c89 mkvmerge: fix block group type decision for last frame of a track
The last frame of a track doesn't need a duration if its rounded
duration equals the rounded default duration. On the other hand the last
frame must not be put into an existing lace if those durations are
different.

Fixes #1545.
2015-12-27 22:02:11 +01:00
Moritz Bunkus
c51bb7cfe9 re-factor mtx::any from propedit.cpp to list_utils.h 2015-12-19 15:55:01 +01:00
Moritz Bunkus
8cc0918d8f AAC: with 2 bytes codec-specific config only treat 24 KHz and 22.05 KHz as SBR
Certain SBR AAC tracks only have two-bytes long codec-specific
configuration data even though SBR normally requires five-bytes long
data. mkvmerge contains a heuristic for such cases that treats sampling
frequencies of <= 24000 Hz as another indicator for SBR.

However, this breaks in cases of low sampling frequencies like 8000 Hz
which are almost never SBR. This results in the wrong profile being
detected preventing mkvmerge from appending such tracks to track for
which the profile was detected correctly.

This change limits the heuristic to the two most common sampling
frequencies used for such broken SBR AAC files: 22050 Hz and 24000 Hz.

Fixes #1540.
2015-12-19 13:04:49 +01:00
Moritz Bunkus
563ca4fbc7 mkvmerge: iterate over correct array when output track tags
Fixes #1538.
2015-12-17 20:37:17 +01:00
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