Commit Graph

11945 Commits

Author SHA1 Message Date
Moritz Bunkus
9e04c038f4
packaging: move all packaging files to packaging directory 2018-06-25 17:59:11 +02:00
Moritz Bunkus
1058e0cf30
appimage: copy Qt plugins manually 2018-06-25 17:45:17 +02:00
Moritz Bunkus
8a5cc704b6
AppImage build: support building in CentOS 7; use Qt online version 2018-06-24 16:28:57 +02:00
Moritz Bunkus
7008661ed9
GUI: mux: allow changing subtitle charset for textsubs in Matroska/MPEG TS 2018-06-21 20:01:57 +02:00
Moritz Bunkus
91debcd8ea
Matroska/MPEG TS readers: allow recoding text subtitles via --sub-charset 2018-06-21 19:51:15 +02:00
Moritz Bunkus
34188f2323
Ogg Opus: calculate timestamps after gaps from page-after-gap's granulepos
Part of #2280.
2018-06-21 15:52:31 +02:00
Moritz Bunkus
a9d685970d
Ogg Opus reader: improve debug output 2018-06-21 15:34:06 +02:00
Moritz Bunkus
7dfb03c897
translations: update list of translatable strings; update German translation 2018-06-20 22:44:53 +02:00
Moritz Bunkus
01e04ca141
Ogg Opus reader: change warning back to original wording 2018-06-20 22:42:13 +02:00
Burak Yavuz
22bedec5ac
translations: update Turkish 2018-06-20 22:39:45 +02:00
Timofey Lisunov
e54c6b9e67
translations: update Russian 2018-06-20 22:39:28 +02:00
Denis Baron
1b8b4844bf
translations: update French 2018-06-20 22:39:20 +02:00
Antoni Bella Pérez
000fcefaf4
translations: update Catalan 2018-06-20 22:39:08 +02:00
Dian Li
0ea10ddd4b
translations: update Chinese Simplified 2018-06-20 22:38:57 +02:00
Dian Li
d73973bea4
man page translations: update Chinese Simplified 2018-06-20 22:38:50 +02:00
Israel Lucas Torrijos
0e3cbb5e30
man page translations: update Spanish 2018-06-20 22:38:33 +02:00
Moritz Bunkus
edfbbfe57f
tests: update due to warnings on invalid 8-bit chars in UTF-8 in subtitles 2018-06-20 22:34:26 +02:00
Moritz Bunkus
5b431c02ea
SSA/ASS textsubs: emit warning for invalid 8-bit characters in UTF-8 sequences
Part of the implementation of #2246.
2018-06-20 22:18:41 +02:00
Moritz Bunkus
7a9a245f40
SRT textsubs: emit warning for invalid 8-bit characters in UTF-8 sequences
Part of the implementation of #2246.
2018-06-20 22:18:41 +02:00
Moritz Bunkus
de603b7402
SSA/ASS textsubs: try UTF-8 if no encoding was specified with fallback to system's encoding
Part of the implementation of #2246.
2018-06-20 22:18:41 +02:00
Moritz Bunkus
1bb63b08bd
SRT textsubs: try UTF-8 if no encoding was specified with fallback to system's encoding
Part of the implementation of #2246.
2018-06-20 22:14:09 +02:00
Moritz Bunkus
5ff7aed0b9
UTF-8: move functions to mtx::utf8 namespace; add is_valid function 2018-06-20 22:14:07 +02:00
Moritz Bunkus
291e98423c
textsubs packetizer: simplify constructor arguments 2018-06-20 20:49:20 +02:00
Moritz Bunkus
1762d4dc2e
Ogg Opus reader: calculate packet timestamps from granulepos
The prior algorithm summed up all Opus frame's number of samples and
calculated the expected timestamp from there. That expected timestamp
was compared to the Ogg page's granule position, and the discard
padding was calculated from that.

This lead to problems in several cases:

1. When the first packet's granule position was bigger than the number
   of samples in the Opus frame, the specs say that the first sample's
   timestamp is positive in that case. mkvmerge was wrongfully using 0
   as the timestamp and thought discard padding was needed in such a
   case.

2. When the first packet's granule position was smaller than the
   number of samples in the Opus frame (meaning the first sample's
   timestamp was negative), a technically invalid bitstream, mkvmerge
   was wrongfully forcing the first packet's timestamp up to 0 and
   inserting discard padding elements all over the place as its
   internal calculations got confused.

The new algorithm bases the calculation on the last known granule
position special-casing for certain Ogg packet numbers:

1. For the first Ogg page the timestamps of all packets is calculated
   by subtracting each packet's number of samples from the page's
   granule position in reverse order. This may result in the first
   packet's timestamp being positive, which mkvmerge now preserves.

   mkvmerge won't calculate a discard padding for this page.

2. For all other pages each packet's timestamp is calculated by adding
   each packet's number of samples to the previous Ogg page's end
   timestamp as given by its granule position.

   mkvmerge then calculates the discard padding for the last packet of
   the page by comparing the calculated end timestamp of that packet
   with the Ogg page's end timestamp as given by the granule
   position.

   As a workaround for certain rounding errors encountered in the
   wild, a discard padding of one sample will be treated as if no
   discard padding was present for all but the very last packet as
   indicated by the "end of stream" bit.

