Recherche avancée

Médias (91)

Autres articles (64)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (4123)

  • Strange behavior traversing folders with Bash [duplicate]

    18 février 2021, par victrid

    I was trying to traverse my folders and I found the find | while read method from another question. I wrote something like this :

    


    find ./ -mindepth 1 -maxdepth 1 -type d | while read -r dir
do
  pushd "$dir"
  ffmpeg -i *.ape CD.flac
  popd
done


    


    and it comes out (with set -x) like this, with some folders not being accessed.

    


    +/example/test.sh:2> read -r dir
+/example/test.sh:2> find ./ -mindepth 1 -maxdepth 1 -type d
+/example/test.sh:4> pushd './CD 2'
+/example/test.sh:5> ffmpeg -i CDImage.ape CD.flac
(ffmpeg output)
+/example/test.sh:6> popd
+/example/test.sh:2> read -r dir


    


    however, I changed the ffmpeg line to pwd the script runs fine (and should be like this)

    


    find ./ -mindepth 1 -maxdepth 1 -type d | while read -r dir
do
  pushd "$dir"
  pwd
  popd
done


    


    its output :

    


    +/example/test.sh:2> read -r dir
+/example/test.sh:2> find ./ -mindepth 1 -maxdepth 1 -type d
+/example/test.sh:4> pushd './CD 2'
+/example/test.sh:5> pwd
(output)
+/example/test.sh:6> popd
+/example/test.sh:2> read -r dir
+/example/test.sh:4> pushd './CD 1'
+/example/test.sh:5> pwd
(output)
+/example/test.sh:6> popd
+/example/test.sh:2> read -r dir


    


    ffmpeg should not affect the shell, so what is the problem ? Could it be something like pipe overflow ?

    


  • How to loop over gif file finite number of times while creating mp4 as output with ffmpeg

    16 mai 2020, par in-user

    I am able to convert gif file to mp4 using this command :

    



    ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4


    



    What I want to do is to loop over gif animation 3 times and convert to mp4.

    



    I am able to do this with 2 shell commands. First one from above and then concatenate the same video 3 times.

    



    ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/video.mp4'\n%.0s" {1..3}) -c copy videoloop.mp4


    



    I have also tried with -ignore_loop 0 option and setting time. It does work but it is not exactly what I am trying to do since I can extend the video but can not make exactly 3 loops.

    



    ffmpeg -ignore_loop 0 -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -t 12 videoloop.mp4


    



    So as you can see I am already able to achieve what I want, but with 2 shell commands :

    



    ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4
ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/video.mp4'\n%.0s" {1..3}) -c copy videoloop.mp4


    



    Is it possible to do this with only one call to ffmpeg ?

    



    I tried with -loop option for the input file. It doesn't work for gifs. I also tried with -stream_loop. It creates something corrupted.

    


  • Command is running different from expected when i use it trought Python

    17 septembre 2021, par Gustavo Marinho

    I have a code where i download a youtube video as 3gpp and convert it to a mp3, i need to use FFmpeg to do this, and it work well when using both cmd and powershell, but, when i tried to run the same command in Python, it didin't work at all.

    


    This is my command :

    


    ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3

    


    I tried :

    


    subprocess.call(r'%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3', shell=True)

    


    subprocess.run(["ffmpeg","-i","C:\YTDownloads\CurrentAudio.3gpp","C:\YTDownloads\CurrentAudio.mp3]")


    


    os.system('powershell ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3')


    


    subprocess.run([
    'ffmpeg',
    '-i', os.path.join(parent_dir, f"{newname}.3gpp"),
    os.path.join(parent_dir, f"{newname}.mp3")
]) 


    


    subprocess.call('C:\Windows\System32\powershell.exe ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3', shell=True)


    


    all of them return some type of error, in some of them it returns that ffmpeg isn't a recognized as a internal command, in others it says that the system can't find the specified path, but none of them works, even thought it works perfectly when i use the exactly same command on cmd/powershell.

    


    sorry for my bad english :3