comparison TOOLS/aconvert @ 16267:c2e581684e17

Aconvert allows mencoder to (easily) encode from an audio only file (hack).
author jonas
date Thu, 18 Aug 2005 20:00:57 +0000
parents
children 433494f162a9
comparison
equal deleted inserted replaced
16266:c820ccd4f5eb 16267:c2e581684e17
1 #!/bin/sh
2
3 # Author: Jonas Jermann
4 # Description: A hack to allow mencoder to encode from an audio only file
5
6 if [[ $1 == "" ]]; then
7 echo "Usage: $0 <\"input file\"> <\"output file\"> <\"options\">"
8 exit 0
9 fi
10
11 if [[ $3 == "" ]]; then
12 options="-oac lavc -lavcopts acodec=mp3:abitrate=192"
13 else
14 options=$3
15 fi
16
17 mencoder -rawvideo on: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