I tried to use the setpts filter in ffmpeg to change the speed of a video from 24 fps to 25 fps. But the output video doesn't have 25 fps, it has 24 fps.
The commands I tried:
Code:ffmpeg -i infile.m2ts -filter:v "setpts=1.041666666666667*PTS" -codec:v libx264 -an outfile.mkvinfile.m2ts has 24 fps, outfile.mkv has 24 fps, but it should have 25 fps, and I don't know why it doesn't have 25 fps.Code:ffmpeg -i infile.m2ts -filter:v "setpts=N/(25*TB)" -codec:v libx264 -an outfile.mkv
+ Reply to Thread
Results 1 to 11 of 11
-
Last edited by codemaster; 15th Dec 2023 at 19:29.
-
Last edited by Swedaniel; 15th Dec 2023 at 21:11.
-
But I want to change fps and duration, without duplicating or dropping frames. And "-r 25.00" and "fps=25" don't do that.
I use this AviSynth+ script:
Code:LWLibavVideoSource("infile.m2ts") AssumeFPS(25, 1, true)
Last edited by codemaster; 15th Dec 2023 at 21:22.
-
Oh ok, i see! i wasnt sure if you had mixed thing up what fps is! so basicly you want to change the display duration of each frame from the video so it goes faster or slower! maybe just need to fine tune the values so it will display each frame for an specific amount of time, to the lower, which will eventually display 25 frames in one second instead of 24!
Edit: I can imagine it beeing an setting require percise numbers added to display the exact number of 25 frames in one second, maybe just need to fine tune it some!Last edited by Swedaniel; 15th Dec 2023 at 21:25.
-
I want to speed up video and audio. Because source is live concert on bluray at 24 fps. But it was recorded at 25 fps, and was slowed down to 24 fps to make bluray. And I know how to do it in AviSynth+, but I don't know how to do it in ffmpeg. And I wanted to do this with ffmpeg.
-
I think you just have to add the -r as Swedaniel mentioned:
Code:ffmpeg -i infile.m2ts -r 25 -filter:v "setpts=N/(25*TB)" -codec:v libx264 -an outfile.mkv
-
Yeah ok i think i know what you mean! ie. Once the video is fixed now the audio is out of sync and all of this and one must become some sort of mathematical expert with the endurance of an olympic swimmer to pull the whole thing off!
Edit: Have you checked into this Avanti program? it have support for ffmpeg+avisynth and it do have ALOT of functions and features.. amongst them are frame rate conversion, script editor, rewrite pts, sync audio, audio sync manager, audio channel mapper and the list can go on for an long time! allso the Video and Audio have command line options that can be added separately! It is free to use and can be downloaded from here on VideoHelp! I tested it, it is functioning real good with FFMpeg Essentials v.6.0!Last edited by Swedaniel; 15th Dec 2023 at 23:12.
-
Problem was I assumed setpts changes fps. It doesn't. I have to change both pts and fps. I tried:
Code:ffmpeg -i infile.m2ts ^ -filter:v "setpts=N/(25*TB), fps=25, setsar=1/1" ^ -codec:v libx264 -preset slower -tune film ^ -x264-params crf=23:min-keyint=25:keyint=250:colormatrix=bt709 ^ -an ^ outfile.mkv
Last edited by codemaster; 15th Dec 2023 at 23:54.
-
Try shutter encoder..load your video then in the choose function click conform. it will change the fps without compression.
-
And using "-r" or "fps" with setpts not only changes fps, but it also prevents dropping frames.
Last edited by codemaster; 16th Dec 2023 at 10:36.
Similar Threads
-
PotPlayer doesn't show correct colors, changing Color Space does not help.
By ObjectNull85 in forum Software PlayingReplies: 26Last Post: 24th Oct 2024, 13:02 -
Please help to add audio noise while using "mpdecimate,setpts=N/FRAME_RATE/
By Sat Yo in forum Newbie / General discussionsReplies: 0Last Post: 7th Sep 2023, 12:37 -
ffmpeg setpts not behaving as expected
By tfolder in forum Newbie / General discussionsReplies: 13Last Post: 27th Dec 2020, 19:07 -
VSDC free editor changing speed of video
By Alianco in forum Newbie / General discussionsReplies: 10Last Post: 6th Jun 2020, 10:31 -
subtitles doesn't work?
By knave in forum SubtitleReplies: 1Last Post: 25th May 2020, 08:04