VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Apr 2013
    Location
    Santa Rosa, CA
    Search Comp PM
    Hey folks, first off I apologize if this question is in the wrong place, but I am not sure where else to post it.

    I'm creating a mask for a chromakey blend and I wanted to retain as good a quality as I can of the resulting video file, so I was going to use FFMPEG. The resulting video file has to be 7276 frames of the same image.

    I have the script for making a video file from a batch of images, and it works fine. But I wanted to build a video without having to duplicate and rename 7276 frames! I tried just taking in the incremental variable from the original batch script, but it doesn't work that way. So I basically need to know of some way to tell FFMPEG to just use the same image 7276 times.

    Thanks in advance for your help!

    Quote Quote  
  2. Originally Posted by GoldenMeanie View Post
    Hey folks, first off I apologize if this question is in the wrong place, but I am not sure where else to post it.

    I'm creating a mask for a chromakey blend and I wanted to retain as good a quality as I can of the resulting video file, so I was going to use FFMPEG. The resulting video file has to be 7276 frames of the same image.

    I have the script for making a video file from a batch of images, and it works fine. But I wanted to build a video without having to duplicate and rename 7276 frames! I tried just taking in the incremental variable from the original batch script, but it doesn't work that way. So I basically need to know of some way to tell FFMPEG to just use the same image 7276 times.
    Use -loop 1 with -t for duration (in hh:mm : ss : ms notation) and -r for fps

    e.g. lets say you wanted 2 seconds of a 23.976 fps sequence derived from a single still image - this would yield 48 frames . You would have to calculate adjust the parameters for your case, according to the fps you wanted

    Code:
    ffmpeg -loop 1 -r 23.976 -i input.jpg -t 00:00:02 -vcodec qtrle -an output.mov
    If the fps doesn't matter for your particular purpose (or you can interpret the fps in your other application), you can use 1 fps or -r 1 , the -t would be 2:01:16 for 7276 frames , because 2:01:16 is 7276 seconds, and at 1 frame per second = 7276 frames . I wouldn't use fractional fps, because it can cause problems with interpreting in other programs . You don't mention what other program you're using , but it's usually easier to import the still directly in other programs and generate the layer that way, and the filesize will be much smaller
    Last edited by poisondeathray; 8th Jun 2013 at 14:40.
    Quote Quote  
  3. Member
    Join Date
    Apr 2013
    Location
    Santa Rosa, CA
    Search Comp PM
    I get the same result. One frame is recorded. Here's my script...
    c:\ffmpeg\ffmpeg -i c:\rawvideo\mask.bmp -loop 1 -r 29.97 -s 720x480 -aspect 4:3 -t 00:04:05 -vcodec mjpeg -vb 11261600 -an c:\rawvideo\fullmask.avi
    Quote Quote  
  4. Originally Posted by GoldenMeanie View Post
    I get the same result. One frame is recorded. Here's my script...
    c:\ffmpeg\ffmpeg -i c:\rawvideo\mask.bmp -loop 1 -r 29.97 -s 720x480 -aspect 4:3 -t 00:04:05 -vcodec mjpeg -vb 11261600 -an c:\rawvideo\fullmask.avi

    are you using a relatively recent ffmpeg binary ? It works here (I didn't use -vb, but it shouldn't make a difference)

    http://ffmpeg.zeranoe.com/builds/
    Quote Quote  
  5. Member
    Join Date
    Apr 2013
    Location
    Santa Rosa, CA
    Search Comp PM
    I was a build from April but installed the latest and it still gave me the same result. It still renders a file with no errors. It's just a single frame of the .bmp image, not the four minutes and five seconds I need.
    Quote Quote  
  6. Member
    Join Date
    Apr 2013
    Location
    Santa Rosa, CA
    Search Comp PM
    Okay I copied the syntax exactly as you had it but with my variables. This worked. Gonna take some tweeking. I wanted the higher bitrate in there but that might have been tripping it up. Not sure, but this does work now. Thank you!
    Quote Quote  
  7. <deleted>

    ok I see you got it working now, nevermind
    Quote Quote  
  8. Originally Posted by GoldenMeanie View Post
    Okay I copied the syntax exactly as you had it but with my variables. This worked. Gonna take some tweeking. I wanted the higher bitrate in there but that might have been tripping it up. Not sure, but this does work now. Thank you!

    It worked when I added -vb as well .

    Another option is to use quantizer encoding instead of fixed with mjpeg . -v:q <some value> . Lower values yield higher quality, larger filesizes

    You said you wanted "retain as good quality as I can", but note mjpeg is lossy compression, even at the lowest quantizer or highest bitrate . But lossless compression can cause the filesize to balloon (that's why most people import the still into their compositing application instead, especially since it's a static image)
    Last edited by poisondeathray; 8th Jun 2013 at 15:42.
    Quote Quote  



Similar Threads

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