When exported, video and audio become out of sync

Asked by David Lynch

No matter in what format I export the video, the picture and the audio are always a bit out of sync. It is so frustrating because the preview is exactly in sync. Any ideas that does not involve starting editing from scratch?

Many thanks

David

Question information

Language:
English Edit question
Status:
Answered
For:
OpenShot Video Editor Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Girard (eolinwen) said :
#1

Hi,
You should try to update your version of MLT. Which one is it on which distribution and version ?
See here how to do that : https://answers.launchpad.net/openshot/+faq/1861

Revision history for this message
Tony Whitmore (tonywhitmore) said :
#2

I have experienced the same issue, using the latest MLT and openshot from the PPAs. In the end I converted the MOV files from my Canon 5D Mk II to MP4 files and this seemed to get rid of the issue. At least, as far as my eyes can tell after a day looking at a monitor!

I used ffmpeg to convert the files like this:

find . -iname '*.MOV' -maxdepth 1 -exec ffmpeg -i {} \
 -acodec ac3 -ab 128k -ac 2 -r 60 -vcodec mpeg4 \
 -f mp4 -y -sameq {}.mp4 \;

Revision history for this message
Olivier Girard (eolinwen) said :
#3

Thanks for the feedback.
Could you do (https://answers.launchpad.net/openshot/+faq/983)that with an original file (i.e not yet converted) ?

Revision history for this message
Tony Whitmore (tonywhitmore) said :
#4

Sure

1) Seems to play and seek forwards and backwards OK
2) melt coredumps (see http://paste.ubuntu.com/1036102/)
3) OK: http://paste.ubuntu.com/1036103/
4) I can't do this (yet) as the content is commercially privileged. It may be possible to do so after the video has been released.

Thanks!

Revision history for this message
Olivier Girard (eolinwen) said :
#5

I am afraid that you'll have like only solution to convert first your file and import them after in Openshot or in any Video Editor using MLT like framework as he can not read it.
It will be the occasion to test with our own library/framework when the 2.0 will come and replace MLT.

Revision history for this message
Tony Whitmore (tonywhitmore) said :
#6

Strange that openshot can even work with the file then. But OK, I'll wait for the new library.

Revision history for this message
brpaolo (brpaolo) said :
#7

I have the same problem. Original file: mp4. Ubuntu 12.04. Openshot 1.4.2.
Exported files are unusable because of the audio files being slightly out of sync.

Revision history for this message
brpaolo (brpaolo) said :
#8

Update: I split the video into two tracks (audio / video) and then start the audio about 0.2 seconds after the beginning of the video. This way the preview is now out-of-sync, but the exported film is more or less correct. (This is weird!)

Revision history for this message
Olivier Girard (eolinwen) said :
#9

Have you try to update your version of MLT (explanations above)

This is one reason about the creation of our framework which is in the last straight line.

Revision history for this message
brpaolo (brpaolo) said :
#10

Not yet. I have just tried to, but two packages are "kept back" (?) :

sudo apt-get upgrade libmlt4, libmlt-data libmlt++3 python-mlt3 melt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  libmlt++3 melt
The following packages will be upgraded:
  frei0r-plugins libmlt-data libmlt4
3 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 4,259 kB of archives.
After this operation, 33.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Abort.

Revision history for this message
brpaolo (brpaolo) said :
#11

And it gets worse: When computer restarted next morning a "partial upgrade" runs which deinstalls Openshot. When I try to re-intall it, I get all this:

~$ sudo apt-get install openshot openshot-doc
[sudo] password for paolo:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openshot-doc is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 openshot : Depends: python-mlt3 but it is not going to be installed or
                     python-mlt2 but it is not installable or
                     python-mlt but it is not installable
E: Unable to correct problems, you have held broken packages.

Revision history for this message
Tony Whitmore (tonywhitmore) said :
#12

Yes, there are dependency problems with the MLT packages in the Sunab PPA, the Openshot PPA and the packages in 12.04. At the moment there's no way to use them at the same time (without re-packaging, recompiling etc.)

Revision history for this message
brpaolo (brpaolo) said :
#13

Weel, that's beyond me. I shall go back to adding about 0.22 secs delay to my audio track :)

Revision history for this message
Andy (pian1966) said :
#14

Thanks for the tip brpaolo - I'm still experiencing the same problem in May 2013 and am using the 0.22 sec to keep the audio in sync!

Can you help with this problem?

Provide an answer of your own, or ask David Lynch for more information if necessary.

To post a message you must log in.