Results 1 to 5 of 5

Thread: Speed Up Video Playback

  1. #1
    Join Date
    Sep 2007
    Location
    USA
    Beans
    329
    Distro
    Ubuntu 13.10 Saucy Salamander

    Speed Up Video Playback

    I've got a bunch of informational videos that I'd like to speed up so I can knock them out faster

    I've tried using ffmpeg setpts but it's dropping the audio:

    Code:
    ffmpeg -i input.mp4 -r 8 -vf setpts=0.25*PTS -an Output.mp4
    Is there a way to speed up a video (with audio) on Ubuntu without losing frames?

    Thanks!

  2. #2
    Join Date
    Sep 2006
    Beans
    3,490

    Re: Speed Up Video Playback

    Why not speed it up duing playback instead of having to re-encode it? MPlayer will do this just fine. According to the man page:
    Code:
    [ and ]
        Decrease/increase current playback speed by 10%.
    { and }
        Halve/double current playback speed.
    BACKSPACE
        Reset playback speed to normal.
    However, if you must re-encode you will probably have to process the audio separately, such as with sox, and then mux with ffmpeg:
    Code:
    ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a libmp3lame -q:a 4 out.mkv

  3. #3
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    525
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Speed Up Video Playback

    The setpts option isn't dropping the audio in that example, the -an is.

    Really, the easiest way to speed up playback is to do so in the video player (well, it's also possible to do it rather easily with an AviSynth script, but that requires additional types of setup* first). If you want the audio to stay in sync with the video, speeding it up like that will render it almost unlistenable due to chipmunking and music getting garbled something awful.

    *AviSynth proper (2.6a3, but you can augment it with one of SEt's multithreading-capable trunk builds which are more recent) requires Wine; AvxSynth, the Linux port of 2.5.8, requires you to build it yourself (I've not tested whether the audio functionality is completely working, but AssumeFPS should work).


    EDIT: FakeOutdoorsman beat me to it.

  4. #4
    Join Date
    Sep 2007
    Location
    USA
    Beans
    329
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Speed Up Video Playback

    I'm running ffmpeg v0.8.3-4....newest on 12.04. When I try to run the command:

    Code:
    ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a libmp3lame -q:a 4 out.mkv
    I get the following error:

    Unrecognized option 'c:v'
    Failed to set value 'copy' for option 'c:v'

    Any ideas?

  5. #5
    Join Date
    Sep 2007
    Location
    USA
    Beans
    329
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Speed Up Video Playback

    Fixed it by upgrading to ffmpeg v10.4:

    ppa:jon-severinsson/ffmpeg


    Works like a beauty! Thanks!
    Last edited by mastermindg; September 10th, 2012 at 04:20 AM. Reason: Wrap up

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •