Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th June 2019, 15:09   #61  |  Link
frank
Banned
 
Join Date: Oct 2001
Location: https://t.me/pump_upp
Posts: 811
I want to set the SEI frame-packing info
Code:
h264Modify mkv3d_3d.264 -frame_packing SBS film_3d.264
but h264Modify doesn't show that info.

Code:
NAL position 0x000158A0 (88224)
  nal_unit_type:  7 "Sequence parameter set"
  profile_idc       = 100 "High"
  constraint_flags  = 16 (0x10)
      constraint_set0_flag = 0
      constraint_set1_flag = 0
      constraint_set2_flag = 0
      constraint_set3_flag = 0
      constraint_set4_flag = 1
      constraint_set5_flag = 0
  level_idc         = 40
  time_scale / 2    = 24000
  num_units_in_tick = 1001
  fixed_frame_scale = 0
Nothing changed. I miss the frame-packing field.
3D encodings with ffmpeg / x264 and --frame-packing=3 also don't show the field. But it should be there.
The other infos can be changed.

Last edited by frank; 12th June 2019 at 15:23.
frank is offline   Reply With Quote
Old 17th June 2019, 20:07   #62  |  Link
videofan3d
Registered User
 
Join Date: Sep 2013
Location: Czech Republic
Posts: 321
Quote:
Originally Posted by frank View Post
I want to set the SEI frame-packing info
Code:
h264Modify mkv3d_3d.264 -frame_packing SBS film_3d.264
but h264Modify doesn't show that info.

Code:
NAL position 0x000158A0 (88224)
  nal_unit_type:  7 "Sequence parameter set"
  profile_idc       = 100 "High"
  constraint_flags  = 16 (0x10)
      constraint_set0_flag = 0
      constraint_set1_flag = 0
      constraint_set2_flag = 0
      constraint_set3_flag = 0
      constraint_set4_flag = 1
      constraint_set5_flag = 0
  level_idc         = 40
  time_scale / 2    = 24000
  num_units_in_tick = 1001
  fixed_frame_scale = 0
Nothing changed. I miss the frame-packing field.
3D encodings with ffmpeg / x264 and --frame-packing=3 also don't show the field. But it should be there.
The other infos can be changed.
In fact, the frame_packing info is inserted as SEI message

Code:
nal_unit_type:  6 "SEI"
  nal_ref_idc: 0
  payload_type: 45 "frame_packing_arrangement"
  payload_size: 7
videofan3d is offline   Reply With Quote
Old 18th June 2019, 12:19   #63  |  Link
frank
Banned
 
Join Date: Oct 2001
Location: https://t.me/pump_upp
Posts: 811
Ok, thanks, it works, I verified it with H.264 Analyzer.

But how did you display this info?
h264Modify version 2.0 without options
Code:
h264Modify.exe film_3d.264
only shows nal_unit_type 7 but not nal_unit_type 6. This info is missing.
Please, correct the issue.

Why is h264Modify so important?
Today we can encode much faster using HW encoders - Intel qsv, NVIDIA nvenc. But this tools can't inject the SEI frame_packing info. E.g. for 3D in MP4 (Google Cardboard VR) this metadata is important.
frank is offline   Reply With Quote
Old 27th August 2019, 23:31   #64  |  Link
outgoing
Registered User
 
Join Date: Aug 2018
Posts: 68
Also, once done the conversion of a mpls to json, the information it gives is great, but if when you do the conversion again to .mpls no longer plays the movie, at least in my case, what good is it to change parameters if later the file is not valid. Sure I'm missing something, how to change some parameter in the json and convert it properly to mpls. Sorry, maybe these are obvious questions for some but not for me.

edited:
Sorry, editing with wordpad everything fine. Thanks!!

Last edited by outgoing; 30th August 2019 at 02:26.
outgoing is offline   Reply With Quote
Old 3rd November 2019, 11:35   #65  |  Link
pel9
Registered User
 
pel9's Avatar
 
Join Date: Oct 2019
Posts: 34
mpls parsing of Dolby Vision substream

I reversed some info about the Dolby Vision stream.
The next byte after the number_of_PiP_PG_textST_stream_entries_plus in the STN_table() is the number_of_DV_video_stream_entries*
The value could be 0 or 1.
If the value is 1 then at the end of STN_table() there is a stream_entry() and stream_attributes() structure.

The stream_entry() has a new stream_type (4) and the structure is:
length 8 bit (=9)
stream_type 8 bit (=4)
reserved 8 bit
ref_to_stream_PID_of_DVstream* 16 bit
reserved 40 bit

The stream_attributes() structure is similar to the main video stream

* These names are guessed by me

Also reversed some extension

Last edited by pel9; 5th November 2019 at 17:27.
pel9 is offline   Reply With Quote
Old 9th November 2019, 23:50   #66  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,534
Ah, welcome back and many thanks for your work !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 2nd January 2020, 16:49   #67  |  Link
TitanFan
Registered User
 
Join Date: Oct 2011
Posts: 9
So, I'm looking at a playlist that references the same m2ts file multiple times with different in_time and out_time values. For example mplsdump on a playlist reports 45 clips, and each clip has an in_time and out_time value. When I convert the playlist to a json file, I can see the in_time and out_time values, but I'm not sure what the format is?

For example:

"Clip_Information_file_name": "00351",
"Clip_codec_identifier": "M2TS",
"ref_to_STC_id": 0,
"reserved01": 0,
"is_multi_angle": 0,
"connection_condition": 1,
"IN_time": 11042287,
"OUT_time": 16109850,

What is the in_time and out_time format? How can I convert this format to hh:mm:ss time format?
TitanFan is offline   Reply With Quote
Old 2nd January 2020, 16:54   #68  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Quote:
Originally Posted by TitanFan View Post
What is the in_time and out_time format? How can I convert this format to hh:mm:ss time format?
Divide by 45000 to get the total time in seconds. Then you can work out the hours, minutes, and seconds from that.
videoh is offline   Reply With Quote
Old 3rd January 2020, 04:37   #69  |  Link
TitanFan
Registered User
 
Join Date: Oct 2011
Posts: 9
Thanks - dividing by 45000 worked. I checked a BDedit playlist report and it has the same in_time/out_time as BDTools. For some reason these playlist times are always 10-15 seconds off when I check the video....I can play the playlist file and it selects the video parts correctly, so I'm not sure why these playlist reports are showing incorrect times. Good news is that the times are off by a consistent amount, so I can just subtract the 10-15 seconds off each time to correct the problem.
TitanFan is offline   Reply With Quote
Old 21st April 2020, 22:35   #70  |  Link
koka
Registered User
 
Join Date: Jun 2018
Posts: 14
Which "command" is true?
How in MPLS2JSON.exe:
{
"operation_code": 1212154624,
"operand_1": 10,
"operand_2": 65535,
"command": "Greater_or_Equal reg_10 65535"
}
or other::
{
"operation_code": 1212154624,
"operand_1": 10,
"operand_2": 65535,
"command": "Not_Equal reg_10 65535"
}
__________________
tsmuxerCLI
koka is offline   Reply With Quote
Old 21st April 2020, 23:00   #71  |  Link
koka
Registered User
 
Join Date: Jun 2018
Posts: 14
Quote:
Originally Posted by pel9 View Post
structure is:
length 8 bit (=9)
stream_type 8 bit (=4)
reserved 8 bit
ref_to_stream_PID_of_DVstream* 16 bit
reserved 40 bit
"STN_table": {
"stream": [
{
"type": 1,
"pid": 4113,
"stream_coding_type": "H.265",
"video_format": "2160p",
"frame_rate": "23_976",
"reserved_uhd": 18,
"reserved01": 16384
},
...
{
"type": 4,
"pid": 5376,
"stream_coding_type": "H.265",
"video_format": "1080p",
"frame_rate": "23_976",
"reserved_uhd": 34,
"reserved01": 0
}
where:
ru=st.get("reserved_uhd", 0)
if ru:
if ru==0x12: uhd|=0b10010 #HDR10plus and HDR10
elif ru==0x80: uhd|=0b10000 #HDR10plus
elif ru==0x22: uhd|=0b00100 #DV
__________________
tsmuxerCLI
koka is offline   Reply With Quote
Old 28th April 2020, 18:46   #72  |  Link
videofan3d
Registered User
 
Join Date: Sep 2013
Location: Czech Republic
Posts: 321
Quote:
Originally Posted by koka View Post
Which "command" is true?
How in MPLS2JSON.exe:
{
"operation_code": 1212154624,
"operand_1": 10,
"operand_2": 65535,
"command": "Greater_or_Equal reg_10 65535"
}
or other::
{
"operation_code": 1212154624,
"operand_1": 10,
"operand_2": 65535,
"command": "Not_Equal reg_10 65535"
}
Not_Equal seems to be correct.

(there is one-bit-shift bug in MPLS2JSON.exe)
videofan3d is offline   Reply With Quote
Old 2nd March 2023, 00:31   #74  |  Link
karbre
Registered User
 
Join Date: May 2021
Posts: 6
What is the unit of timestamps in a JSON generated by mpls2json? E.g. "IN_time": 30990600
It doesn't seem to be ms, ns or anything similar.

edit: found the answer, it's x/45000 seconds

Last edited by karbre; 2nd March 2023 at 02:22.
karbre is offline   Reply With Quote
Old 26th March 2023, 14:04   #75  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Quote:
Originally Posted by frank View Post
Code:
h264Modify.exe film_3d.264
only shows nal_unit_type 7 but not nal_unit_type 6. This info is missing.
Please, correct the issue.

Why is h264Modify so important?
Today we can encode much faster using HW encoders - Intel qsv, NVIDIA nvenc. But this tools can't inject the SEI frame_packing info. E.g. for 3D in MP4 (Google Cardboard VR) this metadata is important.
I second this request.

I have the intention to write a GUI (integrated in BD3D2MK3D) to automatically demux the AVC stream from a MKV (2D or 3D), use your valuable h264Modify tool to either insert the correct frame-packing or to delete it, and remux the patched MKV.

Due to a serious bug in the BigScreen software, many hardware players are unable to display the 3D images correctly when that SEI message is present, as you can see here. Hence the necessity for some users to remove it, even when it is correct. And of course, adding it in the too numerous 3D movies lacking it is obviously also important.

Of course, I would like to be able to show the current frame-packing mode in the GUI, or if it is not specified. It's important to avoid to demux, patch and remux the AVC stream without a good reason.

Can you add the information in the output (with also the current 3D mode please) ? Or an option to display only that information as soon as it is detected and exit immediately will be even better.

Thanks in advance.

[EDIT] If someone knows a free CLI tool able to display that information, please let me know.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 26th March 2023 at 14:16.
r0lZ is offline   Reply With Quote
Old 28th March 2023, 12:21   #76  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
My GUI is on the way, but I have just noticed this strange problem with this h264Modify command:
Code:
"h264Modify.exe" "in.avc" "out.avc" -frame-packing SBS:LR
(Or with any other frame-packing value, including DELETE).

This message is issued (probably in stderr):
Code:
H.264 Stream Modifier - version 2.00 (build: Aug 24 2017)

WARNING: h264Modify.exe - unknown option --frame-packing specified, ignoring...
However, --frame-packing (with -- instead of a single -) is never present in my code.

Note that if I use --frame-packing in the command, the warning becomes "unknown option ---frame-packing" ! (Again, the command works correctly.)

Unfortunately, due to this strange message, I have no simple way to verify if the command has worked correctly from my GUI. (Actually, the command has worked perfectly, despite the strange warning.)

Can you fix that little problem, please ? Thanks.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 28th March 2023 at 12:27.
r0lZ is offline   Reply With Quote
Old 3rd April 2023, 09:31   #77  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
I have finished the GUI, and I will release a new version of BD3D2MK3D soon.

But I have found another bug in h264 modify, and this one is very important. The frame-packing "Frame Alternation" is missing. It is available with the x264 option --frame-packing 5, but it is not possible to specify it in the command line of h264Modify. It's a pity, as it's probably the most necessary format after SBS and TAB. Videofan3D, can you add it ? Thanks !
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 4th January 2024, 12:10   #78  |  Link
outgoing
Registered User
 
Join Date: Aug 2018
Posts: 68
@videofan3d

In MPLS2JSON there is some kind of bug concerning the editing of dolby vision data in UHD mpls. Without making any modification in the original mpls of any UHD physical disc containing DV data if I convert this .mpls to .json and without changing any data I convert it back to mpls in this conversion process some data related to the DV feature is "lost" which makes that it cannot be activated in a player like Oppo. If I open the two mpls (original/converted without changing any data) in hex, you will see that there are a series of differences and these cause the "breaking" of the DV in a physical disc to be activated when it is played. Can you please check this.

Edited:
On the other hand, if I edit the .mpls in BDedit and make some changes, the resulting mpls has only changed the data that I have modified and keeps the DV data and it is possible to play the disc with DV in any player.

Edited1:
In .mpls belonging to 2D/3D Full Bluray disks, this is not a problem, it preserves the integrity of all data and only the data you have modified after the conversion is done.

From all this it is clear that your application was designed and works great for 2D/3D discs. On UHD discs with hdr10 it also works correctly in the tests I have done. It only works badly on all UHD discs that include Dolby Vision data. So when you go back to the edited .mpls some data is already lost or corrupted relative to DV.

Last edited by outgoing; 6th January 2024 at 08:35.
outgoing is offline   Reply With Quote
Old 7th February 2024, 23:10   #79  |  Link
videofan3d
Registered User
 
Join Date: Sep 2013
Location: Czech Republic
Posts: 321
Quote:
Originally Posted by outgoing View Post
From all this it is clear that your application was designed and works great for 2D/3D discs. On UHD discs with hdr10 it also works correctly in the tests I have done. It only works badly on all UHD discs that include Dolby Vision data. So when you go back to the edited .mpls some data is already lost or corrupted relative to DV.
It is possible - I prepared application based on BD2D/3D specification which I obtained (by chance) - and which is not freely available, unfortunately. In that time UHD extension was not specified, yet.

Provide me with few UHD Dolby Vision BD titles (meaning names) which suffer by this issue - I can try to look at it.
videofan3d is offline   Reply With Quote
Old 7th February 2024, 23:26   #80  |  Link
outgoing
Registered User
 
Join Date: Aug 2018
Posts: 68
You will see that any full UHD containing DV when editing the mpls specific to the main movie will corrupt the DV data. For example in my direct experience these titles i have worked with:
Belle (2021) UHD
Ghost in the Shell (1995) UHD
Kick-Ass 2 (2013) UHD
Sisu (2022) UHD


Thank you for continuing to develop these great editing tools.
outgoing is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.