Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,41 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Mediainfo> | |||
<File> | |||
<track type="General"> | |||
<Complete_name>/home/derobo/mkv_with_subtitle.mkv</Complete_name> | |||
<Format>Matroska</Format> | |||
<File_size>4.37 GiB</File_size> | |||
<Duration>1h 28mn</Duration> | |||
<Overall_bit_rate>7 061 Kbps</Overall_bit_rate> | |||
<Writing_application>mkvmerge v2.4.0 ('Fumbling Towards Ecstasy') built on Oct 11 2008 20:13:15</Writing_application> | |||
<Writing_library>libebml v0.7.7 + libmatroska v0.8.1</Writing_library> | |||
</track> | |||
<track type="Text"> | |||
<ID>1</ID> | |||
<Format>ASS</Format> | |||
<Codec_ID>S_TEXT/ASS</Codec_ID> | |||
<Codec_ID_Info>Advanced Sub Station Alpha</Codec_ID_Info> | |||
<Language>English</Language> | |||
</track> | |||
<track type="Text"> | |||
<ID>2</ID> | |||
<Format>SSA</Format> | |||
<Codec_ID>S_TEXT/SSA</Codec_ID> | |||
<Codec_ID_Info>Sub Station Alpha</Codec_ID_Info> | |||
</track> | |||
<track type="Text"> | |||
<ID>3</ID> | |||
<Format>UTF-8</Format> | |||
<Codec_ID>S_TEXT/UTF8</Codec_ID> | |||
<Codec_ID_Info>UTF-8 Plain Text</Codec_ID_Info> | |||
<Language>French</Language> | |||
</track> | |||
<track type="Text"> | |||
<ID>4</ID> | |||
<Format>VobSub</Format> | |||
<Codec_ID>S_VOBSUB</Codec_ID> | |||
<Codec_ID_Info>The same subtitle format used on DVDs</Codec_ID_Info> | |||
<Language>English</Language> | |||
</track> | |||
</File> | |||
</Mediainfo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,44 @@ | |||
require "test_helper" | |||
require "mediainfo_test_helper" | |||
|
|||
class MediainfoSubtitleTest < ActiveSupport::TestCase | |||
def setup | |||
@info = mediainfo_mock "subtitle" | |||
end | |||
|
|||
test 'text streams count' do | |||
assert_equal 4, @info.text.count | |||
end | |||
|
|||
test "text 1 stream id" do | |||
assert_equal "1", @info.text[0].stream_id | |||
end | |||
|
|||
test "text 1 Format" do | |||
assert_equal "ASS", @info.text[0].format | |||
end | |||
|
|||
test "text 1 Codec ID" do | |||
assert_equal "S_TEXT/ASS", @info.text[0].codec_id | |||
end | |||
|
|||
test "text 1 Codec ID info" do | |||
#assert_equal "Advanced Sub Station Alpha", @info.text[0].codec_id_info | |||
end | |||
|
|||
test "text 2 stream id" do | |||
assert_equal "2", @info.text[1].stream_id | |||
end | |||
|
|||
test "text 1 Format" do | |||
assert_equal "SSA", @info.text[1].format | |||
end | |||
|
|||
test "text 1 Codec ID" do | |||
assert_equal "S_TEXT/SSA", @info.text[1].codec_id | |||
end | |||
|
|||
test "text 1 Codec ID info" do | |||
#assert_equal "Sub Station Alpha", @info.text[1].codec_id_info | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters