1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-14 19:05:33 +00:00
mpv/TOOLS/aconvert
jonas 872024d3fe Aconvert allows mencoder to (easily) encode from an audio only file (hack).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16268 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-08-18 20:00:57 +00:00

18 lines
492 B
Bash
Executable File

#!/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
if [[ $3 == "" ]]; then
options="-oac lavc -lavcopts acodec=mp3:abitrate=192"
else
options=$3
fi
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