From owner-freebsd-multimedia@FreeBSD.ORG Thu Nov 20 22:59:20 2003 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E26016A4CE for ; Thu, 20 Nov 2003 22:59:20 -0800 (PST) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id A09E643FE1 for ; Thu, 20 Nov 2003 22:59:18 -0800 (PST) (envelope-from mjoyner@hq.dyns.cx) Received: from duron.rv1.dynip.com (c-66-177-119-177.se.client2.attbi.com[66.177.119.177]) by comcast.net (sccrmhc11) with ESMTP id <2003112106591701100k821ke>; Fri, 21 Nov 2003 06:59:17 +0000 Received: from hq.dyns.cx (localhost [127.0.0.1]) by duron.rv1.dynip.com (8.12.10/8.12.10) with ESMTP id hAL6xKox008112; Fri, 21 Nov 2003 01:59:21 -0500 (EST) (envelope-from mjoyner@hq.dyns.cx) Message-ID: <3FBDB7C8.2000201@hq.dyns.cx> Date: Fri, 21 Nov 2003 01:59:20 -0500 From: Michael Joyner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Randy Pratt References: <20031121013022.0d274b6d.rpratt1950@earthlink.net> In-Reply-To: <20031121013022.0d274b6d.rpratt1950@earthlink.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org Subject: Re: vcdimager and "bad packet" X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2003 06:59:20 -0000 You can "transcode" the avi files to divx avi file using mencoder before feeding to transcode (including size translations, etc), this will most likey make transcode much happier! also the following script that I use for recoding avis may be useful. :) (doesn't use transcode) you will of course have to fix it up for your situation, file system also, note that it is definately a work in progress. :) btw, all the spanish segments were taken from a web site somewhere, unfortunately, don't know where, so can't give proper copyright stuff I think it was GPL though. #!/bin/sh AUDIORATE=224 WIDTH_OUT=480 HEIGHT_OUT=480 CHAPTERS="0:00,10:00,20:00,30:00,40:00,50:00,1:00:00,1:10:00,1:20:00,1:30:00,1:40:00,1:50:00,2:00:00,2:10:00,2:20:00,2:30:00,2:40:00,2:50:00,3:00:00,3:10:00,3:20:00,3:30:00,3 :40:00,3:50:00,4:00:00" #CHAPTERS="0" BASE_CD=700 cd ~/dvdrip for i in avis/*; do if [ ! -s "$i" ]; then rm -vf "$i"; fi done TITLE_COUNT=0 for i in avis/*; do TITLE_COUNT=$(($TITLE_COUNT+1)); done xmessage -timeout 30 -center "Found $TITLE_COUNT Titles for miniDVD" & CDSIZE=$(($BASE_CD/$TITLE_COUNT)) # CHOICE="`xmessage -print -center -buttons "1/10 CD,1/5 CD,1/4CD,1/3 CD,1/2 CD,ONE CD" \ # "How Many CD's for these Movies?"`" # echo $CHOICE # if [ "$CHOICE" = "1/10 CD" ]; then CDSIZE=$(($BASE_CD/10)); fi # if [ "$CHOICE" = "1/5 CD" ]; then CDSIZE=$(($BASE_CD/5)); fi # if [ "$CHOICE" = "1/4 CD" ]; then CDSIZE=$(($BASE_CD/4)); fi # if [ "$CHOICE" = "1/3 CD" ]; then CDSIZE=$(($BASE_CD/3)); fi # if [ "$CHOICE" = "1/2 CD" ]; then CDSIZE=$(($BASE_CD/2)); fi # if [ "$CHOICE" = "ONE CD" ]; then CDSIZE=$(($BASE_CD)); fi rm -rfv vcd3/* for i in avis/*; do #imported script stuff (that is in Espanol) tcprobe -i "$i" > vcd3/info WIDTH=`grep '\[avilib\] V:' vcd3/info | \ perl -e ' $line= ; $line =~ /width=(\d+)/ ; print $1' ` HEIGHT=`grep '\[avilib\] V:' vcd3/info | \ perl -e ' $line= ; $line =~ /height=(\d+)/ ; print $1' ` FPS=`grep '\[avilib\] V:' vcd3/info | \ perl -e ' $line= ; $line =~ /V: (.+?) fps/ ; print $1' ` FPS_1=`echo "scale=1 ; $FPS/1"| bc -l` FRAMES=`grep '\[avilib\] V:' vcd3/info | \ perl -e ' $line= ; $line =~ /frames=(\d+)/ ; print $1' ` SEGUNDOS_TOTAL=`echo "scale=0 ; ($FRAMES / $FPS)"| bc -l` HORAS=`echo "scale=0 ; ($SEGUNDOS_TOTAL / 3600)"| bc -l` MINUTOS=`echo "scale=0 ; (($SEGUNDOS_TOTAL - 3600 * $HORAS)/60)"| bc -l` SEGUNDOS=`echo "scale=0 ; ($SEGUNDOS_TOTAL % 60)"| bc -l` VIDEO_RATE=`echo "scale=0 ;(($CDSIZE * 1024 - \ ($AUDIORATE/8*$SEGUNDOS_TOTAL))*8 / $SEGUNDOS_TOTAL)"| bc -l` if [ $VIDEO_RATE -ge 8000 ]; then VIDEO_RATE=8000; fi #VIDEO_RATE=1150 rm vcd3/info echo "*************** FILE INFO ***************" echo "Frame Size: ${WIDTH}x${HEIGHT} - FPS: $FPS" echo "Length: $FRAMES - Seconds: $SEGUNDOS_TOTAL" echo "$HORAS hours, $MINUTOS minutes, $SEGUNDOS seconds" rm vcd3/info echo "*************** FILE INFO ***************" echo "Frame Size: ${WIDTH}x${HEIGHT} - FPS: $FPS" echo "Length: $FRAMES - Seconds: $SEGUNDOS_TOTAL" echo "$HORAS hours, $MINUTOS minutes, $SEGUNDOS seconds" echo echo "VIDEO-RATE: $VIDEO_RATE" CBR="`echo "$VIDEO_RATE * 1000" | bc -l`" cat > auto.prof << END #VCD profile to try and fit space allocated fixed_vbv_delay = 1 vbv_buffer_size = 230 cbr = 1 cbr_bitrate = $CBR.0 quant_value = 2 qscale_type = 0 vbr_mux = 0 video_buf_size = 230 use_comp_bitrate = 1 max_bitrate = $CBR.0 END echo "Video Output: ${WIDTH_OUT}x${HEIGHT_OUT}" # Ahora calculamos los valores pa los bordes. ANCHO_1_1_OUT="`echo "($HEIGHT_OUT * 4/3)"| bc -l`" ALTO_OUT="`echo "$HEIGHT / ($WIDTH / $ANCHO_1_1_OUT)" | bc -l`" # Redondeamos ALTO_OUT="`echo "scale=0 ; $ALTO_OUT/1"| bc -l`" # Nos aseguramos de que sea par ALTO_OUT="`echo "scale=0 ; $ALTO_OUT+$ALTO_OUT%2" | bc -l`" BORDE="`echo "scale=0 ; ($HEIGHT_OUT-$ALTO_OUT)/2"| bc -l`" echo "alto sin bordes: $ALTO_OUT, con borde: $BORDE" echo INASPECT="$WIDTH_OUT:$ALTO_OUT" B=`basename "$i"` C="$B ($HORAS:$MINUTOS:$SEGUNDOS minutes playtime) $CHOICE $VIDEO_RATE" BB=vcd3/$$.temp.avi echo "^[]0;$C - Stage 1 (Resizing)^G" mencoder -aspect "$INASPECT" -noskiplimit -ovc lavc \ -lavcopts vcodec=mpeg2video:vhq:vrc_minrate=${VIDEO_RATE}:vbitrate=${VIDEO_RATE}:vrc_maxrate=${VIDEO_RATE}:aspect=4/3 \ -oac copy \ -ofps 23.976 \ -vop expand=$WIDTH_OUT:$HEIGHT_OUT,scale -zoom -xy $WIDTH_OUT \ -o "$BB" "$i" # -oac pcm -srate 44100 \ echo "^[]0;$C - Stage 2 (Converting into streams)^G" ffmpeg -i "$BB" \ -b "${VIDEO_RATE}" \ -r 23.976 \ -aspect "4:3" \ -vcodec copy \ -acodec mp2 \ -ab ${AUDIORATE} \ -ar 44100 \ -ac 2 \ -f vcd \ "vcd3/${B}.mpg" #echo "^[]0;$C - Stage 3 (Multiplexing into VOB)^G" #mplex -f 8 -V -o "vcd3/${B}.vob" "vcd3/${B}.m1v" "vcd3/${B}.mp2" # echo "^[]0;$C - Stage 4 (Adding Movie Title to DVD)^G" #dvdauthor\ #-o vcd3/mydvd \ #-a "en" \ #-v "ntsc+4:3+${WIDTH_OUT}x${HEIGHT_OUT}" \ #-t \ #"vcd3/${B}.vob" rm "$BB" rm "vcd3/${B}.m1v" rm "vcd3/${B}.m2v" rm "vcd3/${B}.mp2" rm "vcd3/${B}.mp3" rm "vcd3/${B}.vob" #cdrdao blank --device 0,0,0 --force --driver generic-mmc-raw #cd vcd3 || exit 0 #vcdxgen -t svcd --nopbc *vcd #vcdxbuild -p --gui *xml #cdrdao write --device 0,0,0 --force --driver generic-mmc-raw *.cue #cd .. echo "^[]0;Done Converting $C^G" echo exit 0 Randy Pratt wrote: >I've been transcoding some avi files to mpeg2 format to make SVCDs so >that I can watch them on the tv. > >I've not had any problems with the transcoding, but when i use >vcdimager to create the bin/cue files I'll get a warning like: > > ++ WARN: bad packet at packet #314266 (stream byte offset > 730354184) -- remaining 796144300 bytes of stream will be ignored > >I did not create the original avi file but I'm guessing that this >problem was created when two avi files were joined together to make >one file. > >I'd appreciate any pointers on how to repair the breakage or any >method that could be used as a work-around. I've looked thru >man transcode and tons of google but so far found nothing to >address this. > >Any ideas appreciated! > >Thanks, > >Randy > > >_______________________________________________ >freebsd-multimedia@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia >To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@freebsd.org" > >