Comments (3)
@cosmin Thanks for your quick response. I just checked a live TS stream that @Brainiarc7's team suggested as test source and it has PES packets with PTS timestamp every 40ms on the teletext PID.
With those triggers I'll try to enhance the teletext parser to generate a zero-duration TextSample every 500ms starting when a TextSamples has ended, but no new one has started. By setting the duration to zero, I think it should be fairly easy to update the TextChunker::OnTextSample
method to only write chunks whose end time has passed but NOT add the TextSample itself as a non-rendered sample.
One could implement alternative 2 as a fallback, but I leave that for later.
from shaka-packager.
@cosmin I'm trying to look solve this problem of text segment generation when there is no output. It seems that you are working quite a lot on improving Shaka-packager so maybe you have some thoughts about the best approach?
I think that the core problem is that all text segment generation is triggered by cue or text samples.
For example, looking at the OutputsEmptySegments unit test there should be three output segments:
- segment 0, 0-100ms with text 0-50ms
- segment 1, 100-200ms with no text
- segment 2, 200-300ms with text 200-250ms
There are then events simulating text samples being read.
The first one happens at 50ms and stores a text sample.
The second one happens at 250ms, and it is only at this time that segment 0 and the empty segment 1 is generated. The segments are generated by a loop in TextChunker::OnTextSample
that loops over all old segments
and generate them with appropriate segment timing.
If text sample number 2 would have been even later, segment 0 and all intermediate empty segment would be generated even later.
Please correct me if I have misunderstood something.
I see three type of possible remedies (for the case of an incoming MPEG TS stream with teletext or DVB subtitles)
- Rely on some incoming data on the text PID with PTS timestamps, so that it is possible to detect time progress in the teletext parser and generate empty cues/samples
- Let the video track trigger text segment generation if there is no data (possibly with some delay)
- Introduce a timer in the text_chunker that triggers empty chunks if there are no data for some finite time like 500ms
Do you have a take on the preferred method, or maybe some other way of tackling this problem?
from shaka-packager.
I think some heartbeat approach to generate and pass through empty cues from the input to the output to indicate absence of text seems right.
As to how generate these heartbeat cues, to the extent it's possible when parsing the input to know that there is no text data then that would be ideal. When text and audio/video would arrive separately then having some configurable buffering delay for how long to wait for text after video or audio is received would be good.
So at a high level #1 where possible otherwise #2, but probably not #3.
from shaka-packager.
Related Issues (20)
- NPM packages broken before v3.0.3
- Not support VVC/H.266 codec HOT 1
- Unable to run executable via NPM module on Apple Silicon (even with Rosetta 2 enabled) HOT 1
- ShakaPackager v3 doesn't generate <BaseURL> in MPEG-DASH manifest so that ShakaPlayer cannot play video completely.
- demux error HOT 2
- Packager fails to copy tmp files into place once its done when using a container volume + sshfs mount HOT 8
- Error building shaka packager in windows 10 HOT 2
- NALU length exceeds stream size HOT 2
- error: generic:18 Failed to write playlist HOT 3
- Shaka packager design in document HOT 3
- `ninja -C build pssh-box.py` not working HOT 5
- Packager Adaptation Set Switching values point to representation IDs instead of Adaptation Set IDs. HOT 1
- Error when using long path in input/output (Windows) HOT 4
- Packager Adaptation Set Switching doesn't work with forced command-line ordering HOT 1
- [DASH] Add content steering support.
- audioSamplingRate in representation is "0" for high sample rates HOT 2
- helpxml removed? HOT 1
- Macro DISALLOW_COPY_AND_ASSIGN include/file.h HOT 5
- For Packaging webm to mpd i am getting (MUXER_FAILURE): Error adding sample to segment: Cluster::AddFrame failed
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 shaka-packager.