Stream drops to audio after a short time (1 Viewer)

j1nx

Portal Pro
July 16, 2005
233
10
Interesting...

I changed the bandwidth variable for video (which I assume is the -b flag) and it didn't seem to make any difference. I turned it all the way down to 10k but the stream still looked very high quality on the iPhone.

Here's the variable and profile I altered...

<transcoder name="LiveTV" usetranscoding="1" filename="&quot;C:/Program Files/iPiMP/Utilities/ffmpeg\ffmpeg.exe&quot;" args="-i - -threads 0 -re -vcodec libx264 -fpre &quot;C:/Program Files/iPiMP/Utilities/ffmpeg/ffpresets/libx264-iPiMP.ffpreset&quot; -b 256k -s 480x272 -aspect 480:272 -acodec libfaac -ac 2 -ab 64k -ar 48000 -ac 2 -async 2 -f ism http://127.0.0.1:1972/SmoothStream.isml/Streams(SmoothStream)?dvr_window_length=15" inputmethod="2" outputmethod="4" />

Could it be that FFMpeg is ignoring the conditions set in this config??

UPDATE::

Ok I fixed the bitrate issue by specifying the buffer size and managing the min/max bitrates...

-b 256k -bufsize 100000K -minrate 128K -maxrate 312K

So at least it's not ignoring the bitrate now.

However this doesn't solve the dropout problem.

FOUND THIS

I noticed that if I left the video to buffer for a few minutes before playing it still drops out after a few seconds, it seems that playback starts 5 seconds from the end of the buffer rather than starting from the beginning, so even letting the stream buffer for 2 minutes, when you press play it starts playback from 1:55 and then of course runs out of buffer quickly.

I noticed it does the same on Flash streaming in a web browser and the iPhone playback, so it's not just isolated to the iPhone as such.

Not sure how to stop this.
That the playback starts an X amount of second before the END of the buffer is handled by the SmoothStreaming module. "?dvr_window_length=15" <- This variable is handling that. It is set to 15 seconds, so it is still strange that it start at 5 seconds before the end.

About the bitrate. I already mentioned somewhere, the H264 is actually a variable bitrate codec, hence most of the parameters set in the preset file are about the "margin" of quality. (while testing, the output of ffmpeg is written in the apache log, for fun start changing the "Q_min" parameter)

Anyway, the "min","max" and "buffer" will kind of forces it within a window, but still it does not comply with the "-b" parameter.


I am in Qatar on a offshore job at the moment. Still trying to write down my observations from the last couple of weeks, explaining most of the parameters and all. I am lacking some proper amount of time at the moment.
 

cheezey

Community Plugin Dev
August 26, 2004
1,560
312
51
West Yorks, UK
United Kingdom United Kingdom
  • Thread starter
  • Moderator
  • #13
The segmenter was going to be the original solution, however it was very tricky getting a segmenter compiled on windows, it also produced only Apple streaming format, no flash or silverlight. SmoothStreaming is a much more flexible solution providing a single process to produce adaptive streaming to multiple client platforms, so i'll be putting the effort into getting that working.
 

griffindodd

Portal Pro
March 28, 2009
72
2
this is interesting...

i just tried out PlayOn from my server to my iPhone 4 running iOS 4.1 and what do you know, when the streaming starts to the phone and has to rebuffer the stream drops to audio only. I think this is an issue the iPhone player Apple HTTP Live Streaming client.

Others are experiencing the same issues on all sorts of different web streaming applications...

iPhone Streaming Video stopped after few seconds : The Official Microsoft IIS Site

I don't know if any of these changes are relevant to what you are doing here, but apparently they helped someone in that thread experiecing the same problems using smoothstream.isml ...


- Turned off Client Caching and Server Caching

- Turned off iOS 3.0 Compatibility

- Changed the default 3000 to 5000 kbps for max bit rate in Mobile tab.

- Changed Window Length to 120 minutes instead of the entire event.

All of these settings are in some way related to the .isml but I have no idea what where or how.
 

King-S

