[x264-devel] x264, FFMPEG or Flash issue

Steve R. Bennen sbmmm at hotmail.com
Sat Feb 20 00:00:51 CET 2010







CONTEXT:  I am trying to deliver video content with frame-by-frame
viewing via a flash player online.  For encoding, I am using FFMPEG
with the x264 video codec for files with .mp4 containers.  However, I
have run into a problem.  For reference, FFMPEG and x264 were compiled
in March of 2009.  The output is:

FFmpeg version SVN-r18145, Copyright (c) 2000-2009 Fabrice Bellard, et al.

  configuration: --enable-gpl --enable-postproc --enable-pthreads

--enable-libfaac --enable-libfaad --enable-libmp3lame

--enable-libtheora --enable-libx264 --enable-libxvid

  libavutil     50. 1. 0 / 50. 1. 0

  libavcodec    52.22. 2 / 52.22. 2

  libavformat   52.32. 0 / 52.32. 0

  libavdevice   52. 1. 0 / 52. 1. 0

  libswscale     0. 7. 1 /  0. 7. 1

  libpostproc   51. 2. 0 / 51. 2. 0

  built on Mar 22 2009 18:22:55, gcc: 4.3.2

And my encoding parameters are:  –i INPUT -r 30  -s 768 x 432    -t 00:00:10  -acodec libfaac  -ab
128k  -vcodec libx264  -vpre hq  -crf 20  -g 1 -keyint_min 1  –threads 0  OUTPUT.mp4

Obviously,
by setting the gop flag = 1, I am encoding to make each frame a
keyframe (with keyint_min = 1 as a reinforcement).  As a result, the
Flash player I am using has been modified to seek by keyframe using
time seek.  The math is to time seek by 30 frames a second, or 1/30,
equals .033 seconds per step/keyframe.   Therefore, the Flash player
has been compiled to time seek by intervals less than .033 seconds
(actually .029 seconds) so each step will find the next keyframe.

PROBLEM:
When the gop flag = 2, it works just fine and the Player will step
twice to reach each new keyframe (because the player is still seeking
by time intervals less than the keyframe rate).  This encoding set-up
allows for 15 keyframes/second, but I want 30 keyframes/second.  The
Flash player works as designed, but when I set -g 1 for the desired
keyframe rate,  the video plays back fine, but when I pause and then
advance by step, it reverts back to the first frame of the file and
then stalls (without any step advances, regardless of how many clicks
or scrubbing of the playhead).  

Theoretically, this should
work with 30 keyframes/second with a -g 1 and -r 30.  With all else
being equal, it does work with -g 2 and -r 30, which equals 15
keyframes/second.  Why would 15 work and not 30 (as long as the Player
seeks correctly, as mine does based on visible time increments/step)? 
Is this FFMPEG, x264 codec or Flash problem?  Any suggestions how to solve?

Thanks, Steve 		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20100219/00f33d7e/attachment.htm>


More information about the x264-devel mailing list