Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (79)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (6491)

  • Best way to have 2 youtube-dl input with ffmpeg and php

    8 janvier 2021, par Baraque Obahamas

    I'm trying to find the best way to combine a youtube-dl link in mp4 format with another youtube-dl link in m4a format to get an mp4 file through ffmpeg & php and to have an output in stdout in order to download the file directly.

    


    With only one file to convert to another format, I managed to do it easily, for example from m4a to mp3 :

    


    $cmd = "youtube-dl -f bestaudio[ext=m4a] --no-part --no-cache-dir --no-warnings --no-progress -o - https://www.youtube.com/watch?v=6Dh-RL__uN4 | ffmpeg -i - -f mp3 -ab 192k -";


    


    But with 2 inputs, it doesn't work :

    


    $cmd = "cat <(youtube-dl -f bestvideo[ext=mp4] --no-part --no-cache-dir --no-warnings --no-progress -o - https://www.youtube.com/watch?v=6Dh-RL__uN4) <(youtube-dl -f bestaudio[ext=m4a] --no-part --no-cache-dir --no-warnings --no-progress -o - https://www.youtube.com/watch?v=6Dh-RL__uN4) > ffmpeg -i - -movflags frag_keyframe+empty_moov+faststart -frag_duration 3600 -c:v copy -c:a copy -f mp4 -";


    


    In this case I get a "said into stderr : "sh : 1 : Syntax error : "(" unexpected")" error.

    


    I guess there must be a better way to do it.
I notice another problem is that on the ffmpeg command there is only one input "-i -". Now there are 2 inputs, there should be I guess "pipe:3" in addition, but so far my tests have not been conclusive.

    


    Full code :

    


    <?php
header('Content-Description: File Transfer');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header("Content-Disposition: attachment; filename=\"ok.mp4\"");
header("Content-Type: application/octet-stream");

$cmd = "cat <(youtube-dl -f bestvideo[ext=mp4] --no-part --no-cache-dir --no-warnings --no-progress -o - https://www.youtube.com/watch?v=6Dh-RL__uN4) <(youtube-dl -f bestaudio[ext=m4a] --no-part --no-cache-dir --no-warnings --no-progress -o - https://www.youtube.com/watch?v=6Dh-RL__uN4) > ffmpeg -i - -movflags frag_keyframe+empty_moov+faststart -frag_duration 3600 -c:v copy -c:a copy -f mp4 -";
$cmd = passthru($cmd, $status);


    


  • How to limit youtube-dl on video length when downloading a youtube stream

    26 novembre 2018, par M B

    Im trying to write a small script that records a live stream from youtube.
    when using youtube-dl.download function it just keeps on downloading until the stream ends, but i want to stop downloading after 20min or so.
    the problem is when i try killing it after a while the output is corrupted (im using mp4 format), and i tried fixing it with ffmpeg but a "moov atom not found" error occurs.

    How can i make youtube-dl (or any other tool) record a fixed length of a live stream ?

    Here’s a portion of the code :

    class recordingThread (threading.Thread):
    def __init__(self, threadID, output_location, name, yt_stream, start_time):
       threading.Thread.__init__(self)

       self.threadID = threadID
       self.output = os.path.abspath(output_location)
       self.name = name
       self.start_time = start_time

       self.ydl_opts = {'quiet': True,
                        'format': 'mp4',
                        'outtmpl': name+ '%(ext)s',
                        'sleep_interval': 2
                        }
       self.yt_stream = yt_stream.strip('\'"')

    def run(self):
       print "Starting %s Thread Recorder - %s" % (self.name, self.start_time)

       with youtube_dl.YoutubeDL(self.ydl_opts) as ydl:
           self.download_prc = ydl.download([self.yt_stream])

    Thanks.

  • How to limit youtube-dl on video length when downloading a youtube stream

    3 août 2016, par user3682869

    Im trying to write a small script that records a live stream from youtube.
    when using youtube-dl.download function it just keeps on downloading until the stream ends, but i want to stop downloading after 20min or so.
    the problem is when i try killing it after a while the output is corrupted (im using mp4 format), and i tried fixing it with ffmpeg but a "moov atom not found" error occurs.

    How can i make youtube-dl (or any other tool) record a fixed length of a live stream ?

    Here’s a portion of the code :

    class recordingThread (threading.Thread):
    def __init__(self, threadID, output_location, name, yt_stream, start_time):
       threading.Thread.__init__(self)

       self.threadID = threadID
       self.output = os.path.abspath(output_location)
       self.name = name
       self.start_time = start_time

       self.ydl_opts = {'quiet': True,
                        'format': 'mp4',
                        'outtmpl': name+ '%(ext)s',
                        'sleep_interval': 2
                        }
       self.yt_stream = yt_stream.strip('\'"')

    def run(self):
       print "Starting %s Thread Recorder - %s" % (self.name, self.start_time)

       with youtube_dl.YoutubeDL(self.ydl_opts) as ydl:
           self.download_prc = ydl.download([self.yt_stream])

    Thanks.