
To answer your original query about the file expansion I think you have just copied the video and expanded the audio to pcm (e..g WAV or CD format) which is many times (10x?) larger than say mp3. See the " -oac pcm -ovc copy" part of your command. I think -oac -> output audio codec is set to pcm and -ovc -> output video codec is copy (just copies it). Hence the Video is not shrunk and the audio is blown up massively... You have to be careful what codecs you put into the container as some players won't accept strange combinations. I don't know if you will end up with an .avi with a .mkv file suffix or not either... On the bright side perhaps this will help? Here are some old shell functions that use mencoder to do 1 pass and 2 pass (better quality with 2 passes). May be it's useful for you or others? I haven't really tested them lately so make a copy and try it out on that. It uses old (but widely supported now) DiVx codec and mp3 so I am sure there are much more powerful options available now, Note $1 => first argument in a shell function. Save them into a file like vid.sh and source it and use it as follows: . ./vid.sh 1passEncode <VideoRate> <AudioRate> <File> To do a 1 pass encode at given video rate/ audio rate on to a file (output is movie.avi) To do the slower but better quality encoding try the two pass.: 2passEncode 858 96 video.avi will generate an encoding a video bit rate of 858 . audio (mp3) at 96 on existing file video.avi and into newvideo.avi. be aware it uses temporary file move.avi to work on... There are also another that just does video and one that allows the size to be shrunk. ------------------- Cut below here and place into a file e.g. vid.sh ----------- # Perform the 1pass encoding based on the given video code rating function 1passEncode () { BitRate=$1 AUBR=$2 IFile=$3 L0=-lavcopts L1=mp3lame L2=-lameopts L3="vbr=3:br=$AUBR" MD="-ffourcc" Codec="vcodec=mpeg4:vhq:vbitrate=$BitRate" Pass1Args=${Codec} echo rm -f frameno.avi lavc_stats.txt divx2pass.log rm -f frameno.avi lavc_stats.txt divx2pass.log echo mencoder $MD DIVX -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 -o movie.avi $IFile mencoder $MD DIVX -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 -o movie.avi $IFile } # 1pass Video only encode (copy audio) function 1passVideoEncode () { IFile=$1 BitRate=${2:-2000} L0=-lavcopts MD="-ffourcc" Codec="vcodec=mpeg4:vhq:vbitrate=$BitRate" Pass1Args=${Codec} echo rm -f frameno.avi lavc_stats.txt divx2pass.log rm -f frameno.avi lavc_stats.txt divx2pass.log echo mencoder $MD DIVX -ovc lavc $L0 $Pass1Args -oac copy -o movie.avi $IFile mencoder $MD DIVX -ovc lavc $L0 $Pass1Args -oac copy -o movie.avi $IFile } # Perform the 2pass encoding based on the given video code rating function 2passEncode () { BitRate=$1 AUBR=$2 IFile=$3 CC=${4:-"XVID"} L0=-lavcopts L1=mp3lame L2=-lameopts L3="vbr=3:br=$AUBR" L4="-ffourcc" Codec="autoaspect:vcodec=mpeg4:vhq:vbitrate=$BitRate:vpass=" Pass1Args=${Codec}1 Pass2Args=${Codec}2 echo rm -f frameno.avi lavc_stats.txt divx2pass.log rm -f frameno.avi lavc_stats.txt divx2pass.log echo mencoder -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 -o movie.avi $IFile $L4 $CC $5 $6 mencoder -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 -o movie.avi $IFile $L4 $CC $5 $6 echo mencoder -ovc lavc $L0 $Pass2Args -oac $L1 $L2 $L3 -o movie.avi $IFile $L4 $CC $5 $6 mencoder -ovc lavc $L0 $Pass2Args -oac $L1 $L2 $L3 -o movie.avi $IFile $L4 $CC $5 $6 echo mv movie.avi new$IFile mv movie.avi new$IFile } # Perform the 2pass encoding Video only! function 2passEncodeVideo () { BitRate=$1 #AUBR=$2 IFile=$2 L0=-lavcopts L1=copy #L2=-lameopts #L3="vbr=3:br=$AUBR" Codec="autoaspect:vcodec=mpeg4:vhq:vbitrate=$BitRate:vpass=" Pass1Args=${Codec}1 Pass2Args=${Codec}2 echo rm -f frameno.avi lavc_stats.txt divx2pass.log rm -f frameno.avi lavc_stats.txt divx2pass.log echo mencoder -ovc lavc $L0 $Pass1Args -oac $L1 -o movie.avi $IFile $4 $5 $6 mencoder -ovc lavc $L0 $Pass1Args -oac $L1 -o movie.avi $IFile $4 $5 $6 echo mencoder -ovc lavc $L0 $Pass2Args -oac $L1 -o movie.avi $IFile $4 $5 $6 mencoder -ovc lavc $L0 $Pass2Args -oac $L1 -o movie.avi $IFile $4 $5 $6 echo mv movie.avi new$IFile mv movie.avi new$IFile } # Perform the 2pass encoding and rescale based on the given video code rating function 2passShrinkEncode () { Width=$1 Height=$2 BitRate=$3 AUBR=$4 IFile=$5 L0=-lavcopts L1=mp3lame L2=-lameopts L3="vbr=3:br=$AUBR" L4="-vop" L5="scale=$Width:$Height" # Added autoaspect Codec="autoaspect:vcodec=mpeg4:vhq:vbitrate=$BitRate:vpass=" Pass1Args=${Codec}1 Pass2Args=${Codec}2 echo rm -f frameno.avi lavc_stats.txt divx2pass.log rm -f frameno.avi lavc_stats.txt divx2pass.log echo mencoder -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 $L4 $L5 -o movie.avi $IFile mencoder -ovc lavc $L0 $Pass1Args -oac $L1 $L2 $L3 $L4 $L5 -o movie.avi $IFile echo mencoder -ovc lavc $L0 $Pass2Args -oac $L1 $L2 $L3 $L4 $L5 -o movie.avi $IFile mencoder -ovc lavc $L0 $Pass2Args -oac $L1 $L2 $L3 $L4 $L5 -o movie.avi $IFile } On 26 February 2014 16:14, Toby Corkindale <toby@dryft.net> wrote:
On 26 February 2014 13:05, Allan Duncan <amd2345@fastmail.com.au> wrote:
On 26/02/14 09:42, Carl Turney wrote:
Hi All,
Toby, thanks for that suggestion (below). However...
Would like to try aconv, but don't have it installed. Tried searching for it using Synaptic Package Manager, and found nothing. Have got lots of repositories added to my system, including all the ones recommended by MediBuntu.
That is possibly because avconv is but one binary in the libav suite. Look at libav.org, or do git clone git://git.libav.org/libav.git libav or get one of the tar'd releases and compile it.
On Ubuntu, avconv is packaged inside the libav-tools package. Although I don't know if you'll have that on a four-year-old distribution.. might be in backports somewhere? _______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main