ffmpeg changes SCTE-35 stream type to 0x6, six2scte35 changes it back
Project description
six2scte35
Latest version is 0.0.5
fixed
bitn import errorfixed
find_start errorupdated
to threefive 2.4.39
ffmpeg changes SCTE-35 stream type from 0x86 to 0x6
six2scte35 changes it back.
before
a@debian:~/bfm/mo$ ffprobe -hide_banner tested2.ts
Input #0, mpegts, from 'tested2.ts':
Duration: 00:00:38.92, start: 1.400000, bitrate: 8453 kb/s
Stream #0:0[0x100]: Data: bin_data ([6][0][0][0] / 0x0006) <-- Boo, hiss.
Stream #0:1[0x101]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt470bg, top first), 1280x720 [SAR 1:1 DAR 16:9], 8000 kb/s, 50 fps, 50 tbr, 90k tbn
Stream #0:2[0x102]: Audio: mp1 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16p, 256 kb/s
six2scte35
a@debian:~/bfm/mo$ six2scte35 -i tested2.ts -p 256 -o tested3.ts
after
a@debian:~/bfm/mo$ ffprobe -hide_banner tested3.ts
Input #0, mpegts, from 'tested3.ts':
Duration: 00:00:38.92, start: 1.400000, bitrate: 8453 kb/s
Stream #0:0[0x100]: Data: scte_35 <-- Boom << Boom.
Stream #0:1[0x101]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt470bg, top first), 1280x720 [SAR 1:1 DAR 16:9], 8000 kb/s, 50 fps, 50 tbr, 90k tbn
Stream #0:2[0x102]: Audio: mp1 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16p, 256 kb/s
Install
pypy3 -mpip install six2scte35
# and / or
python3 -mpip install six2scte35
pip installs the executable script six2scte35 as well as the module six2scte35
Usage:
a@debian:~/bfm$ six2scte35 -h
usage: six2scte35 [-h] [-i INPUT] [-o OUTPUT] [-p CONVERT_PID] [-v]
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Input source, like "/home/a/vid.ts" or
"udp://@235.35.3.5:3535" or "https://futzu.com/xaa.ts"
default is sys.stdin.buffer
-o OUTPUT, --output OUTPUT
Output file, default is sys.stdout.buffer
-p CONVERT_PID, --convert_pid CONVERT_PID
Pid to change to type 0x86 (SCTE-35)
-v, --version Show version
Version 0.0.3 adds pipe support
a@debian:~$ six2scte35 -v
0.0.3
a@debian:~$
- Here's the input
a@debian:~$ ffprobe pv.ts -hide_banner
[mpegts @ 0x55ddbc4045c0] start time for stream 5 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'pv.ts':
Duration: 00:00:20.33, start: 1.400000, bitrate: 17696 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn
Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x102]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:3[0x103]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:4[0x104]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:5[0x105]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 98314 for input stream 5
a@debian:~$
- then I ran this command
a@debian:~$ cat pv.ts | six2scte35 -p 0x105 | ffplay -hide_banner -
- output
261
pid match
Input #0, mpegts, from 'pipe:': 0KB vq= 0KB sq= 0B f=0/0
Duration: N/A, start: 1.400000, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn
Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x102]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:3[0x103]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:4[0x104]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:5[0x105]: Data: scte_35
17.30 A-V: -0.019 fd= 0 aq= 32KB vq= 2498KB sq= 0B f=0/0
- to write to a file
a@debian:~$ cat pv.ts | six2scte352 -p 0x105 -o kout.ts
261
pid match
ffprobe -hide_banner kout.ts
Input #0, mpegts, from 'kout.ts':
Duration: 00:00:20.24, start: 1.400000, bitrate: 17650 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn
Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x102]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:3[0x103]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:4[0x104]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:5[0x105]: Data: scte_35
Unsupported codec with id 98305 for input stream 5
- so you can do something like
ffmpeg -i mpegts/pcrvid.ts -map 0 -c copy -f mpegts - | six2scte35 -p 0x105 | ffplay -
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
six2scte35-0.0.5.tar.gz
(5.9 kB
view details)
Built Distribution
File details
Details for the file six2scte35-0.0.5.tar.gz
.
File metadata
- Download URL: six2scte35-0.0.5.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0d5ea5811d23c6bae2f66fdaa63a453327492f01523a9f4b3456d38dfe88ec |
|
MD5 | 0206f2845a855253e69c68d49c6565ad |
|
BLAKE2b-256 | 89329f5ab0deb6a43e2a07071281fdda2165f95445e4dd1c6cb99713ddb50b03 |
File details
Details for the file six2scte35-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: six2scte35-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 503b3382fb65a7b9152f65589b361e58633d06400d43baf01b48fa0faad17b32 |
|
MD5 | 50a44d7d0497e3ce2fa792b90ef6ed34 |
|
BLAKE2b-256 | 480f8261b4e8837053875aa928f3e8be2f973779f9d1d933cd5062c8fb1982f5 |