VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Hi. First, I apologize if this question has been asked before and if so, please kindly show me the links. But, I'm trying to do something very specific and all my searches have resulted in some confusion.

    I am aware of the various methods of creating time lapse videos. However, for my little project I decided to keep this simple.

    I'm using a GoPro Hero Black 5 in time lapse video mode, 4K with a 5 second interval.

    Yesterday I took a break and went back and didn't realize the default mode was set to video. So, I have 1 hour of 4 K video that I want to convert to a 5 second interval time lapse so I can eventually combine with my other video segments into a complete file.

    I don't have any high end video software yet. So I'm looking for software that can do this for free. I'm aware of VLC, FFMPEG and I believe ffmpeg is probably the best, but I don't have the experiences for the settings.

    I have a bunch of GoPro time lapse videos already and when I look at the details of those I get:
    3840 x 2160, 29.97 frames/sec

    The hour long segment that I want to convert to the 5 second interval time lapse is divided into multiple 4GB files:
    GOPR5028.MP4
    GO15028.MP4
    GO25028.MP4
    etc...

    How can I do this? Thank you.
    Paul
    Quote Quote  
  2. All you have to do is decimate to only one frame every 5 seconds of your video. So if your video is 60 fps, keep every 300th frame, and encode the result at 60 fps. In AviSynth it's very easy:

    Code:
    LSMASHVideoSource("filename.mp4")
    SelectEvery(300)
    AssumeFPS(60)
    Quote Quote  
  3. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Thanks. I'm not following how that works.
    Quote Quote  
  4. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Actually, I did figure out how to put it through, but it reports back cannot play back the file.
    Sorry, was using DirectShowSource.
    Last edited by Phizy; 5th Jan 2019 at 15:11.
    Quote Quote  
  5. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Ok. So, I found this online: ffmpeg -i in.mp4 -vf select='not(mod(n,15))',setpts=N/FRAME_RATE/TB out.mp4

    This seems to do the trick. Specifically I used 150 for the value of 15.
    When I ran this it created the video as I expected, but had a total length of the original video. The original was 8 minutes and the time lapse was about 3, so I know it worked. It just showed the remaining video with the last frame. Plus, there is sound.

    1. How do I have it automatically set the video to the true final length
    2. How do I remove the sound?

    Thanks,
    Paul
    Quote Quote  
  6. I ran that ffmepg command line on a video which had the frame number printed on every frame. The original video was 208 seconds long, and the new video was 14.9 seconds (1/15 the source length) and the same frame rate as the source (24 fps). Examining the video I saw frames 0, 15, 30, 45... I don't know why you didn't get the right length. Maybe your source is variable frame rate?

    To eliminate the audio use -an (audio none) on the command line after the input file.
    Quote Quote  
  7. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Did you type in anything for N, FRAME_RATE, or TB or leave those as the letters?
    Quote Quote  
  8. I copy/pasted your exact command line from the post (and supplied a source video called in.mp4).
    Quote Quote  
  9. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Hmm...strange. Thanks for taking the time to check it out. I appreciate it.
    Quote Quote  
  10. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Hmm...strange. Thanks for taking the time to check it out. I appreciate it.
    Apparently adding in the -an stopped it at the right time.
    Quote Quote  
  11. Ah, yes. The audio and video in a file don't have to start at the same time or have the same length. The Select video filter reduced the video length but the audio was still full length. So your new mp4 file retained the original audio's length. The file I tested with had no audio.
    Quote Quote  
  12. Member
    Join Date
    Jan 2019
    Location
    New England
    Search PM
    Thanks again. I think this worked out perfectly.
    Quote Quote  
  13. Thanks to you too! I suspected it could be done with ffmpeg but I didn't know exactly how. I've added what you found to my collection of ffmpeg examples.
    Quote Quote  



Similar Threads