flowplayer / flowplayer-mpegdash

MIT License
8 stars 13 forks source link

live audio can not continues #7

Closed yancey918 closed 8 years ago

yancey918 commented 8 years ago

My audio live stream stop in this version (revision: 02e4c5e) . but last version is work fine seems Manifest doesn't refresh , only once

Manifest has been refreshed at Tue Nov 10 2015 18:22:42 GMT+0800 (台北標準時間)[1447150962581]
flowplayer.mpegdash.min.js:30 SegmentTimeline detected using calculated Live Edge Time flowplayer.mpegdash.min.js:30 MediaSource is open! flowplayer.mpegdash.min.js:30 [object Event] flowplayer.mpegdash.min.js:30 Duration successfully set to: 1.7976931348623157e+308 flowplayer.mpegdash.min.js:30 Added 0 inline events flowplayer.mpegdash.min.js:30 No video data. flowplayer.mpegdash.min.js:30 audio codec: audio/mp4;codecs="mp4a.40.5" flowplayer.mpegdash.min.js:30 [audio] stop flowplayer.mpegdash.min.js:30 No text data. flowplayer.mpegdash.min.js:30 No fragmentedText data. flowplayer.mpegdash.min.js:30 No muxed data. flowplayer.mpegdash.min.js:30 [audio] Getting the request for time: 2304 flowplayer.mpegdash.min.js:30 [audio] Index for time 2304 is 0 flowplayer.mpegdash.min.js:30 [audio] start flowplayer.mpegdash.min.js:30 [audio] Getting the request for time: 0 flowplayer.mpegdash.min.js:30 [audio] Index for time 0 is -1 flowplayer.mpegdash.min.js:30 loaded audio:Initialization Segment:NaN (200, 0ms, 55ms) flowplayer.mpegdash.min.js:30 [audio] Initialization finished loading flowplayer.mpegdash.min.js:30 [audio] Getting the request for time: 0 flowplayer.mpegdash.min.js:30 [audio] Index for time 0 is -1 flowplayer.mpegdash.min.js:30 [audio] Stalling Buffer flowplayer.mpegdash.min.js:30 [audio] Waiting for more buffer before starting playback. flowplayer.mpegdash.min.js:30 [audio] Getting the request for time: 2304 flowplayer.mpegdash.min.js:30 [audio] Index for time 2304 is 0 flowplayer.mpegdash.min.js:30

phloxic commented 8 years ago
yancey918 commented 8 years ago

Our live stream is audio . I try your video live stream is ok (http://vm2.dashif.org/livesim/testpic_6s/Manifest.mpd) but audio live stream stop in revision: 02e4c5e the follow is our manifest.mpd . I think the different is "SegmentTimeline" as video live could someone help ?

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="urn:mpeg:dash:schema:mpd:2011"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
     profiles="urn:mpeg:dash:profile:isoff-live:2011"
     type="dynamic"
     minimumUpdatePeriod="PT9.926S" 
     availabilityStartTime="2015-11-10T14:31:28Z" 
     timeShiftBufferDepth="PT51.2S"
     suggestedPresentationDelay="PT15.0S" 
     minBufferTime="PT6.0S">
<ProgramInformation>
    <Title>ch01-test</Title>
</ProgramInformation>
<Period id="0" start="PT0.0S">
    <AdaptationSet id="0" mimeType="audio/mp4" lang="eng" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
        <SegmentTemplate timescale="8000" media="chunk_ueifnf732_ctaudio_cfm4s_rid$RepresentationID$_cs$Time$_mpd.m4s" initialization="chunk_ueifnf732_ctaudio_cfm4s_rid$RepresentationID$_cinit_mpd.m4s">
            <SegmentTimeline>
                <S t="14499840" d="81920"/>
                <S d="81920"/>
                <S d="81920"/>
                <S d="81920"/>
                <S d="81920"/>
            </SegmentTimeline>
        </SegmentTemplate>
        <Representation id="p0a0r0" codecs="mp4a.40.5" audioSamplingRate="8000" bandwidth="20000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        </Representation>
    </AdaptationSet>
</Period>
</MPD>
phloxic commented 8 years ago

Apart from the fact that Flowplayer support audio officially, may I ask you again to come back to the last 2 point in https://github.com/flowplayer/flowplayer-mpegdash/issues/7#issuecomment-155387650

yancey918 commented 8 years ago

Q: how does it behave in the dash.js player 1.5.1 http://dashif.org/reference/players/javascript/v1.5.1/samples/dash-if-reference-player/ ? and, for comparsion in the 1.5.0 player http://dashif.org/reference/players/javascript/v1.5.0/samples/dash-if-reference-player/ A : I try both , they are work Q:sample page or at least working mpd, so we can bisect exactly which revision broke it A: OK. i will try to make one

And i try to make a video live stream . the revision: 02e4c5e also stop. I compare manifest.mpd . I think our manifest.mpd always have "SegmentTimeline" like this.

            <SegmentTimeline>
                <S t="537292" d="197744"/>
                <S d="341180"/>
                <S d="147162"/>
                <S d="229915"/>
                <S d="229915"/>
            </SegmentTimeline>

I think it always generated by WOWZA server (We use version 4.2.0 build15089) . But I try some other player like 'bitdash' also works good. any idea or suggestions ? Thanks a lot.

The follow is full manifest.mpd sample from WOWZA server

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="urn:mpeg:dash:schema:mpd:2011"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/                              MPEG-DASH_schema_files/DASH-MPD.xsd"
     profiles="urn:mpeg:dash:profile:isoff-live:2011"
     type="dynamic"
     minimumUpdatePeriod="PT1.207S"
     availabilityStartTime="2015-11-11T01:36:55Z"
     timeShiftBufferDepth="PT51.969S"
     suggestedPresentationDelay="PT15.0S"
     minBufferTime="PT6.0S">
<ProgramInformation>
    <Title>ch01-test</Title>
</ProgramInformation>
<Period id="0" start="PT0.0S">
    <AdaptationSet id="0"  mimeType="video/mp4" width="1280" height="720" par="16:9" frameRate="24000/1001" segm                              entAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
        <SegmentTemplate timescale="90000" media="chunk_u0pctug93_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_m                              pd.m4s" initialization="chunk_u0pctug93_ctvideo_cfm4s_rid$RepresentationID$_cinit_mpd.m4s">
            <SegmentTimeline>
                <S t="2193030" d="807120"/>
                <S d="1392570"/>
                <S d="600660"/>
                <S d="938430"/>
                <S d="938430"/>
            </SegmentTimeline>
        </SegmentTemplate>
        <Representation id="p0a0r0" codecs="avc1.64001f" sar="1:1" bandwidth="627000" />
    </AdaptationSet>
    <AdaptationSet id="1" mimeType="audio/mp4" lang="eng" segmentAlignment="true" startWithSAP="1" subsegmentAli                              gnment="true" subsegmentStartsWithSAP="1">
        <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
        <SegmentTemplate timescale="22050" media="chunk_uabi90g6w_ctaudio_cfm4s_rid$RepresentationID$_cs$Time$_m                              pd.m4s" initialization="chunk_uabi90g6w_ctaudio_cfm4s_rid$RepresentationID$_cinit_mpd.m4s">
            <SegmentTimeline>
                <S t="537292" d="197744"/>
                <S d="341180"/>
                <S d="147162"/>
                <S d="229915"/>
                <S d="229915"/>
            </SegmentTimeline>
        </SegmentTemplate>
        <Representation id="p0a1r0" codecs="mp4a.40.2" audioSamplingRate="22050" bandwidth="97000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2                              "/>
        </Representation>
    </AdaptationSet>
</Period>
</MPD>

follow is from http://vm2.dashif.org/livesim/testpic_6s/Manifest.mpd

<MPD availabilityStartTime="1970-01-01T00:00:00Z" maxSegmentDuration="PT6S" minBufferTime="PT2S" minimumUpdatePeriod="P100Y" profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264" timeShiftBufferDepth="PT5M" type="dynamic" ns1:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance">
   <ProgramInformation>
      <Title>Media Presentation Description by MobiTV. Powered by MDL Team@Sweden.</Title>
   </ProgramInformation>
   <BaseURL>http://vm2.dashif.org/livesim/testpic_6s/</BaseURL>
<Period id="p0" start="PT0S" ns2:publishTime="1970-01-01T00:00:00Z" xmlns:ns2="urn:mobitv">
      <AdaptationSet contentType="audio" lang="eng" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" ns2:qualityLevel="SD">
         <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
         <SegmentTemplate duration="6" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" />
         <Representation audioSamplingRate="48000" bandwidth="48000" codecs="mp4a.40.2" id="A48">
            <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
         </Representation>
      </AdaptationSet>
      <AdaptationSet contentType="video" maxFrameRate="60/2" maxHeight="360" maxWidth="640" mimeType="video/mp4" minHeight="360" minWidth="640" par="16:9" segmentAlignment="true" startWithSAP="1" ns2:qualityLevel="SD">
         <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
         <SegmentTemplate duration="6" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" />
         <Representation bandwidth="300000" codecs="avc1.64001e" frameRate="60/2" height="360" id="V300" sar="1:1" width="640" />
      </AdaptationSet>
   </Period>
yancey918 commented 8 years ago

I found something , if i use the the html5 tag to load .mpd , it's work

<video class="dashjs-player" controls>
  <source type="application/dash+xml" src="//example.com/testvideo.mpd">
</video>
</video>

but if i use like this , it will stop after 50 sec

 <div id="mpd-container" class="player"></div>
<script>
                    flowplayer('#mpd-container', {
                      ...
                        clip: {
               live: true,
                            sources: [
                                { type: type,
                                  src: src
                                }
                            ]
                        }
                    }).on('error', function() {
                        ...
                    });
</script>

api callback error ?

phloxic commented 8 years ago

segment-timeline per se is certainly not causing it, we're using that in all our VOD examples.

What is the error?

For further diagnosis and bisecting I need the address of a working stream. Even if we find the exact revision where the plugin broke, I cannot second guess the actual problem without testing it on an actual stream.

yancey918 commented 8 years ago

Please see the follow link http://yancey918.github.io/flowplayer/flowplayer_dash.html and the live stream url is http://54.179.182.118:1935/live/livestream/manifest.mpd there was no error , but the manifest never refresh . please help. *note) OS: win7/win8 , browser: Chrome image

phloxic commented 8 years ago

Here's what I get with your stream in the DashIF sample player - apart from no time information:

screen shot 2015-11-11 at 2 03 34 pm

Note the multiple audio stop which should not happen imho, looks like the stream has some serious hiccups.

yancey918 commented 8 years ago

Sorry Sir. why I didn't see any error message ? anything I didn't open ? note) the test stream location is in Singapore. image

