Skip to content
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

Live webm segmenter overflow #233

Closed
pathammer opened this issue May 11, 2017 · 5 comments
Closed

Live webm segmenter overflow #233

pathammer opened this issue May 11, 2017 · 5 comments
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Comments

@pathammer
Copy link

System info

Operating System: Ubuntu 14.04 arm32hf and 16.04 amd64
Shaka Packager Version: 1e2da22 & v1.5.0

Issue and steps to reproduce the problem

I'm packaging live VP8 video being passed into packager over RTP. After about 68,800 frames, packager stops with the message segmenter.cc(427)] Error adding sample to segment: segment too large, 1.84467e+10 seconds. I definitely have not generated a 584 year long segment.
Could this be related to #214 ?

Packager Command:

"input=/tmp/5000webm.pipe,stream=video,init_segment=$OUT_DIR/init.webm,segment_template=$OUT_DIR/live-video-hd$Number$.webm,bandwidth=3000000" --profile live --mpd_output $OUT_DIR/camera.mpd --single_segment=0 -segment_duration 2 -minimum_update_period 2

Details:

What is the expected result? Package the live video until the source stops producing video.

What happens instead? Packaging stops prematurely.

My input is 2592x1944 and 7.5 fps. The issue is reproducible with a real video as well as gstreamer's videotestsrc test pattern 0.

[0510/164344:INFO:demuxer.cc(58)] Initialize Demuxer for file '/tmp/5000webm.pipe'.
[0510/164349:INFO:demuxer.cc(170)] Demuxer::Run() on file '/tmp/5000webm.pipe'.
[0510/164349:WARNING:mpd_builder.cc(233)] Video info does not contain frame duration required for calculating framerate. @frameRate is required for DASH IOP.
[0510/191730:ERROR:segmenter.cc(427)] Error adding sample to segment: segment too large, 1.84467e+10 seconds.
[0510/191730:ERROR:demuxer.cc(159)] Demuxer::PushSample failed with 9 (MUXER_FAILURE): Error adding sample to segment: segment too large
[0510/191730:ERROR:packager_main.cc(501)] Packaging Error: 8 (PARSER_FAILURE): Cannot parse media file /tmp/5000webm.pipe
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/google/shaka-packager version eab7910029-debug-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" minBufferTime="PT2S" type="dynamic" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2017-05-11T02:17:30Z" availabilityStartTime="2017-05-10T23:43:58Z" minimumUpdatePeriod="PT2S" timeShiftBufferDepth="PT1800S">
  <Period id="0" start="PT0S">
    <AdaptationSet id="0" contentType="video" width="2592" height="1944" frameRate="1000000/133000" segmentAlignment="true" par="4:3">
      <Representation id="0" bandwidth="3000000" codecs="vp8" mimeType="video/webm" sar="1:1">
        <SegmentTemplate timescale="1000000" initialization="init.webm" media="live-video-hd-$Number$.webm" startNumber="3711">
          <SegmentTimeline>
            <S t="7420015000" d="2000000" r="900"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>
@kqyang
Copy link
Collaborator

kqyang commented May 11, 2017

Thanks for reporting the issue. Looks like there is an overflow somewhere. Do you have a sample content that can duplicate this issue? Or do you have a link to the content you talked about: gstreamer's videotestsrc test pattern 0?

@kqyang kqyang added the type: bug Something isn't working correctly label May 11, 2017
@pathammer
Copy link
Author

This should do it assuming you have gstreamer installed:

mkfifo /tmp/webm.pipe
# start packer first on that named-pipe
gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)I420, width=(int)2592, height=(int)1944, framerate=(fraction)15/2' ! vp8enc ! webmmux ! filesink location=/tmp/webm.pipe

I saw the error ~2.5 hrs into that stream

@pathammer
Copy link
Author

Also just realizing that packager returns a zero exit code when this error occurs.

@kqyang
Copy link
Collaborator

kqyang commented May 12, 2017

Thanks. We'll look into it!

@kqyang
Copy link
Collaborator

kqyang commented May 18, 2017

@pathammer The problem should be fixed. Again, thanks for reporting the problem.

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 19, 2018
@shaka-project shaka-project locked and limited conversation to collaborators Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants