Last active
August 2, 2018 03:39
-
-
Save mine260309/d66871d7a359ee1be9719c7eec83fd82 to your computer and use it in GitHub Desktop.
Download from youku and convert it to aac, as a podcast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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