yancey918 commented 8 years ago

I saw what you say 'audio stop' , I will checkout what happen of the stream first . thanks

phloxic commented 8 years ago

I did not see the errors all the time, but sometimes I saw them - as my screenshot proves. What's always there is the stop/start.

yancey918 commented 8 years ago

I am not sure now, before I thought it's just normal information. Thanks for your reminder. I will try to resolve it first . But do you know what usually event touch the 'audio stop' ? And the flowplayer auto stop because this event ? thanks

phloxic commented 8 years ago

It may be a good idea to take this to the dash.js bug tracker: https://github.com/Dash-Industry-Forum/dash.js/issues - they have more experience with live streams, and certainly more with audio streams, and can tell you whether their 'raw' player behaves as expected (what looks suspicious to me is that it does not show any playback time information) - we don't have that experience, as I said, Flowplayer HTML5 so far is a video player.

yancey918 commented 8 years ago

Dear sir , the dash.js bug tracker say the 'audio stop' just normal information. ref. https://github.com/Dash-Industry-Forum/dash.js/issues/885 I am still find out why the stream stop of flowplayer . please help . thanks http://yancey918.github.io/flowplayer/flowplayer_dash.html

phloxic commented 8 years ago

Currently your stream times out again, I had it working for a while (I think), but it's hard to be sure, because even when it's on sometimes the refreshed manifests don't load, at least from where I am.

phloxic commented 8 years ago

@yancey918 - please check https://github.com/Dash-Industry-Forum/dash.js/issues/885#issuecomment-156538759 and submit a bug there. Thank you. Closing, at least for now.

yancey918 commented 8 years ago

@blacktrash thanks a lot . I submit a bug tracker here. thanks https://github.com/Dash-Industry-Forum/dash.js/issues/887