2

I have an MTS file recorded at 60pfs.

I want to save a version of it that's playing at 1/2 speed with 30fps, which I can e.g. upload to Youtube for such slow motion playback there.

How can I do that with some OS X tool(s)?

GJ.
  • 9,673
  • 26
  • 74
  • 115

2 Answers2

1

If you want to install FFmpeg, do so by installing Homebrew first, then brew install ffmpeg.

All you have to do is:

ffmpeg -i input.mp4 -vf "setpts=(1/speed)*PTS" output.mp4

… where speed is the speedup factor, e.g. 2 for doubling, or 0.5 for slow motion at half speed. FFmpeg will change the presentation timestamp of the individual frames instead of the actual framerate.

This often works better than just setting a different framerate. If you were to set a lower framerate, all FFmpeg would is drop the frames in between. You'd end up with a video of the same duration, but no real slow motion.


If you want to use mencoder for OS X instead, then use Homebrew to brew install mplayer. It will ship with an mencoder binary. Now, you could try one of these:

mencoder -fps 12 -nosound -ovc copy in.mp4 -o out.mp4

… where 12 would be the result frame rate. Or:

mencoder -speed 1/2 -nosound -ovc copy in.mp4 -o out.mp4

… where you can set the speed factor manually.

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
slhck
  • 223,558
  • 70
  • 607
  • 592
  • thanks, but when I try this although the framerate indeed decreases, the entire video seems to get drastically degraded in terms of quality. Is there any way to do this in a lossless way or with very little loss? – GJ. Nov 04 '12 at 17:18
  • FFmpeg will use libx264 for encoding and choose the default quality factor (CRF) of 23 here. Use a lower factor for higher quality, e.g. 18: `ffmpeg -i … -vf … -crf 18 output.mp4` – slhck Nov 04 '12 at 17:44
  • do you mean to say that there's no way to losslessly slow it down? it would seem very odd since even such modifications as to rotate/flip the video can be performed losslessly. – GJ. Nov 04 '12 at 21:27
  • Hm. Probably not with FFmpeg, at least no way I know of. `mencoder` can do it, but I unfortunately haven't found a working version for OS X yet. (See update to answer) – slhck Nov 04 '12 at 21:42
  • Whoops, turns out there *is* an `mencoder` binary from Homebrew. – slhck Nov 04 '12 at 21:48
  • mencoder seems to work perfectly for the video - but the audio gets completely lost (even when I use `-oac copy`). Also, while the output file plays on VLC, the slowed-down mp4 no longer is playable with QuickTime Player.. – GJ. Nov 04 '12 at 23:28
0

AviDemux seems to be the way to go: http://fixounet.free.fr/avidemux/

You can change the Framerate by going to Video > Framerate and setting it as 30fps.

Here's a blog describing how to export it for YouTube on Windows, but the process should be similar on a OS X. http://greeenjava.blogspot.com.au/2011/01/easy-steps-to-create-hd-video-for.html

Matthew Brown
  • 206
  • 1
  • 7