Fixes #2280.
2018-06-20 19:27:47 +02:00
Moritz Bunkus
10f030a504
Ogg Opus reader: enable debugging for opus_reader & ogm_opus_reader 2018-06-20 18:58:36 +02:00
Moritz Bunkus
e718c896be
Opus packetizer: improve debug messages 2018-06-20 18:58:23 +02:00
Moritz Bunkus
46164c0070
audio packetizers: keep discard padding if present on source packet
Only applies to the packetizers for the following formats: AAC, AC-3,
DTS, MP3 and TrueHD. The other packetizers were already keeping the
value.

Fixes #2296.
2018-06-19 21:58:02 +02:00
Moritz Bunkus
c9e95d272b
translations on macOS: use path relative to executable for finding .po files
Together with the additions of building `libiconv` and a complete
`gettext` in `build.sh` in revision
e17cbecb16, this enables the use of all
available interface translations on macOS.

Fixes #2110, #2307, #2323.
2018-06-16 22:29:48 +02:00
Moritz Bunkus
e17cbecb16
macOS build: update all libraries, add iconv & full gettext build 2018-06-16 21:57:42 +02:00
Moritz Bunkus
d290e0dbf1
base64tool: fix compilation after removal of 'using namespcae' from headers 2018-06-15 18:39:25 +02:00
Moritz Bunkus
4eefc50110
JSON identification: replace invalid UTF-8 bytes with placeholder characters
nlohmann's JSON libraries in version 2.x used to strip bytes that
aren't valid UTF-8 from strings (e.g. service/station names in MPEG
transport streams) before outputting the JSON data structures. With
MKVToolNix v24 that bundled library was updated to v3 which now throws
an exception on such invalid data.

Therefore mkvmerge now takes care of replacing invalid bytes with
placeholder characters itself before passing the strings to nlohmann's
JSON library.

Fixes #2327.
2018-06-15 17:45:22 +02:00
Moritz Bunkus
1ca6c7f8d9
UTF-8 CPP: update to 2.3.5 revision 1537543999978d3a0464560a9a940d6140c6ba59 2018-06-15 17:45:22 +02:00
Moritz Bunkus
8bcc286dfc
refactoring: no 'using namespace …' in header files
It is dangerous insofar as it pollutes an immense number of source
files. For example, utf8cpp's stuff uses relative namespace
names (e.g. `utf8::some_type`). If `using namespace libebml` is in
effect, then this clashes with `libebml::utf8` which is a typedef for
`unsigned char`, causing compiler errors.
2018-06-15 17:45:22 +02:00
Moritz Bunkus
c8cb86b8fb
bit_reader_c: fix get_bit_position/get_remaining_bits for empty buffers
One side affect of the fixed bug was that trying to identify/mux an
empty file (file with a size of 0) resulted in the following error
message:

> Error: buffer_c: num > m_filled. Should not have happened. Please
> file a bug report.
2018-06-14 21:23:42 +02:00
Moritz Bunkus
1c7ad896a1
MPEG TS: compare MPLS start/end timestamps against PTS, not DTS
Otherwise the first video key frame was dropped whenever it wasn't the
first frame in presentation order.

Fixes #2321.
2018-06-14 20:48:28 +02:00
Moritz Bunkus
5030625bd9
MPEG TS reader: prefix all debug names with mpeg_ts_ 2018-06-14 20:19:15 +02:00
Moritz Bunkus
c0fb339e71
MPEG TS reader: add debug code for not zero-basing timestamps 2018-06-14 19:24:14 +02:00
Moritz Bunkus
9d26ac99ea
TrueHD/MLP packetizer: don't attempt dialog volume normalization removal for MLP 2018-06-13 22:06:07 +02:00
Moritz Bunkus
f265565c42
tests: update for MLP fix of #2326 2018-06-13 22:06:07 +02:00
Moritz Bunkus
01f4a8191e
TrueHD/AC-3 converter: handle MLP, too
Part of the fix of #2326.
2018-06-13 22:06:07 +02:00
Moritz Bunkus
347c230448
TrueHD/MLP parser: is_normal() must test if m_type is normal, not sync
Part of the fix for #2326.
2018-06-13 22:06:07 +02:00
Moritz Bunkus
b5340c61e2
TrueHD/MLP parser: set codec of non-sync frames based on last sync frame
Part of the fix for #2326.
2018-06-13 22:06:07 +02:00
Moritz Bunkus
832335ce30
TrueHD/MLP parser: use mxdebug_if instead of mxverb 2018-06-13 21:57:30 +02:00
Moritz Bunkus
93d02a0208
TrueHD packetizer: use boost::optional instead of magic value 2018-06-13 19:35:34 +02:00
Moritz Bunkus
07ab76f377
timestamp_calculator_c: add_timestamp overload with boost::optional<int64_t> 2018-06-13 19:35:06 +02:00
Moritz Bunkus
9afc43b209
HEVC/h.265 ES reader: clear parser's buffer after reading the headers
After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.

This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.

This is the HEVC analog for what was fixed for AVC in #2325.
2018-06-13 17:58:08 +02:00
Moritz Bunkus
ee46e1c7ab
AVC/h.264 ES reader: clear parser's buffer after reading the headers
After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.

This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.

Fixes #2325.
2018-06-13 17:52:29 +02:00
Jan Mazurczyk
92915be313
translations: update Polish 2018-06-11 20:04:08 +02:00
Moritz Bunkus
fca5c6fb9a
installer: convert translation files to UTF-8
Switching to NSIS 3 with Unicode support.
2018-06-11 19:44:20 +02:00
Moritz Bunkus
f34bc9a1f6
GUI: headers: allow removal of non-mandatory elements again
This was a regression from fixing #2320 in
0d7d5ca3dd.

Fixes #2322.
2018-06-11 16:14:54 +02:00