Comments (10)
Merry Christmas and let me say,
that is a solid description of the issue, with supporting details, I appreciate it.
let me show you an easier way to check iframes
https://github.com/futzu/iframes
a@fu:~/x9k3_help_needed$ iframes segment11.ts
66.191111
67.191111
68.191111
69.191111
70.191111
71.191111
You do understand that a time signal needs a segmentation descriptor to generate a CUE-OUT tag, right?
what you're saying is reasonable, and I'm not sure why it's not behaving that way.
let me think on this for a minute,
from scte-35_hls_x9k3.
Man, I think you just gave me a great idea. Currently, when x9k3 encounters an iframe, it makes segment level decisions.
what I'm thinking I need ot do is make those segment level decisions, iframe level decisions and simplify what happens at the segment level to just slicing. ...... I am talking to myself here.
Give me the weekend, and I can probably sort this out.,
from scte-35_hls_x9k3.
You do understand that a time signal needs a segmentation descriptor to generate a CUE-OUT tag, right?
I am new to SCTE35 so at the moment i am try to learn as more as i can. from your scte35-threefive example
i found some SCTE35 encoding code. i use the encode_time_signal.py example to create the SCTE35 signal which i believe it doesn't containers descriptor. will explore more from your example to see how i add segmentation descriptor.
from scte-35_hls_x9k3.
Hi Adrian
really appreciate your time and help during the new year time!
let me explain the work i am facing, after hls video being created, we need allow people to change and update the cue point at the any position. it is hard we don't want re-encode the whole video. so we decide to use 1 iframe interval. at the moment we use ffmpeg to split the video and re-assembly the hls manifest with discontinuity tag.
seem working but it is not good solution.
until i meet with the x9k3, it allow us to remove the discontinuity tag, it is really something i have been looking
long time if it can sub-segment a segment into 2 segments with user control the duration of first sub-segment and rest duration all for second sub-segment.
Curious from the readme
Segments are cut on iframes.
if we don't have 1s iframe interval video. x9k3 wan't do second accuracy splicing. it will splice at the nearest iframe position right?
thanks
from scte-35_hls_x9k3.
I use your iframe finder, it is much quicker than ffprobe
from scte-35_hls_x9k3.
v0.2.39 should work correctly .
FYI if you want 6 second segments use -t 6
a@fu:~/x9k3_help_needed$ x9k3 -i segment11.ts -s sidecar.txt -t 6
loading 68.191111,/DAlAAAAAAAAAP/wFAUAAAADf+/+AF2lcP4ABX5AAAMAAAAAORYtAQ==
{
"info_section": {
"table_id": "0xfc",
"section_syntax_indicator": false,
"private": false,
"sap_type": "0x3",
"sap_details": "No Sap Type",
"section_length": 37,
"protocol_version": 0,
"encrypted_packet": false,
"encryption_algorithm": 0,
"pts_adjustment_ticks": 0,
"pts_adjustment": 0.0,
"cw_index": "0x0",
"tier": "0xfff",
"splice_command_length": 20,
"splice_command_type": 5,
"descriptor_loop_length": 0,
"crc": "0x39162d01"
},
"command": {
"command_length": 20,
"command_type": 5,
"name": "Splice Insert",
"time_specified_flag": true,
"pts_time": 68.191111,
"pts_time_ticks": 6137200,
"break_auto_return": true,
"break_duration": 4.0,
"break_duration_ticks": 360000,
"splice_event_id": 3,
"splice_event_cancel_indicator": false,
"out_of_network_indicator": true,
"program_splice_flag": true,
"duration_flag": true,
"splice_immediate_flag": false,
"unique_program_id": 3,
"avail_num": 0,
"avail_expected": 0
},
"descriptors": []
}
./seg0.ts: start: 66.191111 end: 68.191111 duration: 2.000000
#EXT-X-CUE-OUT = 4.0
./seg1.ts: start: 68.191111 end: 72.191111 duration: 4.000000
from scte-35_hls_x9k3.
The procedure your describing is not going to fix your CUE-OUT-CONT tags, and there are several other potential probl;ems. You'd probably be better off just changing the sidecar file and then just do the whole video with x9k3.
x9k3 can take the ffmpeg generated m3u8 file as input.
x9k3 -i ffmpeg_generated.m3u8 -t6 -o output_directory -s sidecar.txt
As far as encoding goes , if you can use a splice insert, you can use threefive.encode.mk_splice_insert
mk_splice_insert(event_id, pts=None, duration=None, out=False)
from threefive.encode import mk_splice_insert
# This is a CUE-OUT at 68.191111, for 60 seconds
cue-out= mk_splice_insert(event_id=1, pts =68.191111,duration=60.0,out=True).encode()
print(cue-out)
'/DAlAAAAAAAAAP/wFAUAAAABf+/+AF2lcP4AUmXAAAEAAAAAqY0bkg=='
# This is the CUE-IN
cue-in= mk_spice_insert(event_id=1, pts=128.191111,out=False).encode()
print(cue-in)
'/DAgAAAAAAAAAP/wDwUAAAABf0/+ALALMAABAAAAALhvRkU='
from scte-35_hls_x9k3.
try this to make your cues
- help
a@fu:~/x9k3_help_needed$ pypy3 adbreak.py -h
usage: adbreak.py [-h] [-d DURATION] [-p PTS] [-s SIDECAR]
optional arguments:
-h, --help show this help message and exit
-d DURATION, --duration DURATION
duration of ad break [default: 60.0]
-p PTS, --pts PTS start pts for ad break [default: 0.0]
-s SIDECAR, --sidecar SIDECAR
Sidecar file of SCTE-35 (pts,cue) pairs.
[default:sidecar.txt]
run it like :
python3 adbreak.py -d 60 -p 68.191111 -s sidecar.txt
your sidecar will have the CUE-OUT and CUE-IN.
a@fu:~/x9k3_help_needed$ cat sidecar.txt
68.191111,/DAlAAAAAAAAAP/wFAUAAAABf+/+AF2lcP4AUmXAAAEAAAAAqY0bkg== # CUE-OUT
128.191111,/DAgAAAAAAAAAP/wDwUAAAABf0/+ALALMAABAAAAALhvRkU= # CUE-IN
x9k3 will make a CUE-OUT , all the CUE-OUT-CONT tags, and a CUE-IN.
from scte-35_hls_x9k3.
Hi Adrian
i tried the the latest change, now it works perfect for me, and the convenient script of adbreak.py make creating sidecar file easier. sometime i will try to do whole video with x9k3. looks the new update also fixed the last sub segment freezing in latest videojs http streaming player.
thanks for your help and the X9K3 project
Winston
from scte-35_hls_x9k3.
Sure man ,
you gave me what I needed, that makes it easy.
upgrade to 0.2.41, it's even better and adbreak installs with x9k3.
a@fu:~$ adbreak -h
usage: adbreak [-h] [-d DURATION] [-p PTS] [-s SIDECAR]
optional arguments:
-h, --help show this help message and exit
-d DURATION, --duration DURATION
set duration of ad break. [ default: 60.0 ]
-p PTS, --pts PTS set start pts for ad break. Not setting pts will
generate a Splice Immediate CUE-OUT. [ default: 0.0 ]
-s SIDECAR, --sidecar SIDECAR
Sidecar file of SCTE-35 (pts,cue) pairs. [ default:
sidecar.txt ]
a@fu:~$
from scte-35_hls_x9k3.
Related Issues (20)
- How to merge multiple ts input into one output? HOT 3
- Jerks in HLS when coverted from UDP. HOT 40
- error while coverting udp to hls HOT 4
- insert every 10 minutes HOT 4
- When can we expect abr ? HOT 2
- negative EXTINF values and no X_CUE tags from scte35 mpegts stream HOT 8
- SCTE-OUT/IN pairs inside EXT-X-DATERANGE do not have the same ID, as the standard says HOT 4
- Replay mode , not looping the video HOT 6
- New: Option to not to use EXT-X-DISCONTINUITY in SCTE35 marks HOT 12
- New: --replay should not include -c by default HOT 3
- Play on native player breaks in replay mode after restarting the loop HOT 11
- stdin input is not working
- Not inserting cue markers. HOT 23
- paypal account HOT 5
- How to use in hls? HOT 4
- Transmission dropping HOT 22
- Input with multiple resolutions
- Add ad breaks to existing videos so they work with google ad manager server-side ad injection HOT 5
- Check if UDP used to convert to hls is vaild or not HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scte-35_hls_x9k3.