Video Buffering

Need help? Post your questions here.

Moderator: moderators

Video Buffering

Postby ChiMatt » Fri Jan 14, 2011 7:29 pm

I have been trying to play around with the trancoder settings so I can watch a video on my laptop without the stream pausing every few seconds. I tried adding the "-bufsize" argument to the proper transcoding setting, but it does not appear to work. I setup new players as well that do not transcode and the video must almost completely download before it will begin playing which can take awhile.

My first question is this. Can you set the buffer size for transcoding to allow for jplayer to play seamlessly? If so, can someone post the transcoding command or tell me what I am doing wrong? (ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -bufsize 5000K -ac 2 -v 0 -f flv -)

Secondly, is there a way to get a non-transcoded video player to buffer for a short time and start playing without downloading the whole movie first. This would also be acceptable to me.

I am on my home network testing this and the computer I am transcoding off of has more than the recommended specs for transcoding without issue.

Please help.

ChiMatt
ChiMatt
 
Posts: 33
Joined: Wed Jan 12, 2011 6:28 pm
Location: Chicago

Postby GJ51 » Fri Jan 14, 2011 7:39 pm

I've been testing the video for some time now and I get the best results by converting my video to mp4. Mp4 can be played directly to JW Player without on-the-fly transcoding. Just uncheck the mp4>flv box in the transcoding settings. Once you do that, there is almost no CPU load on the server and playback quality is only dependent on connection speed and the graphics ability of the playback device.

Now, all I have left to do is determine the ideal conversion settings for each device I want to stream video to. I can stream blue ray quality all over my internal network with no problems. Obviously, streaming video over 3g to my EVO 4G is going to require conversion to much lower resolution.

If your on Wifi over internet, you can just hit the pause button to give the download a chance to get ahead of the player. I recently did this from about 400 miles away from my server and was able to watch a blue ray quality movie on my daughter's laptop at a relatives house. Granted, there was FIOS internet available via wireless at the location.

Transcoding: Transcoding is VERY CPU intensive. Ffmpeg only uses one vore per video stream, so even if you think you have more than enough power, if you open task manager and look at the performance graph of the CPU, you'll find that one core is maxed out during transcoding of any high quality video. I have a quad core Xeon and it struggles trying to transcode blue ray quality down to mobile quality video for 3g viewing. That's why I decide it was time to convert to mp4 and make copies at different resolutions for different devices. This also enables more users to stream video at the same time from the server. I'll be testing that aspect soon.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby ChiMatt » Fri Jan 14, 2011 9:13 pm

I played with the videoplayer.jsp settings a bit and added the bufferlength="30", to the flashvars and it worked in improving the stream although it does still buffer after 45 seconds or so. I think if I could change the setting from provider="video" to provider="http" and get the player to cache the file I will be in business. I am going to keep working on this as I know the JW Player will handle HTTP Pseudostreaming in the same way that Youtube will. That would be ideal for me as the video wants to rebuffer everytime the buffer gets below 100% until it reaches 100% again. It is quite frusterating. I just need to get more familiar with how JW Player works.
ChiMatt
 
Posts: 33
Joined: Wed Jan 12, 2011 6:28 pm
Location: Chicago

Postby ChiMatt » Sat Jan 15, 2011 2:49 am

Sindre - I believe the JW Player is playing through the buffer and then dumping the buffer and rebuffering again. Can you tell me how I might fix this issue. It does not seem to happen with every video, but I did try re-encoding the specific video and it is still not working. You can try this yourself. mattbenoist1.subsonic.org Login: guest Passwd: guest. Select the Movie folder on the left side ->Benoist family home movies -> 02282010 - Corinne's 1st Bday -> CorinnesFirst Cake.

I changed the bufferlength in videoplayer.jsp to 5 seconds. The video plays much better with a 30 second buffer but takes longer to load. I tried reducing the bitrate and the issue is still happening. I did use handbrake to reduce the size to no effect. I believe this is due to the fact that JW Player uses the RTMP protocol by default. Is there anyway to get the JW Player to use Http Pseudostreaming to solve this issue? I would definitely give up the security aspects for the ability to fulling buffer a file and/or skip to later parts of a file.

http://www.longtailvideo.com/support/fo ... head-a-lot

http://www.longtailvideo.com/support/jw ... -streaming

http://www.longtailvideo.com/support/fo ... -5-10-secs

I just recently found out about Subsonic and absolutely love the program so far. Many thanks for your help.
ChiMatt
 
Posts: 33
Joined: Wed Jan 12, 2011 6:28 pm
Location: Chicago

Postby privatesam » Wed Mar 09, 2011 3:20 pm

Chimatt,

I have exactly the same problem and have been playing around with some different ideas but yours looks very promising. Did you make any more progress with this?
privatesam
 
Posts: 19
Joined: Fri Feb 26, 2010 10:09 am

Postby ChiMatt » Wed Mar 09, 2011 5:55 pm

Not yet. I think the issue is more on the JW Player side of things. I still think you could change the settings to allow for http pseudostreaming, but I am still not there.
ChiMatt
 
Posts: 33
Joined: Wed Jan 12, 2011 6:28 pm
Location: Chicago

Postby privatesam » Thu Mar 17, 2011 1:44 pm

Chimatt,

Have you seen this new post: http://forum.subsonic.org/forum/viewtopic.php?t=5977

The guy updated JWPlayer to 5.5 - I'm gonna give it a go tonight and see if maybe the new version magically irons out our buffering problems with video streaming!!

(p.s. I've noticed that some avi's buffer fine and that if the original is mp4 it will play directly in JWPlayer without transcoding which helps with some files).

(p.p.s there's also something worth trying in this thread: http://forum.subsonic.org/forum/viewtop ... c&start=15 where the last poster has tried VLC for transcoding instead - might be worth a try)
privatesam
 
Posts: 19
Joined: Fri Feb 26, 2010 10:09 am

Postby GJ51 » Thu Mar 17, 2011 4:28 pm

You might try this for transcoding,

ffmpeg -v 0 -ss %o -async 30 -i %s -f flv -b %bk -r 30 -s %wx%h -ar 44100 -ac 2 -

The challenge is to feed the video to the player faster than the player is playing back. If the CPU can't transcode fast enough, or if your upload speed can't pump it out fast enough, you'll get buffering. Using mp4 untranscoded internally over a home network, you should get no buffering at all. For mobile video, format the video to appropriate resolution flv for you mobile device. You may get some buffering over a poor 3g connection, but you should get no buffering over a decent wifi connection.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York


Return to Help

Who is online

Users browsing this forum: No registered users and 12 guests