Downloader Plugin YouTube To MP3

  • Hi,


    The Downloader plugin uses youtube-dl to download YouTube videos.
    I found out that youtube-dl also can do YouTube to mp3 :D


    I would like to add an option to the downloader plugin to do youtube to mp3.


    The requierments for that are ffmpeg and lame which I got from teh repo here:

    Code
    deb http://www.deb-multimedia.org squeeze main


    the youtube-dl command to do youtube to mp3 is:

    Code
    youtube-dl --extract-audio --audio-format mp3 http://www.youtube.com/watch?v=EHkozMIXZ8w


    I tried to edit the Downloader.js and downloader.inc with no luck....


    Hope someone can add this feature.


    Thanks,
    komar

    • Offizieller Beitrag

    Useful feature. I will add that feature to the next version that works with OMV 0.6.


    If you want make all of youtube-dl downloads convert to mp3, change line 341 to:


    Code
    $cmd = "/usr/local/bin/youtube-dl -q --newline --extract-audio --audio-format mp3 -o \"$dir/$path/$filename\" \"$url\" 2>&1";


    and use the silent download.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    You need to restart engined or just reboot.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat von "ryecoaaron"

    Useful feature. I will add that feature to the next version that works with OMV 0.6.


    If you add the feature to convert the audio to .mp3 format, please add also the .FLAC format :)

  • as to youtube-dl:

    Code
    --audio-format FORMAT      "best", "aac", "vorbis", "mp3", "m4a", "opus", or
                                   "wav"; best by default
        --audio-quality QUALITY    ffmpeg/avconv audio quality specification, insert
                                   a value between 0 (better) and 9 (worse) for VBR
                                   or a specific bitrate like 128K (default 5)


    there is no FLAC when using youtube-dl

    • Offizieller Beitrag

    Try:


    Code
    $cmd = "/usr/local/bin/youtube-dl -q --newline --extract-audio --audio-format \"mp3\" -o \"$dir/$path/$filename\" \"$url\" 2>&1";

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Very busy and haven't done anything with the code. The changes would be for the next OMV version which hasn't been released.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Version 0.6.1 is in the backports repo because it requires the backports libav-tools package. So, if you have the backports kernel installed, you will see the newest version.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I have this plugin installed on StoneBurner but it isn't downloading. How do I troubleshoot it? Nothing in the Downloader log is useful. I am doing a youtube-dl with it to mp3.


    EDIT: Try it manually and get this:
    ERROR: WARNING: unable to obtain file audio codec with ffprobe



    • Offizieller Beitrag

    Can someone confirm this is working for them despite my issue above so that I can focus if it is something outside of OMV that might be the cause?

    Yuck. I will have to spin up an OMV 2.x VM and install the plugin...

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    please let me know what you find out.

    The avconv/ffmpeg libraries are too old on OMV 2.x/Debian Wheezy. I recommend moving to OMV 3.x.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The avconv/ffmpeg libraries are too old on OMV 2.x/Debian Wheezy. I recommend moving to OMV 3.x.

    Alright then, what is the best way to make this move if I have an up-to-date 2.x?


    I have these plugins in use:


    Code
    backup
    downloader
    flashmemory
    snapraid
    unionfilesystems
    omvextraorg
    iscsitarget
    lvm2
    docker-gui

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!