Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (11)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

Sur d’autres sites (3702)

  • With CMD wrong output subprocess with ffmpeg/ffprobe

    21 avril 2021, par Nicolas Maslorz

    i have a problem with ffmpeg when i run it in the cmd i havethe correct output "ffprobe passionfruit.mp4 -show_streams"  

    


    But when i use the same with subprocess :

    


    command = 'ffprobe "C:/Users/NMASLORZ/Downloads/passionfruit.mp4" -show_streams'
p = subprocess.Popen(command, universal_newlines=True, shell=True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
text = p.stdout.read()
retcode = p.wait()
print (text)


    


    i have this output :
"'ffprobe' is not recognized as an internal command or external, an executable program or a batch file."
i tried every synthax and even in a list i still have the same output

    


  • Call ffmpeg in c++ with system() function fails

    2 septembre 2014, par zhen lee

    I write a c++ program which needs to convert some(say:10) mp4 videos to flv videos.
    I use ffmpeg in my program for each video like this :

    system("ffmpeg -i video -filter:v yadif -ar 44100 -sameq -y -f flv temp.flv")

    however,it turns out :only first video will be converted successfully,the others will fail.
    it means :
    when i change the input order of which video to convert and re-execution the program,it behave the same:only the first video(will be different each time as i changed the input video order) will be converted successfully.

    The error message like :

    [h264 @ 0xaee0740] concealing 45 DC, 45 AC, 45 MV errors
    [h264 @ 0xaee0ce0] AVC : nal size 305665
    Last message repeated 1 times
    [h264 @ 0xaee0ce0] no frame !
    [h264 @ 0xaee1280] AVC : nal size 572993
    Last message repeated 1 times
    [h264 @ 0xaee1280] no frame !
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    [aac @ 0xad9ccc0] channel element 0.13 is not allocated
    Error while decoding stream #0:1
    ......
    The most strange thing is :when i run ffmpeg command in bash shell,all video will be converted successfully .

    After google it,I have try these(certainly failed) :

    1. remove -sameq option,the result is same ;
    2. write ffmpeg commod in a shell script ConvertToFlv.sh like :

      /usr/local/bin/ffmpeg -i "$dir/$1" -filter:v yadif -ar 44100 -sameq -y -f flv "$dir/temp.fiv"

      then call this script in program like

      system("ConvertToFlv.sh"+video)

      or

      system("sh ConvertToFlv.sh"+video)

      The result is same.

    The ffmpeg configure is :

     ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
     built on Dec 17 2012 16:17:30 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
     configuration: --enable-gpl --enable-postproc --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac --disable-ffserver --disable-ffplay
     libavutil      51. 41.100 / 51. 41.100
     libavcodec     54.  4.100 / 54.  4.100
     libavformat    54.  1.100 / 54.  1.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 62.101 /  2. 62.101
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0.  7.100 /  0.  7.100
     libpostproc    52.  0.100 / 52.  0.100

    and my machine envirment is :

    Linux master 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

    I’m irritable now,I hope someone can give me some advice,really appreciate it.

  • How can I get Python to find ffprobe ?

    23 décembre 2016, par Gloin

    I have ffmpeg and ffprobe installed on my mac (macOS Sierra), and I have added their path to PATH. I can run them from terminal.

    I am trying to use ffprobe to get the width and height of a video file using the following code :

    import subprocess
    import shlex
    import json


    # function to find the resolution of the input video file
    def findVideoResolution(pathToInputVideo):
       cmd = "ffprobe -v quiet -print_format json -show_streams"
       args = shlex.split(cmd)
       args.append(pathToInputVideo)
       # run the ffprobe process, decode stdout into utf-8 & convert to JSON
       ffprobeOutput = subprocess.check_output(args).decode('utf-8')
       ffprobeOutput = json.loads(ffprobeOutput)

       # find height and width
       height = ffprobeOutput['streams'][0]['height']
       width = ffprobeOutput['streams'][0]['width']

       return height, width

    h, w = findVideoResolution("/Users/tomburrows/Documents/qfpics/user1/order1/movie.mov")
    print(h, w)

    I am sorry I cannot provide a MCVE, as I didn’t write this code, and I don’t really know how it works.

    It gives the following error :

    Traceback (most recent call last):
     File "/Users/tomburrows/Dropbox/Moviepy Tests/get_dimensions.py", line 21, in <module>
       h, w = findVideoResolution("/Users/tomburrows/Documents/qfpics/user1/order1/movie.mov")
     File "/Users/tomburrows/Dropbox/Moviepy Tests/get_dimensions.py", line 12, in findVideoResolution
       ffprobeOutput = subprocess.check_output(args).decode('utf-8')
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 626, in check_output
       **kwargs).stdout
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 693, in run
       with Popen(*popenargs, **kwargs) as process:
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
       restore_signals, start_new_session)
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
       raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
    </module>

    If python is not reading from the PATH file, how can I specify where ffprobe is ?

    EDIT :
    It appears the python path is not aligned with my shell path.
    Using os.environ["PATH"]+=":/the_path/of/ffprobe/dir" at the beginning of each program allows me to use ffprobe, but why might my python path not be the same as my shell path ?