This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] Hybrid fails to extract tx3g subtitles from a mp4 container
#1
I have a mp4 file with 3 subtitles. I attached to this post the file HybridDebugOutput.txt and the ouput of mediainfo.

Looking at the debug output it is possible to see at row 3235 that the first subtitle is recognized as "tx3g" and is extracted correctly. But at row 3552 it is possible to see that Hybrid fails to extract the second subtitle, I also have some doubt that the subtitle has been recognized as "tx3g" so is not clear to me what command is using Hybrid to extract the second subtitle.
Reply
#2
Hybrid uses:
"D:/Programs/Hybrid\64bit\MP4Box.exe" "E:\TVshows\X-Files\X-Files 08x01.mp4" -srt 4 -out "E:\TVshows\X-Files\X-Files 08x01_lang_it.srt"
which should extract the subtitle track with id 4 as srt file. Which should be correct according to https://github.com/gpac/gpac/wiki/Subtitling-with-GPAC (4.)

Do you get an error when calling that call in a Windows Command Prompt?

What confuses me is that you wrote that the extraction of the second subtitle stream fails, but according to the log the extraction of the first stream fails.
found Subtitles: 0,it,4,3,tx3g,,Timed Text ### 1,it,5,4,tx3g,,Timed Text ### 2,en,6,5,tx3g,,Timed Text
and the error states:
2020.12.28 - 19:15:38_Windows 10 Version 1909 (64bit)_2020.12.13.1 - level 9: extractorFinished 'mp4box_subtitleExtractor' for: E:\TVshows\X-Files\X-Files 08x01_lang_it_4_text.srt
2020.12.28 - 19:15:38_Windows 10 Version 1909 (64bit)_2020.12.13.1 - level 9: Couldn't extract: E:\TVshows\X-Files\X-Files 08x01_lang_it_4_text.srt
also I see no indication that the 1st stream was extracted in the debug output.
Just checked the code Hybrid checked whether the expected output file (E:\TVshows\X-Files\X-Files 08x01_lang_it_4_text.srt) exists after MP4Box finished.
If the file really exists, my guess would be that some virus scanner or similar is blocking the access to it for a short time (a few ms) after creation, which is why Hybrid can't access it and thus assumes it doesn't exist.
So if you are running a virus scanner or similar software make sure it does not scan the temp folder while Hybrid is working.

Cu Selur
Reply
#3
I disabled the Microsoft antivirus, but the problem is still showing. The first subtitle get extracted even if the dialog error box shows that Hybrid failed to extract the subtitle. The Hybrid GUI remain "frozen" and I have to kill the application, in this situation all the remaining subtitles are not extracted.

Then I tried to perform the following test:

1) I used "My MP4Box GUI" to extract the subtitles (see attached image)

2) I used MKVtoolnix GUI to convert the mp4 container in mkv. For some reason also this tool is unable to get the subtitles (but this is an old problem), so I had to add the subtitles extracted previously with "My MP4Box GUI"

3) I used Hybrid to encode the movie and in this case the subtitles get extracted correctly and the encoding completed successfully.

So it seems that the problem is related only to mp4 containers.


Attached Files Thumbnail(s)
   
Reply
#4
Quote:So it seems that the problem is related only to mp4 containers.
no surprise there,..

Can't reproduce the issue with test files I have.

So the question remains:
Quote:Do you get an error when calling that call in a Windows Command Prompt?

If you have a small sample which allows me to reproduce the issue I can look into it.

Cu Selur
Reply
#5
It is better that you try to reproduce the problem.

You can find a sample of movie at the following link (*)

https://file.re/2020/12/28/x-files-08x01001/

Thanks

(*) The link will expiry at December 29, 2020, at 09:49 PM (CET) - Local time: 21:59 PM (CET)
Reply
#6
Got the file.
Will look at it tomorrow. (on my way to bed now)

Cu Selur
Reply
#7
I can reproduce the issue.
Will look into it.
One problem: looking at the file in a MPC-HC I see no subtitles for the first subtitle track.
Analyzing the file with MP4Box:
* Movie Info *
        Timescale 600 - 7 tracks
        Computed Duration 00:06:10.411 - Indicated Duration 00:06:10.411
        Fragmented File: no
        File suitable for progressive download (moov before mdat)
        File Brand isom - version 1
                Compatible brands: isom
        Created: GMT Mon Dec 28 20:41:56 2020
        Modified: GMT Mon Dec 28 20:41:56 2020

