Closed Avencheng closed 6 months ago
I am so sorry. Those are the two issues I set out to fix specifically, what's even worse is that I was testing it the whole time. I think I just got lost on the version of the file. I'll get you an update here tonight.
Try v0.0.55. I just pushed it.
python3 -m pip install --upgrade superkabuki
Let me know how it goes.
Yes, it works! Thanks a lot~
aven.cheng@MacBook-Pro detect_stream_insert_35 % superkabuki -i independent_frame.ts -o output.ts -s sidecar.txt -p 0x86
Writing output.ts
Program Number 1
PCR PID 256
Registration Descriptor added b'\x05\x04CUEI'
Streams Found:
Stream Type: 27 PID: 256 EI Len: 0
Stream Type: 15 PID: 257 EI Len: 6
Stream Added:
Stream Type: 134 PID: 134 EI Len: 3
But I prefer that it will show the inserted cue like before :)
aven.cheng@MacBook-Pro detect_stream_insert_35 % superkabuki -i independent_frame.ts -o output.ts -s sidecar.txt -p 0x86
Writing output.ts
Program Number 1
PCR PID 256
Registration Descriptor added b'\x05\x04CUEI'
Streams Found:
Stream Type: 27 PID: 256 EI Len: 0
Stream Type: 15 PID: 257 EI Len: 6
Stream Added:
Stream Type: 134 PID: 134 EI Len: 0
(27.9667, '/DAvAAAAAAAA///wFAUAAAABf+/+ACZoCH4AUsz1AAAAAAAKAAhDVUVJAAABNVqtIJI=')
(284.0, '/DAqAAAAAAAA///wDwUAAAABf0/+AYYDwAAAAAAACgAIQ1VFSQAAATVNVNSc')
I'll put that back, sorry about that, I have been trying to sort the PMT a bit. ffmpeg tsduck and threefive all recognize the SCTE-35 stream from SuperKabuki , but mediainfo doesn't and I'm not sure why. I add the registration descriptor and all that, but mediainfo doesn't seem to see it at all. I guess it doesn't really matter since everyone else sees it just fine.
My point being, I was printing out a bunch of debug stuff for the PMT so I turned off as much output as I could.
I'll turn it back on and I also have an update to preserve Adaptive Field Control values if present in PMT packets.
I'll do a new build tonight probably.
Awesome! Thanks for that me know. I really appreciate all your works ~
Hi~ I just gave a try of v.0.0.57, but there are two problems.
First, the insert_pts printed in terminal is not the exact same as my sidecar.txt, I don't know if it will have any impact.
aven.cheng@MacBook-Pro detect_stream_insert_35 % superkabuki -i independent_frame.ts -o output.ts -s sidecar.txt -p 0x86
Output File: output.ts
PMT Section Length: 29
Program Number: 1
PCR PID: 256
Program Info Length: 0
Added Registration Descriptor:
b'\x05\x04CUEI'
Found Streams:
Stream Type: 27 PID: 256 EI Len: 0
Stream Type: 15 PID: 257 EI Len: 6
Added Stream:
Stream Type: 134 PID: 134 EI Len: 3
Inserted Cue:
@20.133333, /DAvAAAAAAAA///wFAUAAAABf+/+ABtriH4AUsz1AAAAAAAKAAhDVUVJAAABNWA0vuQ=
Inserted Cue:
@276.0, /DAqAAAAAAAA///wDwUAAAABf0/+AXsHQAAAAAAACgAIQ1VFSQAAATWCWsHw
here is the content of my sidecar.txt.
aven.cheng@MacBook-Pro detect_stream_insert_35 % cat sidecar.txt
19.9667,/DAvAAAAAAAA///wFAUAAAABf+/+ABtriH4AUsz1AAAAAAAKAAhDVUVJAAABNWA0vuQ=
276.0,/DAqAAAAAAAA///wDwUAAAABf0/+AXsHQAAAAAAACgAIQ1VFSQAAATWCWsHw
Second, I have no problem with using threefive to verify the output.ts ( the PTS also looks fine).
aven.cheng@MacBook-Pro detect_stream_insert_35 % threefive output.ts
{
"info_section": {
"table_id": "0xfc",
"section_syntax_indicator": false,
"private": false,
"sap_type": "0x03",
"sap_details": "No Sap Type",
"section_length": 47,
"protocol_version": 0,
"encrypted_packet": false,
"encryption_algorithm": 0,
"pts_adjustment_ticks": 0,
"pts_adjustment": 0.0,
"cw_index": "0xff",
"tier": "0x0fff",
"splice_command_length": 20,
"splice_command_type": 5,
"descriptor_loop_length": 10,
"crc": "0x6034bee4"
},
"command": {
"command_length": 20,
"command_type": 5,
"name": "Splice Insert",
"time_specified_flag": true,
"pts_time": 19.966667,
"pts_time_ticks": 1797000,
"break_auto_return": false,
"break_duration": 60.293567,
"break_duration_ticks": 5426421,
"splice_event_id": 1,
"splice_event_cancel_indicator": false,
"out_of_network_indicator": true,
"program_splice_flag": true,
"duration_flag": true,
"splice_immediate_flag": false,
"event_id_compliance_flag": true,
"unique_program_id": 0,
"avail_num": 0,
"avail_expected": 0
},
"descriptors": [
{
"tag": 0,
"descriptor_length": 8,
"name": "Avail Descriptor",
"identifier": "CUEI",
"provider_avail_id": 309
}
],
"packet_data": {
"pid": "0x86",
"program": 1,
"pts_ticks": 1806000,
"pts": 20.066667
}
}
{
"info_section": {
"table_id": "0xfc",
"section_syntax_indicator": false,
"private": false,
"sap_type": "0x03",
"sap_details": "No Sap Type",
"section_length": 42,
"protocol_version": 0,
"encrypted_packet": false,
"encryption_algorithm": 0,
"pts_adjustment_ticks": 0,
"pts_adjustment": 0.0,
"cw_index": "0xff",
"tier": "0x0fff",
"splice_command_length": 15,
"splice_command_type": 5,
"descriptor_loop_length": 10,
"crc": "0x825ac1f0"
},
"command": {
"command_length": 15,
"command_type": 5,
"name": "Splice Insert",
"time_specified_flag": true,
"pts_time": 276.0,
"pts_time_ticks": 24840000,
"splice_event_id": 1,
"splice_event_cancel_indicator": false,
"out_of_network_indicator": false,
"program_splice_flag": true,
"duration_flag": false,
"splice_immediate_flag": false,
"event_id_compliance_flag": true,
"unique_program_id": 0,
"avail_num": 0,
"avail_expected": 0
},
"descriptors": [
{
"tag": 0,
"descriptor_length": 8,
"name": "Avail Descriptor",
"identifier": "CUEI",
"provider_avail_id": 309
}
],
"packet_data": {
"pid": "0x86",
"program": 1,
"pts_ticks": 24837000,
"pts": 275.966667
}
}
But it comes out an error message when I using DVB Inspector to inspect the output.ts.
It seems that DVB Inspector can not recognize any PMT and SCTE-35 in output.ts, this is never happened before.
Two separate issues.
Difference in Splice Point PTS
it is working correctly. All Splice Points are at iframes.
SuperKabuki is displaying the actual Splice Point PTS.
SuperKabuki always rounds up to the next iframe.
When you switch media, like to an ad, you have to start on iframes.
If you want to make your video life easier in general, set your GOP size to your frame rate. You get an iframe every second. Yes it does increase your bit rate a little, but in my opinion it's worth it.
PMT errors.
Hey man, good call on having the Sidecar Cues put back in the output. That's why the first issue was fast to resolve, the info we needed was easy to reach.
I have to ask, why are you using DVB Inspector? I'm not a fan.
I think I got it. Let me play with it a little.
I have to ask, why are you using DVB Inspector? I'm not a fan.
I don't have any good reason LOL, just because someone suggest me to use it, and I'm just a beginner of MPEG-TS and SCTE-35, What tool do you recommend?
pip up to 0.0.59
tsanalyze is pretty good.
a@slow:~/SuperKabuki$ tsanalyze sk-wbrb.ts
===============================================================================
| TRANSPORT STREAM ANALYSIS REPORT |
|=============================================================================|
| Transport Stream Id: .......... 1 (0x0001) | Services: .............. 1 |
| Bytes: ......................... 2,776,008 | PID's: Total: .......... 6 |
| TS packets: ....................... 14,766 | Clear: .......... 6 |
| With invalid sync: .................. 0 | Scrambled: ...... 0 |
| With transport error: ............... 0 | With PCR's: ..... 1 |
| Suspect and ignored: ................ 0 | Unreferenced: ... 0 |
|-----------------------------------------------------------------------------|
| Transport stream bitrate, based on ....... 188 bytes/pkt 204 bytes/pkt |
| User-specified: ................................... None None |
| Estimated based on PCR's: ................ 2,200,460 b/s 2,387,733 b/s |
| Selected reference bitrate: .............. 2,200,460 b/s 2,387,733 b/s |
|-----------------------------------------------------------------------------|
| Broadcast time: ................................... 10 sec (0 min 10 sec) |
|-----------------------------------------------------------------------------|
| Srv Id Service Name Access Bitrate |
| 0x0001 Service01 .................................... C 2,182,429 b/s |
| |
| Note 1: C=Clear, S=Scrambled |
| Note 2: Unless specified otherwise, bitrates are based on 188 bytes/pkt |
===============================================================================
===============================================================================
| SERVICES ANALYSIS REPORT |
|=============================================================================|
| Global PID's |
| TS packets: 121, PID's: 2 (clear: 2, scrambled: 0) |
|-----------------------------------------------------------------------------|
| PID Usage Access Bitrate |
| Total Global PID's ................................. C 18,032 b/s |
| Subt. Global PSI/SI PID's (0x00-0x1F) .............. C 18,032 b/s |
| 0x0000 PAT .......................................... C 15,051 b/s |
| 0x0011 SDT/BAT ...................................... C 2,980 b/s |
|=============================================================================|
| Service: 0x0001 (1), TS: 0x0001 (1), Original Netw: 0xFF01 (65281) |
| Service name: Service01, provider: FFmpeg |
| Service type: 0x01 (Digital television service) |
| TS packets: 14,645, PID's: 4 (clear: 4, scrambled: 0) |
| PMT PID: 0x1000 (4096), PCR PID: 0x0100 (256) |
|-----------------------------------------------------------------------------|
| PID Usage Access Bitrate |
| Total Digital television service ................... C 2,182,429 b/s |
| 0x0086 SCTE 35 Splice Info .......................... C 1,639 b/s | <--- Added by SuperKabuki
| 0x0100 AVC video (1920x1080, high profile, level 4.0 C 2,025,806 b/s |
| 0x0101 MPEG-2 AAC Audio (und) ....................... C 139,932 b/s |
| 0x1000 PMT .......................................... C 15,051 b/s | <--- Rewritten by SuperKabuki
| (C=Clear, S=Scrambled, +=Shared) |
===============================================================================
===============================================================================
| PIDS ANALYSIS REPORT |
|=============================================================================|
| PID: 0x0000 (0) PAT |
|-----------------------------------------------------------------------------|
| Global PID Transport: Discontinuities: |
| Bitrate: .... 15,051 b/s Packets: ........... 101 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: ............ 0 Unexpect: ......... 0 |
| Duplicated: .......... 0 Sections: |
| Unit start: ..... 101 |
|=============================================================================|
| PID: 0x0011 (17) SDT/BAT |
|-----------------------------------------------------------------------------|
| Global PID Transport: Discontinuities: |
| Bitrate: ..... 2,980 b/s Packets: ............ 20 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: ............ 0 Unexpect: ......... 0 |
| Duplicated: .......... 0 Sections: |
| Unit start: ...... 20 |
|=============================================================================|
| PID: 0x0086 (134) SCTE 35 Splice Info | < --- Added by SuperKabuki
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| Single Service PID Transport: Discontinuities: |
| Bitrate: ..... 1,639 b/s Packets: ............ 11 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: ............ 0 Unexpect: ......... 0 |
| Duplicated: .......... 0 Sections: |
| Unit start: ...... 11 |
|=============================================================================|
| PID: 0x0100 (256) AVC video |
| PES stream id: 0xE0 (Video 0) |
| 1920x1080, high profile, level 4.0, 4:2:0 |
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| Single Service PID Transport: Discontinuities: |
| Bitrate: . 2,025,806 b/s Packets: ........ 13,594 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: .......... 448 Unexpect: ......... 0 |
| Duplicated: .......... 0 PES: |
| TSrate: .. 2,200,460 b/s Packets: ........ 301 |
| Inv.Start: ........ 0 |
| Clock values range: |
| PCR: ............... 152 PTS: ............... 301 DTS: ............ 245 |
| from ........ 94,537,800 from ........... 384,132 from ........ 378,126 |
| to ......... 364,808,100 to ........... 1,285,033 to ........ 1,279,027 |
| Leaps: ............... 0 Leaps: ............... 0 Leaps: ............ 0 |
|=============================================================================|
| PID: 0x0101 (257) MPEG-2 AAC Audio (und) |
| PES stream id: 0xC0 (Audio 0) |
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| Single Service PID Transport: Discontinuities: |
| Bitrate: ... 139,932 b/s Packets: ........... 939 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: .......... 121 Unexpect: ......... 0 |
| Duplicated: .......... 0 PES: |
| Packets: ......... 61 |
| Inv.Start: ........ 0 |
| Clock values range: |
| PTS: ................ 61 |
| from ........... 380,166 |
| to ........... 1,276,806 |
| Leaps: ............... 0 |
|=============================================================================|
| PID: 0x1000 (4096) PMT | <--- Rewritten by SuperKabuki
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| Single Service PID Transport: Discontinuities: |
| Bitrate: .... 15,051 b/s Packets: ........... 101 Expected: ......... 0 |
| Access: .......... Clear Adapt.F.: ............ 0 Unexpect: ......... 0 |
| Duplicated: .......... 0 Sections: |
| Unit start: ..... 101 |
===============================================================================
===============================================================================
| TABLES & SECTIONS ANALYSIS REPORT |
|=============================================================================|
| PID: 0x0000 (0) PAT |
|-----------------------------------------------------------------------------|
| 0x00 (0, PAT), TID ext: 0x0001 (1) |
| Repetition: ...... 98 ms Section cnt: ...... 101 |
| Min repet.: ...... 21 ms Table cnt: ........ 101 |
| Max repet.: ..... 407 ms Version: ............ 0 |
|=============================================================================|
| PID: 0x0011 (17) SDT/BAT |
|-----------------------------------------------------------------------------|
| 0x42 (66, SDT Actual), TID ext: 0x0001 (1) |
| Repetition: ..... 485 ms Section cnt: ....... 20 |
| Min repet.: ..... 229 ms Table cnt: ......... 20 |
| Max repet.: ..... 690 ms Version: ............ 0 |
|=============================================================================|
| PID: 0x0086 (134) SCTE 35 Splice Info | <--- Added by SuperKabuki
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| 0xFC (252, SCTE 35 Splice Information) |
| Repetition: ..... 977 ms Section cnt: ....... 11 |
| Min repet.: ..... 802 ms |
| Max repet.: .... 1027 ms |
|=============================================================================|
| PID: 0x1000 (4096) PMT | <--- Rewritten by SuperKabuki
| Service: 0x0001 (1) Service01 |
|-----------------------------------------------------------------------------|
| 0x02 (2, PMT), TID ext: 0x0001 (1) |
| Repetition: ...... 98 ms Section cnt: ...... 101 |
| Min repet.: ...... 21 ms Table cnt: ........ 101 |
| Max repet.: ..... 407 ms Version: ............ 0 |
===============================================================================
My beef with DVB Analyzer is mostly due to the "open source" version being a "lite" without any features.
That's not how open source works. That kind of thing makes open source software look badly, like it's a cheap version.
Either make it open source or not, but don't use open source as a gimmick, that really pisses me off.
It's also written in Java.
"Java, C#, XML! that's the battle cry of the desperate and stupid" ~Bill Pitts
Did you try v0.0.59? it's pretty good man.
Oh, The problem you showed me from DVB inspector, that was just a typo, a 1 instead of a 0.
Hey ~ I just tried v0.0.59, it is awesome! And thanks for introducing tsanalyze to me, I'm gonna start using it.
Hi Good to see the new version is released! But I have a little problem the command
I also tried using
134
instead of0x86
, still not workingCan you tell where am I did wrong? Thanks!