I have a PVR-250 and when I load up an MPEG-2 file that it generated in Avdimux, the audio/video is out of sync (before I make any edits). My goal is simply to cut out commercials in the file, nothing else. When I play it in any other viewer (vlc, mplayer, etc.) the sync is perfect. I found that this is known issue with Avidemux. See below.
Can you guys recommend another piece of software I can use (LINUX-native) to simply cut parts out of mpeg-2 files?
Taken from mythtv wiki page. I quoted the relevant text from it here:
Cory Papenfuss noted:
I would just like to add again that this procedure only works 95% of the time for broadcast/cable captures... about 80% of the time for tape transfers. Avidemux cannot deal with chaining A/V sync throughout the file, and this method will have broken sync with one of these unfortunate captures. The author of avidemux acknowledges this limitation, but says a fair bit of internal work would be needed to fix it.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
http://encoding.n3.net <-- for all your DVD and CD backup needs!
-
Originally Posted by graysky
GOP chop works well. Slow as it indexs the entire GOP first. Dvbcut is another programs the works as well.
GOP Chop edits my HVR 1600 captures (SD and ATSC) that Avidemux has utterly choked on (ATSC).Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly. -
#!/bin/sh
## ts2avi by robert_maul@hotmail.com (freeware)
## translate *.ts to avi (XviD)
## depends on projectx and winff (found in ubuntu linux synaptic reps)
## any windows powershell experts please translate this and email to me
## so i don't have to move my ts files to my linux box to convert
## i have already verified that this flow works on windows too
## step 1 (automated)
## use ProjectX to throw out any bad data and sync video and audi0
## with ProjectX (free download at sourcforge.net)
## for each ts file create a directory and move the file there.
## then demux the file creating the m2v (video) and ac3 (sound)
## The ProjectX command line method was found in the ProjectX
## source ReadMe.txt file
## step 2 (automated)
## create avi file using ffmpeg (download winff and ffmpeg included)
## translate the m2v (video only) file to an avi (XviD) file
## the ffmpeg options used here were found by running winff and
## choosing: "Display CMD Line" under the options menu
## step 3 (manual) (do these next steps after this script completes)
## when ffmpeg completes you should inspect the files created in the
## respective directories and throw out avi that are too small.
## if the avi file is too small, chances are the ts file is no good.
## you may now use avidemux to recombine the video (avi) file with the
## audio (ac3). add the ac3 file using the Audio menu in avidemux
## and save the avi fle to bind the ac3 sound track to the avi file
## if anyone knows how to automate this please let me know.
## step 4 (manual)
## next do any edits you want with avidemux and save that file.
## step 5 (automated)
## finally run winff in two pass mode to get the smallest avi
arg=$1
if [ $arg = "-wide" ]; then
echo running with widescreen 16:9 aspect ratio
else
if [ $arg = "-full" ]; then
echo running with fullcreen 4:3 aspect ratio
else
echo you must specify an arg "-full" or "-wide"
fi
fi
list=`ls *.ts`
## do step 1 and 2 for all files in list
for fn in $list ; do
dir=`basename $fn .ts`
if [ ! -d $dir ]; then
mkdir $dir
fi
mv $fn $dir
cd $dir
dirpath=`pwd`
avi="$dirpath/$dir.avi"
m2v="$dirpath/$dir.m2v"
if [ ! -f $m2v ]; then
java -Djava.awt.headless=true -jar /usr/share/java/ProjectX.jar -demux $fn
fi
if [ -f "$m2v" ]; then
if [ $arg = "-wide" ]; then
/usr/bin/ffmpeg -i "$m2v" -f avi -r 29.97 -vcodec libxvid -vtag XVID -s 704x384 \
-aspect 16:9 -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 \
-mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 \
-acodec libmp3lame -ar 48000 -ab 128k -ac 2 "$avi"
else
if [ $arg = "-full" ]; then
/usr/bin/ffmpeg -i "$m2v" -f avi -r 29.97 -vcodec libxvid -vtag XVID -s 640x480 \
-aspect 4:3 -maxrate 1800kb -b 1500kb -qmin 3 -qmax 5 -bufsize 4096 \
-mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 \
-acodec libmp3lame -ar 48000 -ab 128kb -ac 2 "$avi"
fi
fi
fi
cd ..
done -
robertmaul, Do not post the same topic on several forums.
Please do not cross post, once is enough.
The duplicate post has been deleted.
Moderator redwudz -
update to ts2avi script in:
https://forum.videohelp.com/threads/340525-ts2avi-script-convert-Hauppauge-WinTV-ts-files
(recombining the video and audio with avidemux_cli has been automated with command line)
Similar Threads
-
MPEG Streamclip won't open mp4, solutions or alt programs?
By SkyWolfAlpha in forum MacReplies: 18Last Post: 13th Oct 2023, 03:46 -
avidemux audio out-of-sync problem
By scarlac in forum Video ConversionReplies: 3Last Post: 20th Sep 2010, 12:37 -
Will the QT MPEG-2 Playback addon help my no MPEG audio on vegas problem?
By Nuke Shower in forum Video ConversionReplies: 5Last Post: 9th Apr 2008, 17:01 -
mpeg streamclip quicktime alt problem
By m_shel in forum EditingReplies: 2Last Post: 12th Feb 2008, 00:14 -
MPEG to Divx audio sync problem
By starless in forum ffmpegX general discussionReplies: 8Last Post: 11th Oct 2007, 05:38