Guest User

Untitled

a guest
Jul 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. vcodec="mp4v"
  4. acodec="mp4a"
  5. bitrate="1024"
  6. arate="128"
  7. mux="mp4"
  8.  
  9. vlc="/usr/bin/vlc"
  10.  
  11. if [ ! -e "$vlc" ]; then
  12. echo "Command '$vlc' does not exist"
  13. exit 1
  14. fi
  15.  
  16. for file in "$@"; do
  17. echo "=> Transcoding '$file'... "
  18.  
  19. dst=`dirname "$file"`
  20. new=`basename "$file" | sed 's@.[a-z][a-z][a-z]$@@'`.$mux
  21.  
  22. $vlc -I dummy -q "$file"
  23. --sout "#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128}:standard{mux=mp4,dst="$dst/$new",access=file}"
  24. vlc://quit
  25. ls -lh "$file" "$dst/$new"
  26. echo
  27. done
  28.  
  29. $ ./ffmpeg -i testing.m4v -b:a 192K -vn testing.mp3
  30.  
  31. $ ./ffmpeg -i testing.m4v -q:a 0 -map a testing.mp3
  32.  
  33. $ ./ffmpeg -version
  34. ffmpeg version N-56896-ga927276
  35. built on Oct 5 2013 05:42:36 with gcc 4.6 (Debian 4.6.3-1)
  36. 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
  37. libavutil 52. 46.100 / 52. 46.100
  38. libavcodec 55. 34.100 / 55. 34.100
  39. libavformat 55. 19.100 / 55. 19.100
  40. libavdevice 55. 3.100 / 55. 3.100
  41. libavfilter 3. 88.101 / 3. 88.101
  42. libswscale 2. 5.100 / 2. 5.100
  43. libswresample 0. 17.103 / 0. 17.103
  44. libpostproc 52. 3.100 / 52. 3.100
  45.  
  46. #!/bin/sh
  47. arate="64K"
  48. ext="mp3"
  49. app="/usr/bin/ffmpeg"
  50. if [ ! -e "$app" ]; then
  51. echo "Command '$app' does not exist"
  52. exit 1
  53. fi
  54.  
  55. for file in "$@"; do
  56. echo "=> Transcoding '$file' ..."
  57. dst=`dirname "$file"`
  58. new=`basename "$file" | sed 's@.[a-z][a-z][a-z]$@@'`.$ext
  59. $app -i "$file" -b:a $arate -vn "$dst/$new"
  60. ls -lh "$file" "$dst/$new"
  61. echo
  62. done
  63.  
  64. #!/bin/sh
  65. arate="64K"
  66. ext="mp3"
  67. app="/usr/bin/ffmpeg"
  68. if [ ! -e "$app" ]; then
  69. echo "Command '$app' does not exist"
  70. exit 1
  71. fi
  72.  
  73. for file in "$@"; do
  74. echo "=> Transcoding '$file' ..."
  75. dst=`dirname "$file"`
  76. new=`basename "$file" | sed 's@.[a-z][a-z0-9][a-z0-9]$@@'`.$ext
  77. $app -i "$file" -b:a $arate -vn "$dst/$new"
  78. ls -lh "$file" "$dst/$new"
  79. echo
  80. done
Add Comment
Please, Sign In to add comment