Hello, I need your help:
I've a XML file which extracted from TS file by ffmpeg (it shows bin_data), I think it's subtitles because it's time, ex 00:00:17.000.
I've tried to use Subtitle Edit to convert but it just show 1 line, I think because the XML has only line.
So can you help me to convert this XML to ASS or SRT? If you can, can you show me how to extract that XML like this?
Thanks for your reading, and hope you will reply soon.
that data tracks info:
command i use to extract that xml:Code:Stream #0:2[0x1c00]: Data: bin_data ([6][0][0][0] / 0x0006)
test.xmlCode:ffmpeg -i input.m2ts -map 0:2 -c copy -copy_unknown -f data test.xml
+ Reply to Thread
Results 1 to 13 of 13
-
-
Could you upload somewhere the ts file?
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
I doubt the problem is that everything is in one line.
That xml has some strange character in it, which probably cause the problems.
Here's an exert:
Code:<?xml version="1.0" encoding="utf-8"?> <tt xmlns="http://www.w3.org/ns/ttml" xmlns:arib-tt="http://www.arib.or.jp/ns/arib-ttml/v1_0" xmlns:tts="http://www.w3.org/ns/ttml#styling" xml:lang="ja"> <head> <styling> <style xml:id="writingMode1" tts:writingMode="lrtb" /> <style xml:id="fontFamily1" tts:fontFamily="丸ゴシック" tts:fontStyle="normal" tts:fontWeight="normal" /> <style xml:id="normalSize1" tts:fontSize="144px 144px" tts:lineHeight="240px" arib-tt:letter-spacing="16px" /> <style xml:id="foreColor1" tts:color="#FFFF00FF" /> <style xml:id="backColor1" tts:backgroundColor="#00000080" /> <style xml:id="middleSize1" tts:fontSize="72px 144px" tts:lineHeight="240px" arib-tt:letter-spacing="8px" /> </styling> <layout> <region xml:id="r1170" tts:extent="1040px 240px" tts:origin="552px 1556px" /> <region xml:id="r1180" tts:extent="2640px 240px" tts:origin="632px 1796px" /> </layout> </head> <body> <div begin="00:06:58.334" end="00:07:03.834"> <p xml:id="P790-1" region="r1170"> <span xml:id="S790-1" style="writingMode1 fontFamily1 normalSize1 foreColor1 backColor1">うん?</span> <span xml:id="S790-2" style="writingMode1 fontFamily1 middleSize1 foreColor1 backColor1"></span> <span xml:id="S790-3" style="writingMode1 fontFamily1 normalSize1 foreColor1 backColor1">いや〜</span> </p> <p xml:id="P790-2" region="r1180"> <span xml:id="S790-4" style="writingMode1 fontFamily1 normalSize1 foreColor1 backColor1">なかなか</span> <span xml:id="S790-5" style="writingMode1 fontFamily1 middleSize1 foreColor1 backColor1"></span> <span xml:id="S790-6" style="writingMode1 fontFamily1 normalSize1 foreColor1 backColor1">いいとこだよ</span> <span xml:id="S790-7" style="writingMode1 fontFamily1 middleSize1 foreColor1 backColor1"></span> <span xml:id="S790-8" style="writingMode1 fontFamily1 normalSize1 foreColor1 backColor1">ベトナムは</span> <span xml:id="S790-9" style="writingMode1 fontFamily1 middleSize1 foreColor1 backColor1">。</span> </p> </div> </body> </tt> ¬p F
(Attached a more readable version of the xml.)
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
-
-
If Subtitle Edit does not support the (cleaned up) xml format you have, you could either:
a. ask the Subtitle Edit authors whether they can support your format. Assuming you can show them a specification, since seeing that ffmpeg detects the stream as bin_data it might not be a generally known subtitle format.
b. write something (in a program language you know yourself) to do the conversion yourself, or search for someone who is willing to do it (maybe for payment). Personally, I don't know enough about the xml formatting that was used and the ass format in detail to write a conversion quickly.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Use arib-ts2ass. Find the instructions in the original repository. You may need to fix the output .ASS file by adding [Events] headers before the dialog entries.
-
I've installed it but seem it's error
Code:Traceback (most recent call last): File "\\?\C:\Users\kien\AppData\Local\Programs\Python\Python312\Scripts\arib-ts2ass-script.py", line 33, in <module> sys.exit(load_entry_point('arib==0.6.5', 'console_scripts', 'arib-ts2ass')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "\\?\C:\Users\kien\AppData\Local\Programs\Python\Python312\Scripts\arib-ts2ass-script.py", line 25, in importlib_load_entry_point return next(matches).load() ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kien\AppData\Local\Programs\Python\Python312\Lib\importlib\metadata\__init__.py", line 205, in load module = import_module(match.group('module')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kien\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1381, in _gcd_import File "<frozen importlib._bootstrap>", line 1354, in _find_and_load File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 929, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 994, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "C:\Users\kien\AppData\Local\Programs\Python\Python312\Lib\site-packages\arib-0.6.5-py3.12.egg\arib\ts2ass.py", line 18, in <module> ImportError: cannot import name 'EOFError' from 'read' (C:\Users\kien\AppData\Local\Programs\Python\Python312\Lib\site-packages\read\__init__.py)
-
-
Sounds like your pip install command failed with python2. This is very common if you have multiple version of Python on the same computer, or there is a broken install of arib-ts2ass that you did not remove.
Try to force python2 with C:\...\python2.exe -m pip install [...], or in a virtual machine with ubuntu or something. -
-
I just use TS-Doctor to fix that TS file, but it's not fix that to me. All error came from bin_data track which I said before. Can you help me how to fix this TS with TS-Doctor, or extract that TTML subs to file that I can use to convert ASS?
Last edited by kienkzz; 24th Mar 2024 at 05:13. Reason: update status
Similar Threads
-
succed to convert xml to srt, but the sub position wrong
By Bobiaj in forum SubtitleReplies: 13Last Post: 27th Apr 2023, 08:55 -
How to properly convert .ass to .sup with overlapping timestamped subtitle?
By leml in forum SubtitleReplies: 3Last Post: 8th May 2022, 15:47 -
Convert DVD subtitles (IFO) to .ASS or similar?
By Asterra in forum DVD RippingReplies: 2Last Post: 12th Feb 2021, 17:36 -
Convert 2 .srt languages in 1 .ass
By islogged in forum SubtitleReplies: 4Last Post: 24th Nov 2020, 12:16 -
Convert .ass to Blu Ray .sup
By RafaMR14 in forum SubtitleReplies: 5Last Post: 2nd Sep 2019, 13:53