iPiMP 5.1.0 is released (7 Viewers)

j1nx

Portal Pro
July 16, 2005
233
10
Re: Re : iPiMP 5.1.0 is released

Anyway, will also do some testing tonight. :) If vlc can do it, it might be the lost puzzle piece, to use the cassini mpwebservices small footprint webserver for all streaming purposes.

Cool - let us know about your test results.

Also - rather than cassini - we should look at IIS Express, again a small footprint - but with the capabilities of IIS7.x - much more feature rich than cassini but still small/portable.

Did some testing yesterday. Conclusion; Crap.

Nah, seriously. I think VLC uses the same x264 codec for there encoding purposes as ffmpeg, it just looks horrible with both of the defaults settings provided in the two links. I guess VLC has some different default settings for a lot of x264 setting.

The main problem was, the playback was stuttering as hell. It was not because VLC could not handle the encoding in time, as I could play the segmented pieces without any problems in vlc player. Some of the default settings for x264 are probably wrong to create a proper ipod/iphone compatible file. As command line parameters of all solutions are a bit different, it needs some digging again in the help files. Then I should be able to link all ffmpeg-x264 settings to vlc-x264 settings. It is as easy as running the command; "vlc --help" giving the following output; VLC-1-0-x command-line help - VideoLAN Wiki


BTW: to come back to this CBR / VBR issue some people are having.

When I either use vlc or the open source segmenter, I always go for 10 second segments with setting of 256k for video and 64k for audio. The encoded segments always end up to be ~800Kb in file size. As we are talking here about not real live streams, but downloaded fragments, the connection should be able to download each fragment to the client within at least 10 seconds. So while playing one segment of 10 seconds, at the background the ipod is downloading the next 10 seconds segment, while trowing away one of the previous segments. I always used settings to keep 5 segments in the m3u8 playlist.

Yesterday, I checked what the smoothstreaming was outputting as file size segments. It is such a different system? I guess the ismv is the video file. But it keeps on growing as one big file instead of segments. Then you have this ism file, which is probably something the same as the m3u8 file, it just uses some xml markup language. There are also some db3 files?

Anyway. question for you Cheezy; How many segments are you using and how long in seconds are they supposed to be. I guess the smoothstreaming module is translating the stuff in the isml directory to what the device wants to see.

EDIT:
  • The resulting stream would not play on my iPhone, probably just some parameter tweaks needed though
Just readed back, you already had similar stuff, going on. Will see if I can come up with the proper vlc-x264 command line, for the ipod/iphone this evening.
 

cheezey

Community Plugin Dev
August 26, 2004
1,559
312
57
West Yorks, UK
Home Country
United Kingdom United Kingdom
  • Thread starter
  • Moderator
  • #82
Re: Re : iPiMP 5.1.0 is released

Yesterday, I checked what the smoothstreaming was outputting as file size segments. It is such a different system? I guess the ismv is the video file. But it keeps on growing as one big file instead of segments. Then you have this ism file, which is probably something the same as the m3u8 file, it just uses some xml markup language. There are also some db3 files?

Anyway. question for you Cheezy; How many segments are you using and how long in seconds are they supposed to be. I guess the smoothstreaming module is translating the stuff in the isml directory to what the device wants to see.

Have a read of this document, it is a good explanation of the Unified Streaming Platform from CodeShop that iPiMP is using, explains the differences between Apple's, MicroSoft's & Flash's streaming solutions and how USP manages to do all three from one source. :)) I sound like a salesman!)

The ismv file is a fragmented MP4 container containing multiple video(h264)/audio(aac) streams (iPiMP only has one video stream at the moment - if we want to do true adaptive bitrate we'd add more of these through additional --newvideo ffmpeg command line parameters)

The ism file is a manifest file detailing the contents of the ismv file.

The db3 file is a sqlite DB used by USP (not sure what for).

The ismv doesn't do segmented files', it keeps writing to the ismv file, which is why you see it continually growing. USP generates an m3u8 file on the fly which, instead of listing the individual filenames of segmented files, lists the start/stop positions of segments in the ismv file - so mimics segments. If you look in Apache\logs\access.log you'll see these requests.
 

j1nx

Portal Pro
July 16, 2005
233
10
OK, got that. To be honest, smart move from the guys.

This is what you use in config.xml
Code:
Streams(SmoothStream)?dvr_window_length=15" inputmethod="2" outputmethod="4"

If I understand it correctly based on the information from smooth streaming this means, you are;
1) Keeping 15 seconds as buffer (dvr_window_length=15)
2) You did not gave a segment length (archive_segment_length=?), so go for the default of 0.

Isn't it better to use something like;
Code:
?archive_segment_length=10&dvr_window_length=30

Let me know your thoughts.

BTW: What is inputmethod and outputmethod do? Is that for "case" selecting different kind of profiles within your asp code?
 

cheezey

Community Plugin Dev
August 26, 2004
1,559
312
57
West Yorks, UK
Home Country
United Kingdom United Kingdom
  • Thread starter
  • Moderator
  • #84
OK, got that. To be honest, smart move from the guys.
Yeah - I realy like the USP solution - it makes it real easy to support multiple devices with minimum effort.


Please try out different archive_segment_length and dvr_window_length

Leave inputmethod and outputmethod alone though, they are nothing to do with USP, they tell MPWebServices how to handle the streams, if you change these from 2 & 4 it will all come crashing down. :)
 

j1nx

Portal Pro
July 16, 2005
233
10
VLC: Figured out all settings needed to create an iPhone compatible mp4 file. Streamed it with the livehttp module of VLC, still stuttering while playback on my ipod. Again opening the fragments manually with an other PC based player does not show this stuttering. I guess VLC is not yet mature enough to handle all the way it should.

Anyway, if someone would want to have a look, this is what I came up with;
Code:
--sout=#transcode{vcodec=h264,vb=256,width=320,height=240,fps=25,deinterlace,acodec=mp4a,ab=96,channels=2,samplerate=44100,audio-sync,venc=x264{aud,profile=baseline,level=30,keyint=30,bframes=0,ref=1,crf=24,deblock=0:0,qpmin=10,qpmax=51,partitions=fast,me=hex,merange=4,subme=2,trellis=0,nocabac}


archive_segment_length: I think this is not working at the moment (bug), tried different seconds, but the ismv file is not rolled to the next.


dvr_window_length: This is the amount of second the playing should start in the past compared to where the encoding takes place. 15 means, you will start playing 15 before the frame it is actually encoding at the moment.


Smooth Streaming, segments length: I now understand how smoothstreaming handles the segment lengths. The video will be splitted at the keyframes.
Code:
g=100
keyint_min=50
sc_threshold=0
So what does this do?
g=100, this means we want a key frame every 100 frames. Considering PAL fps of 25 this means about every 4 seconds.
sc_threshold=0, This means we want zero tolerance if it comes to where to put this key frame. It is normally not wise to insert a key frame in the middle of a scene. Increasing this number allows a margin, putting the key frame at a scene cut, instead of in the middle of a scene.
keyint_min=50, If we allow a margin in the key frame placement, this number means. the minimal distance between two key frames. Pal fps of 25 means at least every 2 seconds.

As Smooth Streaming also uses this key frames as segment lengths, this means every segment is at least keyint_min/fps seconds, up to q(g+sc_threshold)/fps. If you have only one quality stream, you can increase the sc_threshold back to the default of 40. Later if more quality streams are provided, this has to be zero because you want all the different quality segments to be exactly the same.


I also now understand most, if not all of the quality parameters of ffmpeg and why cbr is not really cbr and which values you can tweak to have more consistent bit rates. I will update my first post at my other thread later, explaining all ffmpeg and smooth streaming settings and give maybe 3 pre-settings (fast, medium, slow). Just need some time to write it down properly.


Two comments so far from my side; Apple advises to use ~10 second fragments, so it might be better to use;
Code:
g=250
keyint_min=250
sc_threshold=40

Secondly Apple advises to use up to 44100 for the audio,so maybe it is better to lower the 48000 to 44100.

Will do some additional testing later. Keep you informed.
 

Jay_UK

Test Group
  • Team MediaPortal
  • October 6, 2009
    1,780
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi guys,

    Just like to say thanks to Cheezey for a great app :D

    I used the previous version while in the US to watch F1 on a 46" TV (via my iphone) - My other half thought it was actually on the TV! :D

    I have now upgraded to the this new version (so I get TVSeries), but I am suffering from what other people are getting (black screen and audio only).

    This is while watching TV Series over my local Wifi (N standard). It sometimes works and I can watch a whole episode, other times the episode starts to play fine and then reverts to audio only after some time.

    I can see the normal bandwidth (when it works) being around ~300Kbps (video + audio), but all of a sudden when the video fails its drops to 64K or less (ie audio only) - the video never recovers.

    Anyone got any ideas while the video suddenly stops, but the audio continues?

    I also just experienced an issue where the playback just stopped (was viewing on my iPhone over Wifi). The apache log file has the following:

    [Fri Nov 19 16:20:47 2010] [error] [client x.x.x.x] Handler for smooth-streaming.extensions returned invalid result code 620018

    It was interesting as the log entry had my external IP address listed, but anyway....

    I have attached my whole apache error log.

    Thanks,

    J.
     

    LJ_Skinny

    Portal Member
    February 28, 2008
    7
    0
    Home Country
    Germany Germany
    AW: iPiMP 5.1.0 is released

    Hey

    I really like this Plugin. His really cool to use the iphone as Client. But MP always crashes if i want to play a episode from my Series.

    I have the log as attachement

    Best regards

    Holger
     

    cubii

    Portal Pro
    November 1, 2006
    627
    32
    49
    AW: iPiMP 5.1.0 is released

    Hi cheezey and jn1x

    Because you are talking about new ways to deliver live tv and other stream:

    Is/Would it be possible to get a rtsp: XXX/xxx.sdp stream for example with vlc?

    Then i could watch tv via my android 1.6 tablet, thats not compatible with flash...
    (if the right codec would be choosen for the stream....)


    i know ipimp is for the iphone and it works very well now on my ipod touch (thanks for that!!) but the display is to small and an ipad is not worth the price for that task...(and i dont have the money...i am a student)
     

    j1nx

    Portal Pro
    July 16, 2005
    233
    10
    Re: AW: iPiMP 5.1.0 is released

    Hi cheezey and jn1x

    Because you are talking about new ways to deliver live tv and other stream:

    Is/Would it be possible to get a rtsp: XXX/xxx.sdp stream for example with vlc?

    Then i could watch tv via my android 1.6 tablet, thats not compatible with flash...
    (if the right codec would be choosen for the stream....)


    i know ipimp is for the iphone and it works very well now on my ipod touch (thanks for that!!) but the display is to small and an ipad is not worth the price for that task...(and i dont have the money...i am a student)

    Did you tried the MPWebServices? That piece of software uses vlc to stream to the clients. If you know which vlc out module you need, it is already there to configure.
     

    thesystemera

    Portal Pro
    May 26, 2008
    807
    22
    43
    Auckland
    Home Country
    New Zealand New Zealand
    Hey Cheezey... Thanks for the update....

    I love the streaming TV Series, works like a charm...

    Question though, I'm having issue's streaming my H.264 tv channels... It stutters on and off through all channels and there seems to be no audio what so ever.... Can't hear a thing... I"m in New Zealand and we have some unique H.264 broadcasts which might not be compatible with your encoder... Any one out there in NZ using this successfully... Thanks a million man..
     

    Users who are viewing this thread

    Top Bottom