You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback Created Feb 21, 2010

This thread is solved

Views: 2719     Replies: 10     Last reply Feb 22, 2010  
You must login first before you can use this feature

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

For some time now I've been looking for a method to limit or prevent stuttering or jerky playback of my flv mp4 encoded movie videos. I have four different dual core 2 ghz+ computers, each of which experiences different degrees of jerkyness with movie videos authored at 720x480, 500 kbs, 23.976 fps, x264 encoding. I also have a .99 ghz netbook on which the jerkyness is so bad it's impossible to view any of my movie videos.

This forum and other web sites have provided quite a number of suggestions for reducing jerkyness including reducing the size of the video, reducing its bit rate, reducing its frame rate, changing to a different encoder. I have even made the suggestion to someone else in this forum to acquire a faster processor to solve the issue.

Recently by accident, I come across a possible solution that I would like some feedback on. To my surprise, this approach even allowed me to view my videos on my very slow netbook with almost no jerkyness.

The approach I use to display my videos includes the html script line: <script type="text/javascript" src="flowplayer-3.1.4.min.js"></script>

Embedded within flowplayer-3.1.4.min.js are many hundreds of commands one of which is: quality:"high". When I changed the "high" to "low", video jerkyness virtually disappeared on all my computers. The price for the reduction in jerkyness was that edges of video images especially displayed text became jagged. On the other hand the images did appear sharper and crisper.

Does anyone know of a website that gives a detailed explanation of what is going on when this change is made and why the jerkyness disappears? I came across a website: http://kb2.adobe.com/cps/127/tn_12701.html that discusses quality attributes assignable to Flash OBJECTs and EMBED tags. It lists a number of possible quality settings including low, autolow, autohigh, medium, high and best. Might these settings be applicable to the quality entry in flowplayer-3.1.4.min.js as well? If not, what might be the other quality settings, if any, besides high and low?

Any feedback would be appreciated.

lol

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from r11532
->"Might these settings be applicable to the quality entry in flowplayer-3.1.4.min.js as well?"

Yes their one in the same.
The adobe doc's page you posted explains it well.

Here's a few x264 and other general encoding options that play a roll in decoding resources usage.

1. Use a lower res "which you seem to be"
2. Use few or no bframes, if their used use 3 or less than 3
3. Use few or no reference frames, again if used use 3 or less than 3
4. Always use an updated version of x264 and a gui that's able to run it. If you're using cmd line make sure the cmd's still exist, a lot has changes recently with x264. The latest x264 can be downloaded here: http://x264.nl/

Updated x264 wiki here: http://mewiki.project357.com/wiki/X264_Settings#Quick_Run_Support

Have you tried enabling hardware acceleration via the flowplayer config?

accelerated: true,
More info here: http://flowplayer.org/documentation/configuration/clips.html

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: » Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from edge
Edge,

Yes, I have done extensive experimentation with all the encoding suggestions you made and others (lots of others) but with limited success. Yes, I have tried hardware acceleration both on and off. I do use the most recent version of x264.

The change in the quality setting in flowplayer-3.1.4.min.js is the first major impact on jerkyness I've come across. In the last few minutes, I've also experimented with changing the setting to autolow and autohigh. I'm using my netbook (worst case) as my test platform for testing the various settings. I found that autolow appears to both retain low jerkyness while smoothing out the jagged edges.

Thanks for the quick feedback,

lol

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from r11532
If you're running the latest version make sure to add --weightp 0 to the cmd line. Currently only the beta version of flash player is able to correctly render weighted p frames.

You may also want to consider disabling mbtree: --no-mbtree depending on your media. Its great in some situations but bad in others.
I'm unsure what kind of impact either of these 2 settings have on decoding performance as they haven't been beneficial to the media I work with.

I wanted to ask you what's your reasoning behind renaming the .mp4's? Is it a limitation of the cms you're working with?

If you have a test file I could download, I could encode it and post a link. A small source file would be ideal.

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: » Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from edge
Edge,

I will experiment with your suggestions. Some time ago I opted to use ffmpeg to wrap my mp4 videos and mp3 audio's into flv extension video files. At the time I was having problems streaming my mp4s and experiencing green screen issues. When I went to the flv container approach, the problems went away. Since the approach worked, I've stayed with it ever since.

Here is a sample.avi file. Its specifications are; Video: Xvid compressed, 720x304, 983 kbs., 23.976 fps. Audio: 22050, 16 bit, Stereo, PCM. Duration: 40 seconds. Additionally, the clip's original vob bit rate was 6140 kbs. encoded through virtualdub with filters msharpen settings of 120/15 and contrast boost of 112.

http://r11532.freetzi.com/sample.avi

lol

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from r11532
Here's a quick test encode: http://vizmu.com/flash/bf-test.mp4

I'm interested in seeing how it performs with the flash quality settings you're using + the netbook. I didn't re-encode that xvid sample, thanks for posting it though.

Our of curiosity have you tried using Aac audio instead of mp3?

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: » Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from edge
Edge,

I reencoded your http://vizmu.com/flash/bf-test.mp4 video using my standard script for encoding my movies giving the following results:

Analysis of bf-test.mp4   Analysis of bf-test.flv
source vizmu.com
encoder unknown           encoder x264
size 848x352              size 848x352
fps 23.976                fps 23.958
audio AAC mono            audio mp3 stereo
Video 938.35 kbs          Video 489.28 kbs
Duration 30.68 sec        Duration 30.72 sec
file size 3.70 mb         file size 1.98 mb
Download of my flv encode: http://r11532.freetzi.com/bf-test.flv

A side by side 6x blow-up of identical frames from each video suggests a very very tiny improvement in very fine detail at the higher bit rate.

At 6x the overall quality difference ranges from undetectable to almost undetectable depending on which frames are compared.

I ported both videos onto by movie server and played them back on my netbook computer to look for stuttering. Unfortunately the video itself jumped from scene to scene so quickly it was almost impossible to gauge if there was a difference. I'm going to download some movie trailers and conduct some additional experiments to see if there are any differences.

The script I used to compare the videos was:

<P><object id="flowplayer" width="100%" height="100%" data="flowplayer-3.1.2.swf" type="application/x-shockwave-flash">
<param name="movie" value="flowplayer-3.1.2.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="accelerated" value="true" />
<param name="flashvars" value='config={"clip":"bf-test.mp4"}' />
</object></P>
Yes, I'm familar with AAC audio, however, I've been using mp3 for so long that it's difficult to change. Also, my dozen+ audio tools are optimized for mp3 rather than AAC.

lol

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: Need Feedback on Possible Cure for Stuttering or Jerky Video Playback , from r11532
Forgive me for being blunt but if you're going to use mp3 audio @ 32kbps, rename the file to flv, use "fast - non high quality" encoding settings and are apparently targeting the low end pc audience why don't you just use Vp6 flv's?

Here's a vp6 flv: http://vizmu.com/flash/bf-test_1.flv
Its at the default res, I just tossed it in and ran it, took literally less than 2 minutes to encode.

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: » Need Feedback on Possible Cure for Stuttering or Jerky Video Playback , from edge
Edge,

I appreciate your suggestions and you don't need to apologize for being blunt. It's obvious that you have a great deal of experience and knowledge in this field and I will take all of your inputs seriously.

I have experimented with Spark flv, On2 VP6, Vp7 and VP8. In the beginning I was encoding my videos using VP6. At first I thought it was great. It was especially impressive at eliminating macroblocking, even in dark scenes. Eventually though, I noticed that some scenes had excessive loss of detail especially backgrounds having lots of green such as trees and lawns. There is segment in the movie Goodfellows where the loss in background detail was so bad its embarrassing.

VP7 and VP8 don't have this problem but when compared to h264, were no better in quality and were slower to encode. In the end, I reencoded my entire video library (a lot of effort) using x264. Macroblocking reduction was not as good as VP6 but the distribution of detail was much better.

As to the flv extensions on my videos. As you know flv is both an encoder and a container. Under the old Flash standard, use of h264 packaged in a flv container with an flv extension is perfectly acceptable (though under the new standard it's not recommended but isn't precluded). If the day comes when it is precluded (probably never), then I will have to switch to mp4 containers and extensions but until then I will continue using flv.

I used mp3 instead of AAC. Why, because I've been using mp3 for years and audio quality isn't that important to me. The extra audio fidelity at a given file size and bit rate achievable by AAC over mp3 is lost on all my home computers (especially laptops) and on my TVs which have very limited audio quality outputs.

The decisions I make in how I encode my videos and the settings I use are based on a combination of goals and constraints and experimental results. I want the highest quality possible achievable at 500kbs video constrained by encoding in a reasonable time frame. I have even experimented with encoding settings resulting in an encoding speed of 2 fps on my quad core 3.4 ghz machine. The outcome was almost identical to alternative settings that encoded at 75 fps. I would accept an encoding speed of 2 fps if the quality payback was there, which it wasn't.

As far as experimenting with x264 quality settings, I've mostly given up trying various combinations. Using a few simple virtualdub filter settings and x264 at its default settings produces a video image quality at 500 kbs that is nearly indistinguishable to that of the original vob at over 5000-6000 kbs (the loss in detail is so small that you have to enlarge the images 4x or 6x to see the tiny differences). I'm not suggesting that 500 kbs = 5000 kbs but the video image quality in almost 100% of dvds is so far below that suggested by their vob bit rates that 500 kbs ends up looking like 5000 kbs.

After solving my streaming issues, metadata issues, audio normalization and equalization issues, flowplayer configuration issues and lastly image quality issues, my final concern is the playback jerkyness issue.

I value whatever suggestions you can make toward resolving this remaining challenge.

lol

Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 21, 2010

Reply to: Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from r11532
I completely agree with you regarding x264's quality and its distribution of information throughout the video, its far superior to Vp anything. Although Google just officially got On2 so it will be interesting to see how this unfolds: http://www.theregister.co.uk/2010/02/20/google_nabs_on2/

Audio encoding: Using NeroAac would allow you to use even lower audio bitrates while maintaining your current level of acceptable audio quality. NeroAac = better quality at substantially lower bitrates = smaller files. Here's one at 20kbps audio: http://vizmu.com/flash/bf-20kbps-audio.mp4

Going back to your initial question about resources usage:
The only way to really test this is to start from scratch with your encoding method. Even if only for testing. It's important to know if using a 100% compliant .mp4 will correct the resource issues you're having. You also may want to look into using x264 presets. There's a thread here about them: http://forum.doom9.org/showthread.php?t=148149&highlight=preset

If you've already tried the above extensively its possible you're hitting the limits of the codec's usage in flash on various older or underpowered machines. As you discovered setting the quality can help. Below is a few things to try via the player.

Player setup:
Setting the actual width and height of the player in pixels rather than percentages is preferred.
I don't think setting accelerated via the params works. Albeit I haven't tested it, but I'm pretty sure it needs to be in the flashvars config section.

The latest version of flowplayer is 3.1.5, upgrading it would be beneficial. The latest version is here: http://releases.flowplayer.org/flowplayer/flowplayer-3.1.5.zip

Try the below snippet, it should enable acceleration correctly.

<object id="flowplayer" width="848" height="384" data="flowplayer-3.1.5.swf" type="application/x-shockwave-flash"> 
<param name="movie" value="flowplayer-3.1.5.swf" /> 
<param name="allowfullscreen" value="true" /> 
<param name="allowscriptaccess" value="always" />
<param name="quality" value="autohigh" /> 
<param name="flashvars" value='config={"clip":{"scaling":"fit","autoPlay":true,"accelerated":true,"url":"bf-20kbps-audio.mp4"}}' /> 
</object>

r11532

Posts: 30

Registered:
Dec 7, 2009

Need Feedback on Possible Cure for Stuttering or Jerky Video Playback

Posted: Feb 22, 2010

Reply to: » Need Feedback on Possible Cure for Stuttering or Jerky Video Playback, from edge
Edge,

I will get back later on to report on the outcome of these suggestions. It will take a few days to check them out. Until then.

lol