Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- vcodec="mp4v"
- acodec="mp4a"
- bitrate="1024"
- arate="128"
- mux="mp4"
- vlc="/usr/bin/vlc"
- if [ ! -e "$vlc" ]; then
- echo "Command '$vlc' does not exist"
- exit 1
- fi
- for file in "$@"; do
- echo "=> Transcoding '$file'... "
- dst=`dirname "$file"`
- new=`basename "$file" | sed 's@.[a-z][a-z][a-z]$@@'`.$mux
- $vlc -I dummy -q "$file"
- --sout "#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128}:standard{mux=mp4,dst="$dst/$new",access=file}"
- vlc://quit
- ls -lh "$file" "$dst/$new"
- echo
- done
- $ ./ffmpeg -i testing.m4v -b:a 192K -vn testing.mp3
- $ ./ffmpeg -i testing.m4v -q:a 0 -map a testing.mp3
- $ ./ffmpeg -version
- ffmpeg version N-56896-ga927276
- built on Oct 5 2013 05:42:36 with gcc 4.6 (Debian 4.6.3-1)
- configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
- libavutil 52. 46.100 / 52. 46.100
- libavcodec 55. 34.100 / 55. 34.100
- libavformat 55. 19.100 / 55. 19.100
- libavdevice 55. 3.100 / 55. 3.100
- libavfilter 3. 88.101 / 3. 88.101
- libswscale 2. 5.100 / 2. 5.100
- libswresample 0. 17.103 / 0. 17.103
- libpostproc 52. 3.100 / 52. 3.100
- #!/bin/sh
- arate="64K"
- ext="mp3"
- app="/usr/bin/ffmpeg"
- if [ ! -e "$app" ]; then
- echo "Command '$app' does not exist"
- exit 1
- fi
- for file in "$@"; do
- echo "=> Transcoding '$file' ..."
- dst=`dirname "$file"`
- new=`basename "$file" | sed 's@.[a-z][a-z][a-z]$@@'`.$ext
- $app -i "$file" -b:a $arate -vn "$dst/$new"
- ls -lh "$file" "$dst/$new"
- echo
- done
- #!/bin/sh
- arate="64K"
- ext="mp3"
- app="/usr/bin/ffmpeg"
- if [ ! -e "$app" ]; then
- echo "Command '$app' does not exist"
- exit 1
- fi
- for file in "$@"; do
- echo "=> Transcoding '$file' ..."
- dst=`dirname "$file"`
- new=`basename "$file" | sed 's@.[a-z][a-z0-9][a-z0-9]$@@'`.$ext
- $app -i "$file" -b:a $arate -vn "$dst/$new"
- ls -lh "$file" "$dst/$new"
- echo
- done
Add Comment
Please, Sign In to add comment