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.
0 Comments
Leave a Reply. |