File has root IOD (9 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Not part of MPEG-4 Visual profiles (0xfe)
Audio PL: Not part of MPEG-4 audio profiles (0xfe)
No streams included in root OD

Track # 1 Info - TrackID 1 - TimeScale 90000
Media Duration 00:06:10.369 - Indicated Duration 00:06:10.369
Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 8880 samples
Visual Sample Entry Info: width=1918 height=1080 (depth=24 bits)
Visual Track layout: x=0 y=0 width=1918 height=1080
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1918 x 1080
        AVC Info: 1 SPS - 1 PPS - Profile High @ Level 4.1
        NAL Unit length bits: 32
        Pixel Aspect Ratio 1:1 - Indicated track size 1918 x 1080
        Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
        SPS#1 hash: E4541CFCC32BF4EB9EB9A3D26E642B5B4A3B822C
        PPS#1 hash: DB21ED7C621CDEF25CC891200B5A104273B15E6A
Self-synchronized
        RFC6381 Codec Parameters: avc1.640029
        Average GOP length: 83 samples
        Max sample duration: 3754 / 90000

Track # 2 Info - TrackID 2 - TimeScale 48000
Media Duration 00:06:10.410 - Indicated Duration 00:06:10.410
Media Info: Language "Italian (ita)" - Type "soun:mp4a" - 17363 samples
1 UDTA types: name (1)
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC (AOT=2 implicit) - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
        RFC6381 Codec Parameters: mp4a.40.2
Alternate Group ID 1
        All samples are sync
        Max sample duration: 1024 / 48000

Track # 3 Info - TrackID 3 - TimeScale 48000
Media Duration 00:06:10.410 - Indicated Duration 00:06:10.410
Track is disabled
Media Info: Language "English (eng)" - Type "soun:mp4a" - 17363 samples
1 UDTA types: name (1)
        Surround

MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC (AOT=2 implicit) - 6 Channel(s) - SampleRate 48000
Synchronized on stream 1
        RFC6381 Codec Parameters: mp4a.40.2
Alternate Group ID 1
        All samples are sync
        Max sample duration: 1024 / 48000

Track # 4 Info - TrackID 4 - TimeScale 90000
Media Duration 00:06:10.411 - Indicated Duration 00:06:10.411
Media Info: Language "Italian (ita)" - Type "sbtl:tx3g" - 1 samples
Unknown Text Stream
Size 1918 x 60 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: tx3g
Alternate Group ID 3
        All samples are sync
        Max sample duration: 33337053 / 90000

Track # 5 Info - TrackID 5 - TimeScale 90000
Media Duration 00:06:08.259 - Indicated Duration 00:06:08.259
Track is disabled
Media Info: Language "Italian (ita)" - Type "sbtl:tx3g" - 57 samples
Unknown Text Stream
Size 1918 x 60 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: tx3g
Alternate Group ID 3
        All samples are sync
        Max sample duration: 20789730 / 90000

Track # 6 Info - TrackID 6 - TimeScale 90000
Media Duration 00:06:08.335 - Indicated Duration 00:06:08.335
Track is disabled
Media Info: Language "English (eng)" - Type "sbtl:tx3g" - 61 samples
Unknown Text Stream
Size 1918 x 60 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: tx3g
Alternate Group ID 3
        All samples are sync
        Max sample duration: 20789730 / 90000

Track # 7 Info - TrackID 7 - TimeScale 1000
Media Duration 00:05:09.351 - Indicated Duration 00:05:09.351
Track is disabled
Media Info: Language "Undetermined (und)" - Type "text:text" - 3 samples
Unknown Text Stream
Size 0 x 0 - Translation X=0 Y=0 - Layer 0
        RFC6381 Codec Parameters: text
        All samples are sync
        Max sample duration: 205497 / 1000

Calling:
MP4Box.exe c:\Users\Selur\Desktop\x-files-08x01001.mp4 -srt 4 -out "e:\Output\test.srt"
Produces an empty output. (extracting the other streams works fine)
-> I'll look into Hybrid not freezing on extraction, but if the output is empty Hybrid will complain. Smile

Cu Selur
Reply
#8
Found the cause of the problem.
Hybrid calls MP4Box with "X-Files 08x01_lang_it.srt" but expects the output to be names "X-Files 08x01_lang_it_4_text.srt" Wink
-> fixing it Smile
Reply
#9
Send you a link to a dev version via PM which should fix the issue.
-> please test and report back, thx.

Cu Selur
Reply
#10
Sent you PM with my feedback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)