Recherche avancée

Médias (0)

Mot : - Tags -/logo

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (83)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

Sur d’autres sites (10298)

  • Why does ffmpeg command work in terminal but not subprocess.call

    4 août, par Brian

    I reviewed the "similar questions", but those seem to refer to using the full path for ffmpeg to ensure using the same version, which I am already doing so posting my question.

    


    I am using a Mac runnning Sequoia 15.5, python 3, and ffmpeg 4.2.1.

    


    I'm trying to write a script that can convert flac to mp3 320k.

    


    If I use the following command in terminal everything works as intended :

    


    /usr/local/bin/ffmpeg -i "/Volumes/MainData/Media/Media Server/_Stage/03 - People Like Us - Aaron Tippin.flac" -b:a 320k -map_metadata 0 -id3v2_version 3 "/Volumes/MainData/Media/Media Server/_Stage/03 - People Like Us - Aaron Tippin.mp3"


    


    But when trying to do the same thing with subprocess.call with the following :

    


    command = ['/usr/local/bin/ffmpeg', '-i', '/Volumes/MainData/Media/Media Server/_Stage/03 - People Like Us - Aaron Tippin.flac', '-b:a 320k', '-map_metadata 0', '-id3v2_version 3', '/Volumes/MainData/Media/Media Server/_Stage/03 - People Like Us - Aaron Tippin.mp3']
p = subprocess.call(command)


    


    I get this as a result :

    


    Unrecognized option 'id3v2_version 3'.
Error splitting the argument list: Option not found


    


    If I remove the '-id3v2_version 3', then the subprocess.call results in the following error :

    


    [mp3 @ 0x7fae2c008200] Invalid stream specifier: a 320k.


    


    Why does Terminal understand but subprocess.call doesn't when I've verified I'm using the same version of ffmpeg ?

    


  • sending variables to subprocess call with spaces - python 2.7

    24 novembre 2015, par Tandy Freeman

    I want to add ffmpeg options to a variable and later use it in a subprocess call. If the variable contains one word, all is well, but if it contains more than one, I get errors. I am working on a larger script and I will need to have extra options such as this for certain codecs. How can I get this working ?

    The following works perfectly for me :

    import subprocess
    import sys

    video_codec = 'libx264'
    output = sys.argv[1] + '.mkv'
    subprocess.call(['ffmpeg',
               '-i',sys.argv[1],
               '-c:v',video_codec,
               '-c:a','copy',        
               output])    

    Once I introduce new options/spaces to video_options as such :

    video_codec = "'libx264', '-pix_fmt', 'yuv420p'"

    I get an ffmpeg error :

    Unknown encoder ''libx264', '-pix_fmt', 'yuv420p''

    If I remove the double quotes and just use
    video_codec = ’libx264’, ’-pix_fmt’, ’yuv420p’

    I get a python error :

    Traceback (most recent call last):
     File "testo.py", line 10, in <module>
       output])<br />
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 524, in call
       return Popen(*popenargs, **kwargs).wait()
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
       errread, errwrite)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
       raise child_exception
    TypeError: execv() arg 2 must contain only strings
    </module>
  • I called av_probe_input_format3(), now I want to call avcodec_find_decoder(), how do I convert the format in a codec ?

    27 janvier 2021, par Alexis Wilke

    So... I'm dealing with a system that has input data coming in buffers (i.e. NOT a file). I want to determine which decoder to create to decompress an audio stream (MP3, WAV, OGG, ...) So obviously I do not know the input format.

    &#xA;

    I found out that I could determine the format using the av_probe_input_format[23]() functions. That part works great, I get a format pointer that matches the files that I use as input.

    &#xA;

    AVInputFormat * format(av_probe_input_format3(&amp;pd, true, &amp;score));&#xA;

    &#xA;

    I can print the format->name and format->long_name and these are the correct type (so the detection is working as expected).

    &#xA;

    Now, I'm trying to understand how to convert that AVInputFormat * into a AVCodec * so I can call avcodec_alloc_context3(codec) to create the actual audio decoder.

    &#xA;

    I found a couple of functions, which I used like so :

    &#xA;

    AVCodecID const codec_id(av_codec_get_id(format->codec_tag, format->raw_codec_id));&#xA;AVCodec * codec(avcodec_find_decoder(codec_id));&#xA;

    &#xA;

    Problem 1. the raw_codec_id field is marked as "private" (should not access/use anywhere in your client's code).

    &#xA;

    Problem 2. the first function always returns AV_CODEC_ID_NONE (0) so of course the second call fails each time.

    &#xA;

    Am I doing something wrong ? Is there is way to instead create a generic decode that will automatically detect the type of audio I have as input ? (that is, would that be the only way to make that work ?)

    &#xA;