This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can I change the frame rate without loosing the audio sync?

Tags: None
(comma "," separated)
jdaniel
Registered Member
Posts
7
Karma
0
I've being editing a video during several days (so many hours of work :'( ) and today I realized that the project is set to 50fps and the clips were recorded at 25 fps :'( :'( :'(

If I change the project to 25 fps the audio desynchronizes (I have audio and video in separate tracks). Can I change the frame rate of the project maintaining the audio synchronization?

I guess I can render the project at 50fps and no one would notice the difference but... I would have a final video file with more MB than necessary, moreover I would spend about 5 more hours of rendering since my pc is too slow.

Thanks for your help! :)
User avatar
CorrosiveTruths
Registered Member
Posts
87
Karma
0
OS
jdaniel wrote:I've being editing a video during several days (so many hours of work :'( ) and today I realized that the project is set to 50fps and the clips were recorded at 25 fps :'( :'( :'(

If I change the project to 25 fps the audio desynchronizes (I have audio and video in separate tracks). Can I change the frame rate of the project maintaining the audio synchronization?

I guess I can render the project at 50fps and no one would notice the difference but... I would have a final video file with more MB than necessary, moreover I would spend about 5 more hours of rendering since my pc is too slow.

Thanks for your help! :)

Something that has worked for me in the past is to generate a script instead of rendering directly. Then change the script for the different frame-rate, and then run the script.
TheDiveO
Registered Member
Posts
595
Karma
3
OS
jdaniel wrote:I've being editing a video during several days (so many hours of work :'( ) and today I realized that the project is set to 50fps and the clips were recorded at 25 fps :'( :'( :'(

If I change the project to 25 fps the audio desynchronizes (I have audio and video in separate tracks). Can I change the frame rate of the project maintaining the audio synchronization?

Which Kdenlive version do you use? On which system? I'm asking because I remember having seen some fixes in the 15.12.x branch concerning project fps and clip import with different fps.
jdaniel
Registered Member
Posts
7
Karma
0
Which Kdenlive version do you use? On which system? I'm asking because I remember having seen some fixes in the 15.12.x branch concerning project fps and clip import with different fps.


Is 4.13.2 in Linux Mint 17

Something that has worked for me in the past is to generate a script instead of rendering directly. Then change the script for the different frame-rate, and then run the script.


So just change the frame rate, not pay attention to the monitor screen sync, create a script and then render from it would make it right?
TheDiveO
Registered Member
Posts
595
Karma
3
OS
There is no Kdenlive 4.13.2, arbitrary packager versioning doesn't help. Correct Kdenlive versions go up to 0.9.10, then jump to 15.04.x, 15.12.x, ...
User avatar
CorrosiveTruths
Registered Member
Posts
87
Karma
0
OS
Something that has worked for me in the past is to generate a script instead of rendering directly. Then change the script for the different frame-rate, and then run the script.


So just change the frame rate, not pay attention to the monitor screen sync, create a script and then render from it would make it right?

No, generate a script of your working project. Then in the script that comes out change the framerate.

So you have a project in 50fps. Generate a script instead of rendering.

The script will look something like this:

Code: Select all
#! /bin/sh

RENDERER="/usr/bin/kdenlive_render"
MELT="/usr/bin/melt6"

SOURCE_0="/home/peter/kdenlive/scripts/Soma-1_001.sh.mlt"
TARGET_0="file:///home/peter/kdenlive/Soma-1.mkv"
PARAMETERS_0="-pid:2755 in=163 out=55174 $MELT atsc_1080p_50 avformat - $SOURCE_0 $TARGET_0 f=matroska crf=18 acodec=libopus ab=256k pix_fmt=yuv420p preset=veryslow real_time=-3"
$RENDERER $PARAMETERS_0


There's a bit that specifies the framerate 'atsc_1080p_50'. Change to atsc_1080p_25.

Run the script.
jdaniel
Registered Member
Posts
7
Karma
0
TheDiveO wrote:There is no Kdenlive 4.13.2, arbitrary packager versioning doesn't help. Correct Kdenlive versions go up to 0.9.10, then jump to 15.04.x, 15.12.x, ...


I've upgrade to 0.9.10. How can I jump KDE Development Platform to 15.04 and then to 15.12?
jdaniel
Registered Member
Posts
7
Karma
0
TheDiveO wrote:There is no Kdenlive 4.13.2, arbitrary packager versioning doesn't help. Correct Kdenlive versions go up to 0.9.10, then jump to 15.04.x, 15.12.x, ...


I've upgrade to 0.9.10. How can I jump KDE Development Platform to 15.04 and then to 15.12?

CorrosiveTruths wrote:No, generate a script of your working project. Then in the script that comes out change the framerate.

So you have a project in 50fps. Generate a script instead of rendering.


Thanks, I'm trying to update the software as TheDiveO is telling my, and if this doesn't work (or I can't do it) I'll try your script. Thanks a lot! :)
TheDiveO
Registered Member
Posts
595
Karma
3
OS
I would suggest trying the script method first that corrosivetruths describes. This way you get your project done first, before venturing into update territory.

When upgrading, make sure your distribution properly supports Qt5 and KDE Frameworks 5. Some distros still don't have this correctly done, so be careful. Also make sure that your distro has already Kdenlive 15.12.1 to offer, not 15.12.0. Don't work with either 15.04 or 15.08, make sure to start with 15.12.1. I've worked with the older versions and could work around of some of their bugs. But, you should right go for 15.12.1 which is a fine release. I would suggest to do a VM-based install in order to find out whether you can actually make the transition to Kdenlive 15.12.x. There have been some changes inbetween, so test thoroughly first.

My experience in the past had been that distribution packagers made a lot of packaging errors, not testing Kdenlive, MLT, and ffmpeg properly before release. For that reason, I'm using Kubuntu 15.10, but don't install Kdenlive from Kubuntu's repos. Instead, I'm compiling ffmepg, MLT, and Kdenlive directly from their respective source code repositories. That kept me with a working system all the time. And for the few times I hid a real bug(ger) I wrote a bug report test case and stack trace, and the developers were quick to fix. So I just needed to wait a short while, then pull the changes, recompile, et voila, were working again.
jdaniel
Registered Member
Posts
7
Karma
0
CorrosiveTruths wrote:So you have a project in 50fps. Generate a script instead of rendering.

The script will look something like this:

Code: Select all
#! /bin/sh

RENDERER="/usr/bin/kdenlive_render"
MELT="/usr/bin/melt6"

SOURCE_0="/home/peter/kdenlive/scripts/Soma-1_001.sh.mlt"
TARGET_0="file:///home/peter/kdenlive/Soma-1.mkv"
PARAMETERS_0="-pid:2755 in=163 out=55174 $MELT atsc_1080p_50 avformat - $SOURCE_0 $TARGET_0 f=matroska crf=18 acodec=libopus ab=256k pix_fmt=yuv420p preset=veryslow real_time=-3"
$RENDERER $PARAMETERS_0


There's a bit that specifies the framerate 'atsc_1080p_50'. Change to atsc_1080p_25. Run the script.


This totally worked! Thanks a lot CorrosiveTruths!


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient