
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (80)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (14561)
-
Extract all video frames as images with FFMPEG
18 août 2024, par user780756I 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
14 janvier 2016, par user780756I 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.jpgHowever 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 ?
-
Error issuing complex shell command in python via subprocess
4 juillet 2018, par user16171I’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.mp4I 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 directoryI’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)