view TOOLS/aconvert.sh @ 35868:3edaed3c1d60

Win32: support file names with characters outside system code-page This is done by trying to interpret the file name as being UTF-8 encoded first. The command-line is fetched as UTF-16 and converted to UTF-8 to match with this.
author reimar
date Thu, 14 Mar 2013 20:04:24 +0000
parents 0f1b5b68af32
children
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