need help with converting HiDef (sony) .mts video using mencoder - audio losing time
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: In the Bay of Plenty, North Island, New Zealand
Distribution: Mepis8, AntiX, Sidux
Posts: 26
Rep:
need help with converting HiDef (sony) .mts video using mencoder - audio losing time
I have been trying to decode Sony Hi Definition AVCHD Video as taken by their hard disk camcorder.
Mencoder is doing a very good job at converting the video but the audio is lagging behind ~1 second for every 10 seconds of video, so each minute, the audio goes ~6 seconds out of sync and its accumulative, so a 7 minute long video segment is out by around 40-45 seconds as the video nears the end.
The code below is what I am using to convert the 1920x1080 AVCHD .mts files to 1280x720 avi using a 2 pass encode.
Indeed, I agree with wesleybailey, however I recommend you use '-async 48000' (or use the frequency of the audio), because if you use '-async 1' it does:
Code:
-async samples_per_second
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.
That usually works ok too, but not if the distortion still happens while encoding.
Location: In the Bay of Plenty, North Island, New Zealand
Distribution: Mepis8, AntiX, Sidux
Posts: 26
Original Poster
Rep:
Fixed a long time back, now using Winff, much easier
Thanks guys.
This thread is very old, with me having started it on the 2nd January 2009. I had already found what I needed and no longer have access to the Sony handycam that produced the video. Nevertheless, I found the fix on my own within a few days of my original post on the MepisLovers forums. The people there are awesome and thee is not a lot there that gets missed.
The handycam was configured for PAL, which is not surprising, since everything here is PAL, not NTSC, so it comes as no surprise that my issue stemmed from my following the only prescriptions I could find, which were for NTSC based systems, so all I had to change was the FPS. The 60 fps was sampling too fast, I simply changed the fps to 50 had it all corrected and properly synced in no time at all.
I now use a much simpler method than playing around at the CLI level. I use
Winff 1.0.4 as the front end and a combination of ffmpeg 5:0.5+svn20090521 and mencoder 2:10.rc3svn20091002 as the backends.http://winff.org/html_new/
@wesleybailey, you might be interested in adding winff to your website
there are many software which can help you to convert .mts video file to other video formats directly.
what i use is Aunsoft MTS converter which helps you to convert mts file to almost any other video format with the least loss of video quality.
and its conversion is quite fast.
you can google it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.