3

First, I have looked at the older questions asking the same, but the responses do not work. Adding -r 30 or 60 to the input file does not impact the output, nor does setting it for the output, which remains unchanged.

I am handling a very large number of files from 1 to 22 gigs recorded (with audio) in 30fps that need to be re-posted as 60pfs, with the corresponding speed increase.

I toyed with ffmpeg a bit and came up with this..

-filter_complex "[0:v]setpts=0.50*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -vcodec:v libx264

It works fine, but to have to wait out a complete re-encoding of the video and audio to produce the same video with the fps changed seems like an insane waste of time.

Am I missing something simple? Is there not a way to -c copy with a new fps playback rate on the resulting file? (if it still has to recode the audio to maintain sync that's fine, audio is quick enough it doesn't much matter)

Eslake
  • 121
  • 1
  • 6
  • 1
    See my answer here: https://superuser.com/a/1358974/48624 It's not documented well, but `-r` only works on raw streams. – Brad Nov 30 '18 at 01:21
  • Thanks for the help... but when I try this method the audio track collapses to 0k and the clip goes silent. I know the annexb raw storage holds sound data, I use it to concat files together all the time, so I'm not sure where the loss is. – Eslake Nov 30 '18 at 04:51
  • Yes, you have to actually pull out the raw elementary video stream and process it first. Then, filter your audio and assemble the two back together. If you have a potential synchronization issue, this gets much more complicated. – Brad Nov 30 '18 at 04:57
  • 1
    nm, got the sound working with a minor tweak, and the frame rate alterations work perfectly. Thanks! fix was simple.. ffmpeg -i sourceclip.mp4 -codec copy -bsf:v h264_mp4toannexb -f mpegts raw.h264 – Eslake Nov 30 '18 at 04:58

0 Answers0