LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-18-2007, 03:34 AM   #1
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 699
Blog Entries: 1

Rep: Reputation: 32
Post got an avi-how to correct audio-video misalignment


Hello,
I got an avi file,which has audio leading by some milliseconds(dont know how 2 ).I understand that it can be synced again using avisync command.but how do i know how many seconds audio or video is lagging/leading then only u can correct the align?also avifix-will this helpme...
if you know e auto syncing of audio/video pls help me.
 
Old 02-18-2007, 04:02 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Usually, one keeps adjusting the sync until it looks right. Some programs let you adjust this via a gui tool (I recall mplayer having a sync tool for this...)
 
Old 02-18-2007, 04:11 AM   #3
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 699
Blog Entries: 1

Original Poster
Rep: Reputation: 32
please explain.which tools does this best-can we have a preview option while editing sync of the file.
 
Old 02-18-2007, 05:03 PM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
please explain.which tools does this best-can we have a preview option while editing sync of the file.
hmmm... well I last did this in mplayer ... but for playback rather than actual editing. Don't see why mencoder cannot do the adjustment, but I haven't tried.

Your best bet is to use a full movie-authoring suite if you are unsure. It'll be overkill but clear.

I see English is your second language.

Just a note on writing English:
A hyphon "-" has a space on either side of it if you use it as a separator. Otherwise it has the effect of joining the words on either side of it. So a native English speaker would read "best-can" as a joined up word before realizing that it makes no sense and should be "best - can".

A period "." or "full stop" has at least one space after it to indicate the gap before the next sentence. The first letter of the following sentence needs to be capitalized. So "explain.which" should be "explain. Which". Similarily, your sig should read "GOD is JESUS. Wake-up Europe." Or maybe: "God is Jesus: wake-up Europe." Otherwise you are claiming that god is "jesus.wakeup" - so I can, perhaps, meet god by browsing to www.jesus.wakeup? The dot used like that can also be a logical "and" operation or a vector product, making the statement quite interesting. Both have been used as a shorthand in philosophical debate.

(Quite aside from the fact that this is not a contention made by either God or Jesus anywhere in the Bible. But that is off topic.)
 
Old 02-22-2007, 08:58 AM   #5
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 699
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Smile

thank you for ur suggestions.i left my siggie hidden as it will flame another controversy running!
 
Old 02-24-2007, 03:38 PM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You can also adjust the sync in xine, which would lead me to believe you could also do it in VLC. Which brings me to my suggestion:

In VLC (assuming you can adjust the sync) you can set an output file from your video stream. Once you get the sync fixed, you could then stream to a file the new video.

Good luck!

Cool
 
Old 02-24-2007, 04:36 PM   #7
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 699
Blog Entries: 1

Original Poster
Rep: Reputation: 32
thx;will try
 
Old 02-24-2007, 04:44 PM   #8
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Xine (xine-lib to be more precise) will do its best to keep the audio and video sync using its own tricks for AVI files which do not have any timestamping unlike MOV (Quicktime) and MPEG that has timestamping. VLC is glitchy when playing video and audio.

The best non-linear video editor is Cinelerra CVS.

Every professional video editor or director has this problem. The best way and the only way is trial and error. The slate is used to sync the video frame with the auido. If you can not find any object that makes a sound upon impact, syncing the audio will be very hard.

Use avisync in a script, so you can do several tries at once. The following lines could be used in the script.

avisync -q -i input.avi -o output-try01.avi -n 1 &
avisync -q -i input.avi -o output-try02.avi -n 2 &
avisync -q -i input.avi -o output-try03.avi -n 3 &
avisync -q -i input.avi -o output-try04.avi -n 4 &
avisync -q -i input.avi -o output-try05.avi -n 5 &
avisync -q -i input.avi -o output-try06.avi -n 6 &
avisync -q -i input.avi -o output-try07.avi -n 7 &
avisync -q -i input.avi -o output-try08.avi -n 8 &
avisync -q -i input.avi -o output-try09.avi -n 9 &
avisync -q -i input.avi -o output-try10.avi -n 10 &

The above are only examples so adjust them.
 
  


Reply

Tags
avi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mpg and some avi have audio distorted ArchArael Linux - Software 3 01-04-2007 05:36 PM
DVD, DiVX, AVI, VCD on SUSE 10.1-video jumpy, audio OK riba43 Suse/Novell 6 06-16-2006 06:09 PM
AVI File - Audio not Synced Snump Linux - Software 1 03-23-2006 09:35 AM
ispell misalignment pfaendtner Linux - Software 0 10-27-2004 01:30 PM
AVI Audio to MP3 File Obi Perrin Linux - Software 2 03-10-2003 10:27 AM


All times are GMT -5. The time now is 09:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration