VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. 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.
    http://encoding.n3.net <-- for all your DVD and CD backup needs!
    Quote Quote  
  2. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    I use AviDemux at least 80% of the time with mpeg2 files from my PVR-350....never had a sync issue...upon loading or after editing.
    I use Windows XP Pro.
    Quote Quote  
  3. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    Originally Posted by graysky
    Can you guys recommend another piece of software I can use (LINUX-native) to simply cut parts out of mpeg-2 files?
    Yes this is a known issue with older veriosns of Avidemux. If a bug is in the Linux version, it's in the Windows version as well. Considering they use the exact same code to decode and encode the files Make sure you are only cutting on I frames, and use the newest Avidemux there is.

    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.
    Quote Quote  
  4. Member
    Join Date
    Aug 2009
    Location
    South Africa
    Search Comp PM
    ....
    Last edited by ansiArt; 20th Mar 2011 at 13:30.
    Quote Quote  
  5. you really should try cinerella. I convert my videos with winff and import them in cinerella and export to mov. It is a full featured video editor.

    if you have problems getting this setup, it's very very easy.
    Quote Quote  
  6. Member
    Join Date
    Jan 2011
    Location
    az (timezone not listed)
    Search Comp PM
    #!/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
    Quote Quote  
  7. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    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
    Quote Quote  
  8. Member
    Join Date
    Aug 2009
    Location
    South Africa
    Search Comp PM
    .....
    Last edited by ansiArt; 20th Mar 2011 at 13:31.
    Quote Quote  
  9. Member
    Join Date
    Jan 2011
    Location
    az (timezone not listed)
    Search Comp PM
    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)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!