VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Nov 2010
    Location
    Lille, France
    Search Comp PM
    Hey there,

    I am trying to find the right direction to encode short loops of image sequences - a product spinning 360. The source is 168 png files - 7 seconds at 24 fps. The result will be played online with Flash with progressive download.
    But the two key features I want are:
    1) smooth looping
    2) dense keyframes for seeking (every 4 or 6 frames)


    I have tried to configure this with ffmpeg:
    Code:
    ffmpeg -r 24 -i %03d.png -an -b 1024k -vcodec libx264 -fpre libx264-baseline.ffpreset -g 4 -keyint_min 4 output.mp4
    But there are still problems
    -the first keyframe is not on frame 0, but on frame 1
    -the last 2 keyframe are 160 and 167, but I want them, to be 160 and 164 - the first of each 4 frames should be a keyframe.
    -even after I put the moove atom at the begining of the file the video does not loop smoothly

    Is h264 the best format for the case?
    Can I set all the keyframes explicitly to make sure they are where I want?

    Edgars
    Quote Quote  
  2. Can I set all the keyframes explicitly to make sure they are where I want?
    Not sure about the other questions but you can specify keyframes with a qpfile using x264

    http://mewiki.project357.com/wiki/X264_Settings#qpfile


    It might not be possible to get seamless loop in flash as a video, not sure
    http://www.actionscript.org/forums/showthread.php3?t=139698

    This guy suggest using a cue point to loop using a redundant ending
    http://www.kirupa.com/forum/showthread.php?t=352360

    You might be able to do it as a .swf or .gif
    Last edited by poisondeathray; 3rd Nov 2010 at 08:50.
    Quote Quote  
  3. Member
    Join Date
    Nov 2010
    Location
    Lille, France
    Search Comp PM
    It seems wise to split my problem into 2 parts:

    1) looping
    Your second link has a post that leads to http://blog.theflashblog.com/?p=86 - apparently looping is possible without those workarounds. Anybody knows the trick for encoding?

    2) keyframes
    Thanks, the qpfile link gave me a good insight. As x264 does not offer png sequence as input i will use ffmpeg. There it looks like a good option together with -sc 0 to disable automatic keyframe management and force_key_frames to substitute qpfile. Will try that tomorrow.

    Meanwhile anybody has some better ideas?
    Quote Quote  
  4. As x264 does not offer png sequence as input i will use ffmpeg
    You can use avisynth imagesource() for png input to feed into x264

    According to those comments, I think seamless looping isn't possible because of audio, there is a gap at the beginning causing a pause (looping is possible, not seamless)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!