Open FranceBB opened 2 years ago
Forcing "Full Parsing" shows two tracks, so the idea here is to improve Mediainfo's reliability in detecting the second track, perhaps increasing the parsing whenever it detects the vbi_vanc_smpte_436M track.
Full Parsing result:
<TABLE style="BORDER-TOP: navy 1px solid; BORDER-RIGHT: navy 1px solid; BORDER-BOTTOM: navy 1px solid; BORDER-LEFT: navy 1px solid" cellSpacing=2 cellPadding=1 width="100%" border=0>
Video | |||
ID : | 1001 | ||
Format : | AVC | ||
Format/Info : | Advanced Video Codec | ||
Format profile : | High 4:2:2 Intra@L5.2 | ||
Format settings, CABAC : | No | ||
Format settings, GOP : | N=1 | ||
Format settings, wrapping mode : | Frame | ||
Codec ID : | 0D01030102106001-0401020201323001 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 500 Mb/s | ||
Width : | 3 840 pixels | ||
Height : | 2 160 pixels | ||
Display aspect ratio : | 16:9 | ||
Frame rate : | 50.000 FPS | ||
Color space : | YUV | ||
Chroma subsampling : | 4:2:2 | ||
Bit depth : | 10 bits | ||
Scan type : | Progressive | ||
Bits/(Pixel*Frame) : | 1.206 | ||
Stream size : | 194 GiB (98%) | ||
Title : | V1 | ||
Writing library : | x264 core 164 r3079 d9a19f0 | ||
Encoding settings : | cabac=0 / ref=1 / deblock=1:-4:-4 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=30 / lookahead_threads=5 / sliced_threads=0 / slices=8 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=1 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=0 / bitrate=500000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / vbv_maxrate=500000 / vbv_bufsize=500000 / nal_hrd=cbr / filler=1 / ip_ratio=1.40 / aq=1:1.00 | ||
Color range : | Limited | ||
Color primaries : | BT.709 | ||
Transfer characteristics : | BT.709 | ||
Matrix coefficients : | BT.709 |
Audio #1 | |||
ID : | 2001-1 | ||
Format : | Dolby E | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Muxing mode : | SMPTE ST 337 | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 1 291 kb/s | ||
Channel(s) : | 6 channels | ||
Channel layout : | L C Ls X R LFE Rs X | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 20 bits | ||
Delay relative to video : | -10 h 0 min | ||
Stream size : | 514 MiB (0%) | ||
Title : | UAT20530-AES1-fatto_Prog0 | ||
Original frame rate : | 25.000 | ||
Locked : | Yes |
Audio #2 | |||
ID : | 2001-2 | ||
Format : | Dolby E | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Muxing mode : | SMPTE ST 337 | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 505 kb/s | ||
Channel(s) : | 2 channels | ||
Channel layout : | X X X L X X X R | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 20 bits | ||
Delay relative to video : | -10 h 0 min | ||
Stream size : | 201 MiB (0%) | ||
Title : | UAT20530-AES1-fatto_Prog1 | ||
Original frame rate : | 25.000 | ||
Locked : | Yes |
Audio #3 | |||
ID : | 2002-1 | ||
Format : | Dolby E | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Muxing mode : | SMPTE ST 337 | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 1 291 kb/s | ||
Channel(s) : | 6 channels | ||
Channel layout : | L C Ls X R LFE Rs X | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 20 bits | ||
Delay relative to video : | -9 h 59 min | ||
Stream size : | 514 MiB (0%) | ||
Title : | UAT20530-AES2-fatto_Prog0 | ||
Original frame rate : | 25.000 | ||
Locked : | Yes |
Audio #4 | |||
ID : | 2002-2 | ||
Format : | Dolby E | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Muxing mode : | SMPTE ST 337 | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 505 kb/s | ||
Channel(s) : | 2 channels | ||
Channel layout : | X X X L X X X R | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 20 bits | ||
Delay relative to video : | -9 h 59 min | ||
Stream size : | 201 MiB (0%) | ||
Title : | UAT20530-AES2-fatto_Prog1 | ||
Original frame rate : | 25.000 | ||
Locked : | Yes |
Audio #5 | |||
ID : | 2003 | ||
Format : | PCM | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 2 304 kb/s | ||
Channel(s) : | 2 channels | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 24 bits | ||
Stream size : | 917 MiB (0%) | ||
Title : | A3 | ||
Locked : | Yes |
Audio #6 | |||
ID : | 2004 | ||
Format : | PCM | ||
Format settings : | Little | ||
Format settings, wrapping mode : | Frame (BWF) | ||
Codec ID : | 0D01030102060100 | ||
Duration : | 55 min 37 s | ||
Bit rate mode : | Constant | ||
Bit rate : | 2 304 kb/s | ||
Channel(s) : | 2 channels | ||
Sampling rate : | 48.0 kHz | ||
Frame rate : | 50.000 FPS (960 SPF) | ||
Bit depth : | 24 bits | ||
Stream size : | 917 MiB (0%) | ||
Title : | A4 | ||
Locked : | Yes |
Text #1 | |||
ID : | 3001-777 | ||
Format : | Teletext Subtitle | ||
Muxing mode : | Ancillary data / OP-47 / SDP | ||
Duration : | 55 min 37 s | ||
Title : | D1 |
Text #2 | |||
ID : | 3001-778 | ||
Format : | Teletext Subtitle | ||
Muxing mode : | Ancillary data / OP-47 / SDP | ||
Duration : | 55 min 37 s | ||
Title : | D1 |
Other #1 | |||
ID : | 901-Material | ||
Type : | Time code | ||
Format : | MXF TC | ||
Frame rate : | 50.000 FPS | ||
Time code of first frame : | 10:00:00:00 | ||
Time code settings : | Material Package | ||
Time code, striped : | Yes | ||
Title : | TC1 |
Other #2 | |||
ID : | 901-Source | ||
Type : | Time code | ||
Format : | MXF TC | ||
Frame rate : | 50.000 FPS | ||
Time code of first frame : | 10:00:00:00 | ||
Time code settings : | Source Package | ||
Time code, striped : | Yes | ||
Title : | TC1 |
perhaps increasing the parsing whenever it detects the vbi_vanc_smpte_436M track.
The issue here is not detecting the vbi_vanc_smpte_436M track, it is detected in your file (you get the first Teletext page), the issue is to read enough data for reaching all available Teletext pages without parsing the whole file. There is no index of the available Teletext pages AFAIK. In practice you can't be sure to have all Teletext pages without parsing the whole file (whatever is your algorithm, if you parse 99% of the file but there is a Teletext page only is the non parsed 1%, you miss it).
We have implemented a balance between parsing time (and storage read) and luck to get all, for Teletext or CEA-708 (same problem), for MXF we have implemented at the request of a sponsor the parsing in the middle of the file in addition to the beginning, it works well for him, for TS we added some options for manual setting of the maximum scanned duration (IIRC default is 30 seconds), but the only way to be sure you get all is to use the full parsing.
What alternative method would you see there that would fit your needs for sure? Scanning more? We can set an option for scanning 5 minutes instead of 30 seconds but if your second Teletext page appears at 5 minutes and 1 second you'll still miss it... Do I miss something in Teletext format about an index? (I am sure about the lack of index in CEA-608/708, less sure about Teletext)
Unfortunately Teletext is just as painful as CEA 608/708 in the sense that there isn't an index. I also tried to dump the container header with mxfdump (I mean mxfdump.exe --no-limit-entries %sourcefile% > %sourcefile%.mxfdump.txt) but there was no hint about the content of the 436m track in the header. In other words, you're right, one would need to parse the whole file in order to guarantee correct detection. Currently, 30 seconds are parsed at the beginning and in the middle, right? Scanning a third part or indeed increasing the scanned part a bit would definitely help. Of course, no one is ever gonna be sure to find subtitles every time, but it would be nice to be able to scan multiple points instead of just 30 seconds at the beginning and 30 seconds in the end. Speaking of which, is it actually seconds or frames? 'Cause the thing that caught my attention is that the very same file encoded at 25fps and subtitles synced at 25fps doesn't have any issues and mediainfo - when it performs the detection - detects both languages, however when the file is encoded at 50p with subtitles synced at 50p, mediainfo doesn't recognize it. If it's really parsing 30 seconds of the file, given that timecodes are basically the same, it should have been able to detect the two languages in both, so maybe it's actually counting frames and therefore it's counting just as little as 15 seconds in a 50p stream? I don't know.
P.s Since you, the author himself, replied, I'm taking the chance to say "thank you for everything you've done", Jerome and for giving birth to one of the most amazing free open source software ever. I've been using mediainfo since 2006, when I encoded my first files long time ago (way before I got into broadcasting). As an Avisynth developer and contributor, I couldn't be more thankful and I think everyone on Doom9 is forever gonna be grateful. I've been using mediainfo both privately and professionally in every company I've ever worked (Crunchyroll, Viewster, Sky) and it's also at the heart of many Avisynth based automatisation I made and thinking that something like this is open source really shows how good the community can be and I'll always be an advocate of open source software. ;)
Currently, 30 seconds are parsed at the beginning and in the middle, right?
I wrote too quickly. Checking the code, it is more hard coded and arbitrary 512 AVC frames and/or 64 MiB at the beginning and 64 MiB in the middle. There are a couple of other checks which need to be clarified at some point.
Scanning a third part or indeed increasing the scanned part a bit would definitely help.
But where would be the limit, if the third part does not fit your needs? There a pro and cons for that. Maybe an option for the duration/bytecount/etc so you can tweak yourself. But yet another option... Not soon (I am already late on paid support so free support is a bit on hold :( ...)
so maybe it's actually counting frames and therefore it's counting just as little as 15 seconds in a 50p stream? I don't know.
Right.
I'm taking the chance to say "thank you for everything you've done"
😊
Hi there, we have XAVC Intra Class 300 files with DolbyE audio and Teletext Subtitles muxed in mxf. Subtitles are muxed as OP47 and they're in the vbi_vanc_smpte_436M track. Italian (language 1) is in 777 and English (language 2) is in 778.
Expected behavior: Mediainfo is supposed to read and display two subtitles tracks, namely:
Actual behavior: Mediainfo only displays one subtitles track:
I can share a small sample via Aspera or WeTransfer if required, but only privately.
Full log:
`<TABLE style="BORDER-TOP: navy 1px solid; BORDER-RIGHT: navy 1px solid; BORDER-BOTTOM: navy 1px solid; BORDER-LEFT: navy 1px solid" cellSpacing=2 cellPadding=1 width="100%" border=0>
General
Video
Audio #1
Audio #2
Audio #3
Audio #4
Audio #5
Audio #6
Text
Other #1
Other #2
Other #3
`