mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
42f8538a70
There's a new option called `--chapter-sync …` that behaves just like `--sync -2:…`. Both can be used to adjust the timestamps of chapters read from containers (such as Matroska or MP4 files) and chapter files (both the XML format and the Ogg comment style format). Part of the implementation of #2358.
29 lines
885 B
Ruby
Executable File
29 lines
885 B
Ruby
Executable File
#!/usr/bin/ruby -w
|
|
|
|
# T_651sync_chapter_timestamps
|
|
describe "mkvmerge / syncing chapter timestamps"
|
|
|
|
sources = [
|
|
[ "data/ogg/with_chapters.ogm", "--chapter-charset ISO-8859-15" ],
|
|
"data/mp4/o12-short.m4v",
|
|
"data/mkv/chapters-with-ebmlvoid.mkv",
|
|
]
|
|
|
|
sources.each do |source|
|
|
source = [ source, "" ] unless source.is_a? Array
|
|
|
|
test_merge source[0], :args => "#{source[1]}"
|
|
|
|
[ "", "-" ].each do |sign|
|
|
[ -1, -2 ].each { |id| test_merge source[0], :args => "#{source[1]} --sync #{id}:#{sign}1000,3/2" }
|
|
test_merge source[0], :args => "#{source[1]} --chapter-sync #{sign}1000,3/2"
|
|
end
|
|
end
|
|
|
|
[ "",
|
|
"--chapter-sync 1000,3/2", "--sync -1:1000,3/2", "--sync -2:1000,3/2",
|
|
"--chapter-sync -1000,3/2", "--sync -1:-1000,3/2", "--sync -2:-1000,3/2",
|
|
].each do |args|
|
|
test_merge "data/subtitles/srt/ven.srt", :args => "#{args} --chapters data/chapters/uk-and-gb.xml"
|
|
end
|