-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MPEG-TS] Processing one frame videos fail #1013
Labels
status: archived
Archived and locked; will not be updated
Comments
This was referenced Jan 4, 2022
I've created a PR #1015 |
Dear @kqyang or @joeyparrish can you look at this? This is my first PR so I'm thrilled if it will go through :) |
joeyparrish
added a commit
that referenced
this issue
Oct 28, 2022
Closes #1013 Co-authored-by: Joey Parrish <[email protected]>
github-actions
bot
added
the
status: archived
Archived and locked; will not be updated
label
Dec 27, 2022
sr1990
pushed a commit
to sr1990/shaka-packager
that referenced
this issue
Feb 18, 2023
Closes shaka-project#1013 Co-authored-by: Joey Parrish <[email protected]>
sr1990
pushed a commit
to sr1990/shaka-packager
that referenced
this issue
Feb 18, 2023
Closes shaka-project#1013 Co-authored-by: Joey Parrish <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
System info
Operating System: Ubuntu focal 20.04
Shaka Packager Version: 2.6.1
Issue and steps to reproduce the problem
Packager does not handle one-frame mpeg-ts videos correctly. Frame duration is not calculated and any processing fails. Parser does not emit
MediaSample
with the video frame. Stream appears to be empty.One-frame videos are valid. I'm working at live TV streaming provider. We're using AWS Elemental to generate mpeg-ts video stream that is then feed to our system. One-frame videos can occur when there's an ad break. Elemental closes current file and creates a new one with ad break video. Due to a coincidence sometimes it generates only one frame of TV program and then rest of the GOP goes to another file (with an ad video).
Shaka fails to process such one-video mpeg-ts frames.
Duration of a video frame is calculated by a subtraction of two consecutive DTS. If we have one frame we cannot calculate it.
If we have a Release version this is silenlty discarded but in Debug there's a DCHECK
https://github.com/google/shaka-packager/blob/master/packager/media/formats/mp2t/es_parser_h26x.cc#L102
that fails. This only the only symptom from command line. (We're using Shaka as a library to parse streams)
In Release version DCHECK does not block processing but as a deep consequence of pending_sample_duration_ == 0 the single video frame (
MediaSample
with video frame) is not emitted and a Video stream appears to be empty.Packager Command:
We're using Shaka Packager as a library through an API but a small demo can be done even from cli.
I've prepared steps to reproduce the problem. We need ffmpeg, ffprobe and the Packager.
I assume that master is build with Release and Debug.
Examples should be run from source root.
Steps to reproduce the problem:
curl "https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png" -o lena.png
ffmpeg -i lena.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.ts
ffprobe -show_frames out.ts
out/Release/packager input=out.ts --dump_stream_info
out/Debug/packager input=out.ts --dump_stream_info
What is the expected result?'
Emited
MediaSample
with video frame.Packager does not blow up from cli.
What happens instead?
<Please attach the input files or email to [email protected].>
I can send you original one-frame video emited by AWS Elemental.
I have a PR to solve this problem.
The text was updated successfully, but these errors were encountered: