Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (27)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (6214)

  • Error issuing complex shell command in python via subprocess

    4 juillet 2018, par user16171

    I’ve converted about 100 video tapes and now have 100 folders full of .dv files (each folder’s name is a date). In each folder, I want to combine all of the .dv files into one x265 mp4. I have figured out the ffmpeg command to do this, and I’ve written a simple Python script to traverse the folder hierarchy and print out the ffmpeg command to do each folder’s conversion. I’d like to set it up to just run each folder in series - it will take about a week to do the entire conversion, leaving me with about 5GB of video to use/post, etc. vs the 1.5TB of raw .dv files.

    The shell command looks like this :

    ffmpeg -f concat -i <(for f in FULL_PATH_TO_FILES/*.dv; do echo "file '$f'"; done) \
     -c:v libx265 -crf 28 -c:a aac -b:a 128k \
     -strict -2 FULL_PATH_TO_FILES/FOLDERNAME.mp4

    I can run that as a shell command, and it works fine. I could use the python script to generate the 100 commands and just copy and paste them into my shell one at a time. But I’d rather just have them run in series.

    I’ve tried various incarnations of os.system and subprocess.call or subprocess.Popen, and they all error.

    I build up the command and issue subprocess.call(command), which gives this error :

    "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
    errread, errwrite)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
    OSError : [Errno 2] No such file or directory

    I’ve also tried building up the command, as described in many of the other threads I’ve read, but it does not work, and I assume it’s because of the for-loop I have in the shell command.

    So, what’s the best way to do this ? Obviously, a shell-jockey could just tell me how to do this via the shell, but I’m more comfortable using Python to traverse the directories and build up the ffmpeg command.

    For what it’s worth, here is the whole script :

    import os
    import subprocess
    t1 = "ffmpeg -f concat -i <(for f in "
    t2 = "/*.dv; do echo \"file '$f'\"; done) -c:v libx265 -crf 28 -c:a aac -b:a 128k -strict -2 "
    t3 = ".mp4"
    rootDir = ROOTDIR
    for dirName, subdirList, fileList in os.walk(rootDir):
       S = dirName.split('/')    
       if S[-1] == "Media":
           moviename = S[-2].split(".")[0] # e.g. "19991128_Thanksgiving"
           command = t1 + dirName + t2 + dirName + "/" + moviename + t3
           if sum([".mp4" in fname for fname in fileList]) == 0: # don't bother if there is already a mp4 file in the folder
               cmd_list = [t1,dirName,t2,dirName,"/",moviename,t3]
               print command
               print
               print
               subprocess.call(command)
  • Extract all video frames as images with FFMPEG

    14 janvier 2016, par user780756

    I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,

    mkdir frames
    ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

    However I keep getting errors like,

    [image2 @ 00000037f5a811a0] Could not open file :
    frames/out-C :\Applications\FFMPEG\toGIF.bat3d.jpg
    av_interleaved_write_frame() : Input/output error frame= 1 fps=0.0
    q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB
    subtitle:0kB other streams:0kB global headers:0kB muxing overhead :
    unknown Conversion failed !

    If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.

    How can I correctly extract all the frames of the video with FFMPEG ?

  • Extract all video frames as images with FFMPEG

    18 août 2024, par user780756

    I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,

    



    mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg


    



    However I keep getting errors like,

    



    


    [image2 @ 00000037f5a811a0] Could not open file :
 frames/out-C :\Applications\FFMPEG\toGIF.bat3d.jpg
 av_interleaved_write_frame() : Input/output error frame= 1 fps=0.0
 q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB
 subtitle:0kB other streams:0kB global headers:0kB muxing overhead :
 unknown Conversion failed !

    


    



    If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.

    



    How can I correctly extract all the frames of the video with FFMPEG ?