| PLEX86 | ||
|
Sound and images out of syn in AVI file Sender: Linux
I don't have an example handy, but mplayer-mencoder should be able to do it for you. Mencoder has a -audio-delay option -audio-delay', 0.2, #adjust for audio syncing problems There are many tutorials on google for "mplayer mencoder" or maybe "mencoder audio sync" What you need to do, if first use mplayer to rip the video to audio and jpgs (or maybe a video dump) see docs. This dump would be more efficient than ripping to jpgs. This is a start, but all UNTESTED. Instead of a jpg file dump, you may be able to dump the video and audio to mplayer-dump-files, then recombine them. #rip it #!-bin-sh mplayer -vo jpeg:quality=100 -noframedrop -ao pcm:file=`basename $1 .avi`.wav $1 that will rip an input wav to a series of jpg's and a wav file Then recombine them with mencoder and adjust your audio delay. #recombine mencoder "mf:--*.jpg" -mf fps=29.97 -audiofile myfile.wav -srate 22050 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=100 -oac mp3lame -audio-delay , 0.2, #adjust for audio syncing problems How to enable Laurenz Albe Thank you once again. You've been most helpful, and I hate to just ask one question after another (I actually prefer to find things out on my own as much... If you can handle Perl, here is a script that will do audio-resyncing. I originally wrote it to process flv files from YouTube, but it should work on wavs. You may need to modify it slightly. You can adjust the delay down at the bottom, and avoid re-ripping by running the script with just the r option #!-usr-bin-perl use warnings; use strict; use File::Path qw(rmtree); # Usage: $0 colors.avi OR $0 r # The r option will skip ripping and recombine # the contents of the riptemp-$base subdir. # This allows you to manually edit individual files. # If more than 2 riptemp dirs are present, the first # in a dirlist will be used. So.... work on 1 at a time # in their own directories. This is just a snippet. :-) # I admit, that the Lives (Linux Video Editing System) # is much more powerful than this. Check it out, and # it's "smogrify" perl script.... which is it's workhorse. $++; my $video = shift 'colors.flv'; can't add user to group FC5: user private groups Hi, I'm trying to figure out how a user rj2nagle can write-edit files inside directories... my $base; if($video eq 'r'){ recombine(); }else{ $video =~^(.+)(-.-w+)$-; $base = $1; } #rip to jpg's and audio #will make it's own temp dir '-osdlevel', 0, '-vo', "jpeg:quality=100:outdir=riptemp-$base:maxfiles=2000", '-noframedrop', #important for quality '-ao', "pcm:file=$base.wav", $video, ); ##################### # recombine recombine(); #ask to keep clips or not print "-n-nDone! Delete temp clips? (n-y) Defaults to n-n"; if($return =~^yY.*$-){ rmtree("riptemp-$base", 0, 1); # verbose report, and ignore undeleteables }else{exit} ##################################################################### sub recombine{ How to enable How does one enable thread-local storage? I'm in the process of adding an updated glibc to my system (with prefix usr-local-glibc2.4-, so not to break anything using the old... opendir my $dh, '.' or die "Error: $!-n"; closedir $dh; my $dir = $files0; $dir =~^riptemp-(.*)$-; my $base = $1; #print "$dir-t$base-n"; "mf:--$dir-*.jpg", '-mf', 'fps=29.97', #NTSC tv video rate in '-audiofile', "$base.wav", '-srate', 22050, '-o', "$base-char.avi", '-ovc', 'lavc', '-lavcopts', 'vcodec=mpeg4:vbitrate=100', '-oac', 'mp3lame', '-audio-delay', 2, #adjust for audio syncing problems ); } ######################################################################3 END can't add user to group FC5: user private groups This is an interesting point you raise. In many tech circles it's considered rude and newbiesh to quote things in full. I've actually participated in mailing... -- I'm not really a human, but I play one on earth.
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||