› Foros › PC › Software libre
ffmpeg -i "fichero.mkv" -map 0:0 -map 0:1 -vcodec copy -acodec libfaac -ac 2 "fichero.mp4"
#! /bin/bash
if [ ! -f /usr/bin/ffmpeg ]; then
echo "Asegúrese de que 'ffmpeg' está instalado en el sistema"
exit
fi
dir=`dirname "$1"`
base=`basename "$1"`
in="$dir/$base"
if [ ! -f "$in" ]; then
echo "ERROR: No existe el archivo '$base'"
exit
fi
if [ $(echo "$in" | grep '.mkv$' | wc -l) -ne 1 ]; then
echo "ERROR: El archivo no es un Matroska '$base'"
exit
fi
name=`echo $base | sed s/.mkv$//g`
out="$dir/$name.mp4"
ffmpeg -i "$in" -map 0:0 -map 0:1 -vcodec copy -acodec libfaac -ac 2 "$out"
exit
#!/bin/bash
# vx360
# install handbrake
# sudo add-apt-repository ppa:stebbins/handbrake-releases
# sudo apt-get update
# sudo apt-get install handbrake-cli handbrake-gtk
if [ -f ~/.config/user-dirs.dirs ]; then
. ~/.config/user-dirs.dirs
fi
opcion=`/usr/bin/zenity --title="vx360" --width=400 --height=300 \
--text="Configuración de vídeo" \
--list --column="Seleccionar" --column="Formato" \
--radiolist FALSE "1080p" FALSE "720p" `
INPUT=`zenity --file-selection --title="Select the file to Convert" --save --filename="$XDG_DESKTOP_DIR/"`
if [ "$INPUT" = "" ]; then
exit 0
fi
FILENAME=`basename "$INPUT" | tr ' ' '_'`
mv "$INPUT" `echo "$INPUT" | tr ' ' '_'`
FILE2=`echo $INPUT | tr ' ' '_'`
OUTPUT=`echo $FILENAME | awk '{print tolower ($0)}' | sed 's/ //g;s/_-_/-/g;s/#//g;s/.mpg//g;s/.MPG//g;s/.mpeg//g;s/.MPEG//g;s/.mp4//g;s/.MP4//g;s/.avi//g;s/.AVI//g;s/.mov//g;s/.MOV//g;s/.mkv//g;s/.MKV//g'`
if [ $? -eq 0 ]
then
IFS="|"
for opcion in $opcion
do
if [ "$opcion" = "1080p" ];
then
gnome-terminal -t "vx360 - 1080p" --hide-menubar --geometry=80x24+200+200 -e "HandBrakeCLI -e x264 -b 4000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 1920 -m -x rc-lookahead=50:ref=2:subme=9:trellis=0:analyse=all:direct=auto:b-adapt=0:me=umh:8x8dct=0:deblock=-2,-1:no-fast-pskip=1 -i "$FILE2" -o "$XDG_DESKTOP_DIR/$OUTPUT-1080p-x360.m4v" --two-pass --turbo"
elif [ "$opcion" = "720p" ]
then
gnome-terminal -t "vx360 - 720p" --hide-menubar --geometry=80x24+200+200 -e "HandBrakeCLI -e x264 -b 2000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 1280 -m -x rc-lookahead=50:ref=2:subme=9:trellis=0:analyse=all:direct=auto:b-adapt=0:me=umh:8x8dct=0:deblock=-2,-1:no-fast-pskip=1 -i "$FILE2" -o "$XDG_DESKTOP_DIR/$OUTPUT-720p-x360.m4v" --two-pass --turbo"
fi
done
IFS=""
notify-send --icon=vx360 "Encoding Completed" "$OUTPUT-720p-x360.m4v"
canberra-gtk-play --file="/usr/share/vx360/magnet.ogg" &
fi