Drag and drop GUI to stream YT videos in mpv

Forum Forums General Tips and Tricks Drag and drop GUI to stream YT videos in mpv

  • This topic has 6 replies, 5 voices, and was last updated Jan 2-12:50 pm by marcelocripe.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #95099
    Member
    PPC

      A nice way to drag and drop videos from web pages and stream them in mpv (works great in low powered computers, using the ytdlautoformat.lua script and editing it so the default video quality is 360p).

      Start the script, move the window to the right bottom of the screen and drag and drop any video link there, and wait a moment to watch it in mpv…

      the code (it can even be pasted directly into the terminal):

      #!/bin/bash
      #GUI to allow for a permanent drag and drop window, that plays YT videos or any video file that's draged inside it
      yad --dnd --geometry=100x60 --on-top --no-buttons --skip-taskbar --title="YTplayer" --text="Drag-n-drop a YT link or a video file here \nto play them in mpv" | while read selection
      do
      video=$(echo "$selection" | sed 's/file:\/\///')
      mpv $video
      done

      P.

      #95109
      Member
      techore
        Helpful
        Up
        0
        ::

        Neat!

        Adding it to my library of hacks.

        XDG_RUNTIME_DIR not set in the environment

        Regarding above. I failed to notice my terminal was root. Doh! xorg was running as a user.

        • This reply was modified 5 months ago by techore.
        #95132
        Forum Admin
        rokytnji
          Helpful
          Up
          0
          ::

          Works on mine.

          Sometimes I drive a crooked road to get my mind straight.
          Not all who Wander are Lost.
          I'm not outa place. I'm from outer space.

          Linux Registered User # 475019
          How to Search for AntiX solutions to your problems

          #95134
          Member
          marcelocripe
            Helpful
            Up
            0
            ::

            Thank you very much PPC.

            #95147
            Member
            ModdIt
              Helpful
              Up
              0
              ::

              Many thanks PPC,
              script now in my KEEP folder.

              #95738
              Member
              marcelocripe
                Helpful
                Up
                0
                ::

                Hello PPC.

                I still don’t know what the name of this program will be, but I managed to make the small modifications for the program to receive the translations.

                Now the .desktop file for this program will be missing.

                Thank you very much.

                – – – – –

                Olá PPC.

                Eu ainda não sei qual será o nome deste programa, mas eu consequi fazer as pequenas modificações para o programa receber as traduções.

                Agora vai ficar faltando o arquivo .desktop deste programa.

                Muito obrigado.

                #96601
                Member
                marcelocripe
                  Helpful
                  Up
                  0
                  ::

                  Proposal for the .desktop file.
                  Revision of the native speakers of the respective languages is required.

                  – – – – –

                  Proposta para o arquivo .desktop.
                  É necessário a revisão dos nativos dos respectivos idiomas.

                  ytplayer.desktop:

                  [Desktop Entry]
                  Categories=AudioVideo;Audio;Video;Player;TV;
                  #Exec=/bin/sh -c '/opt/ytplayer/ytplayer'
                  #or
                  Exec=ytplayer
                  Icon=youtube
                  Terminal=false
                  Type=Application
                  
                  Name=YouTube Player
                  Name[de]=YouTube-Videoplayer »YTplayer«
                  Name[fr]=Lecteur vidéo YouTube YTplayer
                  Name[fr_BE]=Lecteur vidéo YouTube YTplayer
                  Name[it]=Lettore video di YouTube YTplayer
                  Name[pt]=Reprodutor de Vídeos do YouTube YTplayer
                  Name[pt_BR]=Reprodutor de Vídeos do YouTube YTplayer
                  
                  Comment=Play movie and music files or YouTube URLs/links
                  Comment[de]=Spielen oder spielen Sie Film- und Musikdateien oder YouTube-URLs/-Links ab
                  Comment[fr]=Lire des fichiers de films et de musique ou des URL/liens YouTube
                  Comment[fr_BE]=Lire des fichiers de films et de musique ou des URL/liens YouTube
                  Comment[it]=Riproduci film e file musicali o URL/link di YouTube
                  Comment[pt]=Reproduzir ou tocar arquivos de filmes e músicas ou URLs/ligações do YouTube
                  Comment[pt_BR]=Reproduzir ou tocar arquivos de filmes e músicas ou URLs/links do YouTube
                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.