Reply to topic

MP3 length wrong in project

rsd
Registered Member
Posts
12
Karma
0

MP3 length wrong in project

Thu Sep 03, 2015 5:15 pm
Hello,

I noticed that when I add a mp3 clip to a project, it usually is inserted with about 48 frames more than it really is.
This isn't really affecting me as it is on the end of the movie, but can affect other people.

In the latest test, the mp3 clip has: 15m43s177 in audacity and 943.155011 (15m43s155) in sox.
In kdenlive it is 15m44s23f (in a 30p project).
From the mlt xml file (script generated) it is 28343 frames (15m44s766).

Is there any reason for kdenlive consider this extra time? Is this some sort of workaround?

-rsd
capslock
Registered Member
Posts
698
Karma
4
OS

Re: MP3 length wrong in project

Sat Sep 05, 2015 1:52 pm
Workaround: Use audacity to convert mp3 to wav.
Frizou
Registered Member
Posts
23
Karma
0
OS

Re: MP3 length wrong in project

Fri Oct 02, 2015 3:50 pm
Hi,

I'm also affected with audio length problem.

My problem: :-\
- a render my project to audio only, wav format (thanks to capslock)
- I edited my audio with audacity, and saved it as new wav file
- I imported this new wav file to my project and move it to audio track (disabling original audio)
- I rendered my project to .mp4
--> I've got a picture / sound sync problem.

Looking more accurately, I saw with MediaInfo that .mp4 and .wav length are different: :o
- .mp4 file is 57mn 51s 660ms
- .wav files are 57mn 51s 552ms
- in Kdenlive project, my .wav audio starts at 0:0:0, but ends at 00:57:21.27 while video ends at 00:57:21.32 (50fps)

How to get out this problem ?

PS: one more observed fact: editing audio with audacity, I found at least 2 gaps in my sound (on around 3 seconds and one around 2 seconds). Those gaps coincide with automatic .MTS file split during recording with Sony Handycam HDR-CX740.
TheDiveO
Registered Member
Posts
595
Karma
3
OS

Re: MP3 length wrong in project

Fri Oct 02, 2015 5:18 pm
You don't need to render to audio/wav only. The workflow I'm using is this:

1. add .mp4 clip with audio to project bin.
2. right click on .mp4 clip in project bin, then choose "Extract Audio" > "Wav 48000Hz".
3. Choose a suitable filename or accept .mp4.wav -- I usually accept so to immediately see from the file name that this is the source audio from the mp4 file.
4. Open .mp.wav in Audacity and do your audio post.
5. Export from Audacity to, say, .wav.
6. Add you post-processed audio .wav to Kdenlive project bin.
7. Drag .wav clip onto audio track.
8. Don't forget to mute the video track with the original audio.

This should give you (hopefully) correct audio. The only problem in this workflow is that Kdenlive only allows audio alignment to frame granularity ... which sometimes, well, sucks a lot.
Frizou
Registered Member
Posts
23
Karma
0
OS

Re: MP3 length wrong in project

Fri Oct 02, 2015 7:56 pm
TheDiveO wrote:2. right click on .mp4 clip in project bin, then choose "Extract Audio" > "Wav 48000Hz".


If you have 1 file in your project, right.
I have 6 files in my project, which is quite comfortable, but I may have 100 ! ;D
TheDiveO
Registered Member
Posts
595
Karma
3
OS

Re: MP3 length wrong in project

Fri Oct 02, 2015 8:03 pm
Frizou wrote:I have 6 files in my project, which is quite comfortable, but I may have 100 ! ;D

Agreed. o) I don't have the command line ready for this, but the UI menu item is probably just a wrapper around a ffmpeg invocation. Maybe a web search for ffmpeg and striping audio may yield useful results?

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], boospy007, claydoh, Exabot [Bot], Google [Bot], nshiell, Sogou [Bot], TG