MP Donator
  • Premium Supporter
  • August 6, 2008
    165
    2
    Near Frankfurt
    Germany Germany
    Country flag
    AW: Stream drops to audio after a short time

    Hello,

    I have the same problem and was looking for the solution all the day. I've recognized something very interesting. I sniffed the packets with a packet sniffer (of course ;)) and saw, that a completly new connection is created, without video - just like a new conversion file.

    At first, the video and sound is transfered to the streaming device. My packet sniffer says: Video 100k, Audio 32k. The size of all theses packets is about 400kb. When iPhone stops, also the file in the packet sniffer stops and a new one is created. Then, the iPhone plays the audio stream. Technically, a new file/packet is being started and transfered. The packet sniffers says: No Video, Audio 32k. After this one stop the streaming will do without any stuttering, buffering and so on.

    So I think, in this gap a new streamingfile is created. I can't proof this - I only can say, what the packet sniffer said.

    I also use Air Video. I have absolutely no probles with this - even with streaming over 3G.

    I hope this helps a little. For logs / questions a.s.o, please reply.

    (And sorry for my bad english)
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    51
    West Yorks, UK
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #20
    Here's an update to try to fix this dropped video stream issue.

    1. Download the updated FFMpeg here.
    2. Download the updated smooth streaming Apache module here.
    3. Stop the iPiMPWeb service (at a command prompt use NET STOP iPiMPWeb)
    4. Rename the folder C:\Program Files\iPiMP\Utilities\FFMpeg to C:\Program Files\iPiMP\Utilities\FFMpeg.old
    5. Rename the file C:\Program Files\iPiMP\Apache\modules\mod_smooth_streaming.so to C:\Program Files\iPiMP\Apache\modules\mod_smooth_streaming.so.old
    6. Backup C:\Program Files\iPiMP\Aspx\config.xml somewhere safe
    7. Unzip the updated FFMpeg into C:\Program Files\iPiMP\Utilities (check you end up with C:\Program Files\iPiMP\Utilities\FFMpeg\FFMpeg.exe)
    8. Unzip the updated smooth streaming Apache module into C:\Program Files\iPiMP\Apache\modules
    9. Start the iPiMPWeb service (at a command prompt use NET START iPiMPWeb)
    10. Edit (DONT COPY & PASTE) the ffmpeg and smoothstreaming module parameters in C:\Program Files\iPiMP\Aspx\config.xml and change line 3 from
    <transcoder name="LiveTV" usetranscoding="1" filename="&quot;C:/Program Files/iPiMP/Utilities/ffmpeg\ffmpeg.exe&quot;" args="-i - -threads 0 -re -vcodec libx264 -fpre &quot;C:/Program Files/iPiMP/Utilities/ffmpeg/ffpresets/libx264-iPiMP.ffpreset&quot; -b 256k -s 480x272 -aspect 480:272 -acodec libfaac -ac 2 -ab 64k -ar 48000 -ac 2 -async 2 -f ism http://127.0.0.1:80/SmoothStream.isml/Streams(SmoothStream)?dvr_window_length=15" inputmethod="2" outputmethod="4" />

    to

    <transcoder name="LiveTV" usetranscoding="1" filename="&quot;C:/Program Files/iPiMP/Utilities/ffmpeg\ffmpeg.exe&quot;" args="-i - -threads 0 -re -vcodec libx264 -fpre &quot;C:/Program Files/iPiMP/Utilities/ffmpeg/ffpresets/libx264-veryfast.ffpreset&quot; -g 100 -keyint_min 50 -b 256k -s 480x272 -aspect 480:272 -acodec libfaac -ac 2 -ab 64k -ar 44100 -ac 2 -async 2 -f ism http://127.0.0.1:80/SmoothStream.isml/Streams(SmoothStream)" inputmethod="2" outputmethod="4" />
    In summary, the parameter changes are:
    1. Use libx264-veryfast.preset instead of libx264-iPiMP.preset
    2. Add -g 100 -keyint_min 50
    3. Change audio rate from 48000 to 44100
    4. Remove ?dvr_window_length=15

    Report back on your findings.

    :D
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    S rotierende disk in streamed mp Skin Modifikationen 30
    C Streaming/transcoding MP2 vs MP1? General 1
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    P Streaming MediaPortal 1 Talk 5
    P Streaming to two clients from the same card Newcomers Forum 1
    L Non-PC device streaming... Newcomers Forum 1
    raffe How to add 500+ streams? OnlineVideos 1
    R Heavy pixelation on HD OTA Streams Installation, configuration support 1
    C streaming out UDP instead of RTSP Newcomers Forum 0
    C Recording back to back shows from IPTV streams General Support 8
    T Missing sound in online streaming service (SVTPlay) General Support 3
    H Unable to play stream - again... Television (MyTV frontend and TV-Server) 2
    V Unable to stream : 10 General Support 0
    doskabouter Black screen while watching some iptv streams General Support 2
    II-IRON [solved] MP2 - 2.2 - Es ist kein Player für die Wiedergabe des Medien-Object 'stream 3.0' registriert Allgemeines Support- und Diskussionsforum 16
    amatesi MP2.2pre Client crash while streaming Live TV from remote MP2.2pre Server (both offline) 2.2 Archive 8
    Cowboy [solved] MP1.20 issue with HD audio stream (not all media) watch/edit Videos 6
    K MP2 - V2.1 [MP2-763] Interface configuration for RTSP streaming server lost on every restart Older releases 6
    jmarc Recording IPTV streams General Support 1
    A Unable to play :stream 3 Television (MyTV frontend and TV-Server) 1
    C Is there a Tuner Stream Failure Alarm Plugin? MediaPortal 1 Plugins 1
    P [solved] MediaPortal 2 Won't stream HDHR Dual General 1
    M.Hulot Streamed MP behält gewählte Ansicht nicht bei Allgemeines Supportforum 4
    J Different video and audio streams. OnlineVideos 8
    M WebMediaPortal Stream LiveTV Problems MPExtended 2
    Similar threads

























    Top Bottom