Open
Conversation
Owner
Author
|
@bbgdzxng1 have a look With this is can do: ➜ fq git:(mpeg_ts_wip) ✗ go run . -C -d bytes 'tobytes[0:188*100000] | mpeg_ts | .pes[12].payload | mpeg_pes_packet | .gap0 | avc_au | d({line_bytes:10})' ~/Downloads/dtvcc/<redacted>.ts
│00 01 02 03 04 05 06 07 08 09│0123456789│.[0:8]: (avc_au)
0x000a│ 00│ .│ [0]: raw bits
0x0014│00 00 01 │... │
│00 01 02 03 04 05 06 07 08 09│0123456789│ [1]{}: nalu (avc_nalu)
0x0014│ 09 │ . │ forbidden_zero_bit: false
0x0014│ 09 │ . │ nal_ref_idc: 0
0x0014│ 09 │ . │ nal_unit_type: "aud" (9) (Access unit delimiter)
0x0014│ f0 │ . │ data: raw bits
0x0014│ 00 00 00 01 │ .... │ [2]: raw bits
│00 01 02 03 04 05 06 07 08 09│0123456789│ [3]{}: nalu (avc_nalu)
│00 01 02 03 04 05 06 07 08 09│0123456789│ sei{}: (avc_sei)
0x00│04 │. │ payload_type: "user_data_registered_itu_t_t35" (4)
0x00│ 47 │ G │ payload_size: 71
0x00│ b5 00 31 47 41 39 34 03│ ..1GA94.│ data: raw bits
0x00│54 00 fc 80 80 fd 80 80 fa 00│T.........│
0x01│00 fa 00 00 fa 00 00 fa 00 00│..........│
* │until 0x48.7 (71) │ │
0x04│ 80│ │ .│ │ rbsp_trailing_bits: raw bits
0x0014│ 06│ .│ forbidden_zero_bit: false
0x0014│ 06│ .│ nal_ref_idc: 0
0x0014│ 06│ .│ nal_unit_type: "sei" (6) (Supplemental enhancement information)
0x001e│04 47 b5 00 31 47 41 39 34 03│.G..1GA94.│ data: raw bits
0x0028│54 00 fc 80 80 fd 80 80 fa 00│T.........│
* │until 0x67.7 (74) │ │
0x0064│ 00 00 01 │ ... │ [4]: raw bits
│00 01 02 03 04 05 06 07 08 09│0123456789│ [5]{}: nalu (avc_nalu)
│00 01 02 03 04 05 06 07 08 09│0123456789│ sei{}: (avc_sei)
0x00│01 │. │ payload_type: "pic_timing" (1)
0x00│ 01 │ . │ payload_size: 1
0x00│ 32 │ 2 │ data: raw bits
0x00│ 80│ │ .│ │ rbsp_trailing_bits: raw bits
0x0064│ 06 │ . │ forbidden_zero_bit: false
0x0064│ 06 │ . │ nal_ref_idc: 0
0x0064│ 06 │ . │ nal_unit_type: "sei" (6) (Supplemental enhancement information)
0x0064│ 01 01│ ..│ data: raw bits
0x006e│32 80 │2. │
0x006e│ 00 00 01 │ ... │ [6]: raw bits
│00 01 02 03 04 05 06 07 08 09│0123456789│ [7]{}: nalu (avc_nalu)
0x006e│ 41 │ A │ forbidden_zero_bit: false
0x006e│ 41 │ A │ nal_ref_idc: 2
0x006e│ 41 │ A │ nal_unit_type: "slice" (1) (Coded slice of a non-IDR picture)
│ │ │ slice_header{}:
0x006e│ 9a │ . │ first_mb_in_slice: 0
0x006e│ 9a │ . │ slice_type: "p" (5)
0x006e│ 9a │ . │ pic_parameter_set_id: 0
0x006e│ 9a c4 93 4b│ ...K│ data: raw bits
0x0078│64 42 bf fe bd 00 00 03 00 00│dB........│
0x0082│03 00 00 3e 36 24 00 27 99 f7│...>6$.'..│
* │until 0x5d4.7 (end) (1377) │ │So with some manual trickery (the mpeg_pes_packet decoder is broken) we can get to the nalu:s Some questions:
|
f28a3c6 to
6dadf23
Compare
Owner
Author
|
@bbgdzxng1 hey have not forgotten about this and t35 subtitles, just been busy and got a bit stuck with the ts decoder, so many decisions how to handle errors and broken stuff 😬 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.