view TOOLS/aconvert @ 21932:c11cbff65f18

r21727: Must refer to option name instead of internal variable r21758: Subtitle formats are listed in subreader.h, not libmpdemux/demuxer.h. r21848: clarify a few things about the interaction between *cmp and mbd options r21865: Audio track switching works with DVDs as well. r21882: sync to x264 r607 (update description of threads)
author kraymer
date Wed, 17 Jan 2007 14:04:30 +0000
parents 86d341ecb3bc
children 37feaaf7b7b4
line wrap: on
line source

#!/bin/sh

# Author: Jonas Jermann
# Description: A hack to allow mencoder to encode from an audio only file

if [[ $1 == "" ]]; then
    echo "Usage: $0 <\"input file\"> <\"output file\"> <\"options\">"
    exit 0
fi

options=${3:-"-oac mp3lame"}
 
mencoder -demuxer rawvideo -rawvideo w=1:h=1 -ovc copy -of rawaudio -endpos `mplayer -identify $1 -frames 0 2>&1 | grep ID_LENGTH | cut -d "=" -f 2` -audiofile $1 -o $2 $options $1