Skip to content

Instantly share code, notes, and snippets.

@mine260309
Last active August 2, 2018 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mine260309/d66871d7a359ee1be9719c7eec83fd82 to your computer and use it in GitHub Desktop.
Save mine260309/d66871d7a359ee1be9719c7eec83fd82 to your computer and use it in GitHub Desktop.
Download from youku and convert it to aac, as a podcast
#!/bin/sh
# Depends:
# you-get
# ffmpeg
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <url>"
exit 1
fi
title=`you-get -i $1 | grep ^title | awk '{print $2;}' | tr -d '[:space:]'`
echo "Will donwload $title..."
you-get $1 -O $title
echo "Extract audio..."
input=$title.mp4
output=$title.aac
#echo ffmpeg -loglevel panic -i "$title.mp4" -vn -acodec copy "$title.aac"
ffmpeg -loglevel panic -i "$title.mp4" -vn -acodec copy "$title.aac"
echo "Done"
echo "Output to $output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment