Advanced search

Medias (91)

Other articles (74)

  • Organiser par catégorie

    17 May 2013, by

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Création définitive du canal

    12 March 2010, by

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Le profil des utilisateurs

    12 April 2011, by

    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 (...)

On other websites (5931)

  • Piping output of youtube-dl to a script using ffmpeg looks ok using echo but returns an error when executing

    22 February 2016, by user556068

    I am trying to use youtube-dl to get the urls of some videos and then pipe the resulting urls into the input of my script. So in my terminal I do

    youtube-dl --ignore-config -iga ~/Desktop/youtube/videolist.txt | myscript.sh

    In my script I define things as

    command='ffmpeg'        
    inputArgs='-i'              
    outputArgs='-c:v libx264 -preset ultrafast -qp 0'      
    directory="${HOME}/Desktop/Videos/"
    output="video${count}"      
    extension='mp4'        

    I test it with echo to make sure everything appears in the correct order.

    echo "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
    "${directory}""${output}${count}"."${extension}"

    And the output from that looks correct. But when I try to run the same thing without the preceding echo command, i.e.,

    "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
    "${directory}""${output}${count}"."${extension}"

    I get an error message that says

    At least one output file must be specified.

    So it seems pretty obvious to me that I’m doing something wrong when attempting to execute it.

    I have tried:

    • quoting the entire line as a whole
    • quoting different sections together
    • using the exec command in front of everything

    No matter what I do, an error occurs at some point in the process. I know it’s something simple I’m doing wrong. Would someone please enlighten me as to what that might be?

    I feel very strongly that the . shouldn’t just be in the middle of everything like that, but I really don’t know.

    Again, everything looks as it should when I run echo before the string of shell parameters.

    If more of the script I’m using is needed to understand what I’m talking about, that is not a problem.

  • Piping output of youtube-dl to a script using ffmpeg looks ok using echo but returns an error when executing

    29 May 2020, by I0_ol

    I am trying to use youtube-dl to get the urls of some videos and then pipe the resulting urls into the input of my script. So in my terminal I do

    



    youtube-dl --ignore-config -iga ~/Desktop/youtube/videolist.txt | myscript.sh


    



    In my script I define things as

    



    command='ffmpeg'        
inputArgs='-i'              
outputArgs='-c:v libx264 -preset ultrafast -qp 0'       
directory="${HOME}/Desktop/Videos/"
output="video${count}"      
extension='mp4'         


    



    I test it with echo to make sure everything appears in the correct order.

    



    echo "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"


    



    And the output from that looks correct. But when I try to run the same thing without the preceding echo command, i.e.,

    



    "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"


    



    I get an error message that says

    



    


    At least one output file must be specified.

    


    



    So it seems pretty obvious to me that I'm doing something wrong when attempting to execute it.

    



    I have tried:

    



      

    • quoting the entire line as a whole
    • 


    • quoting different sections together
    • 


    • using the exec command in front of everything
    • 


    



    No matter what I do, an error occurs at some point in the process. I know it's something simple I'm doing wrong. Would someone please enlighten me as to what that might be?

    



    I feel very strongly that the . shouldn't just be in the middle of everything like that, but I really don't know.

    



    Again, everything looks as it should when I run echo before the string of shell parameters.

    



    If more of the script I'm using is needed to understand what I'm talking about, that is not a problem.

    


  • Converting video with ffmpeg from a script not in the root folder

    30 October 2017, by Daniel Ormerod

    I am using ffmpeg to convert videos, create thumbnails etc.

    I made the below function to convert a video and when I run it in a script in the root folder it converts ok.

    However, I am using ajax to upload the video and the script is located /ajax/upload-video.php and when I run it in that folder it fails to convert.

    I have tried sending the $src and $dest up with ../ before the filenames to go back a folder but it isn’t working.

    Can anybody help?

    Do I need to add something to the $command line to tell it to go back a folder?

    These are the variables being used in the function:

    $ffmpegpath = 'ffmpeg.exe';
    $src = 'videos/video1.wmv';
    $dest = 'videos/video1.mp4';

    I have tried:

    $ffmpegpath = 'ffmpeg.exe';
    $src = '../videos/video1.wmv';
    $dest = '../videos/video1.mp4';

    And the function:

    function convert_video($src, $dest) {

       global $ffmpegpath;

       if (!file_exists($src)) {

           echo '<p>The file does not exist</p>';

       } else {

           $command = "$ffmpegpath -i $src $dest";

           @exec($command, $ret);

           if (!file_exists($dest)) {

               echo '<p>The file failed to create</p>';

           } else {

               if (filesize($dest)==0) {

                   echo '<p>The file created but has not filesize</p>';

               } else {

                   echo '<p>File Created Successfully</p>';

               }

           }

       }

    }