

Download the video to watch it offline - We live our lives at a rapid pace, and it's not always possible to find a free WiFi to see that funny video that all your friends are talking about. In fact, sober and simple to use, this MP3 - MP4 converter was created by one user for other Youtube users. It is compatible with all devices such as smartphones, tablets and computers. On the other hand, Y2Convert uses the latest technologies and is the number 1 video converter. ODIR="downloaded_songs/%(title)s.How to convert Youtube to mp3? There is no need for multiple tools to convert your Youtube video to MP3, MP4 and other formats. To download songs from the text file IN_URL="/Volumes/Media/Music/download_youtube_mp3/songs.txt" Youtube-dl -extract-audio -embed-thumbnail -audio-format mp3 -o "%(title)s.%(ext)s" $2ĭownloaded_file=$(youtube-dl -get-filename -extract-audio -embed-thumbnail -audio-format mp3 -o "%(title)s.%(ext)s" $2)įfmpeg -ss $1 -i "$ \ įor i in $(find. Thanks a lot added following functions to my bash_profile: # download best video quality using youtube-dlĭownloaded_file=$(youtube-dl -get-filename -extract-audio -embed-thumbnail -audio-format mp3 -o "%(title)s.%(ext)s" $1) How to get the variable value $OUTPUT_MP3?Įcho "%(title)s.%(ext)s" gives the verbatim output, does not give the output filename. Youtube-dl -extract-audio -embed-thumbnail -audio-format mp3 -o "%(title)s.%(ext)s" $1įfmpeg -ss $2 -i $OUTPUT_MP3 -acodec copy -y temp.mp3 The script is given below: # trim initial x seconds of mp3 file "HOW TO GET THE VARIABLE NAME OF OUTPUT MP3 FILE FROM YOUTUBE-DL?" Instead of doing this is two steps, I like to write one bash script which does the same thing. So I tried to use the ffmpeg to trim downloaded mp3 file.

But, when I looked at the man pages of youtube-dl, I could not find any trim options. I found that youtube-dl can download the video from youtube to local machine. I would like to download the initially x seconds trimmed mp3 from a video url of youtube.
