
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (56)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (5246)
-
Can't write video using moviepy. output format error
23 décembre 2022, par Ronnie KisorI'm trying to concatenate videos in each folder so that I get one video in each folder instead of multiple short ones. This is an external USB drive if that matters.


My code seems to iterate over the files as expected, but I keep getting this error after the audio is written, during the "writing video" action, I believe :
b"[NULL @ 000002a8340ae640] Unable to find a suitable output format for 'D:\\taxes\\folder\\test'\r\nD:\\taxes\\folder\\test: Invalid argument\r\n"


I haven't found a way to force an output format yet. Any thoughts ?


import os
from moviepy.editor import *

startingDir = r'D:\taxes'

avoid = ['0incomplete', 'old', 'that', 'this']

for thing in os.listdir(startingDir):
 clips = []
 name = ''
 
 if thing in avoid:
 print(' avoided {}'.format(thing))
 continue

 folder = os.path.join(startingDir, thing)

 if os.path.isdir(folder):
 for clip in os.listdir(folder):
 print (clip)
 clips.append(VideoFileClip(os.path.join(folder, clip)))
 print('\n')

 try:
 final = concatenate_videoclips(clips)
 final.write_videofile(os.path.join(folder, 'test'), audio=True, codec='libx264', threads=10)
 final.close() 
 except Exception as e:
 print (e)
 print('\n Continuing... \n\n')
 continue



-
ffmpeg ProcessBuilder No such file or directory
24 avril 2020, par silentsudoI am trying to get media duration using ffmpeg command from a java program. I am calling this method from within spring boot application.
I am using
ProcessBuilder
.


File object is valid and exists for privacy I have replaced file path in error logs.



My Code is as below :



private String getMediaDuration(File file) {
 final String command = "/usr/bin/ffmpeg -version";//-i " + file.getAbsolutePath() + " 2>&1 | grep Duration | cut -c 13-20";
 try {
 ProcessBuilder builder = new ProcessBuilder("/usr/bin/ffmpeg",
 "-version");
 builder.directory(file.getParentFile());

 System.out.println("Directory : " + builder.directory().exists());
 System.out.println("Directory : " + builder.directory().getAbsolutePath());
 final Process process = builder.start();
 final InputStream is = process.getInputStream();
 final InputStreamReader isr = new InputStreamReader(is);
 final BufferedReader br = new BufferedReader(isr);
 String line;
 while ((line = br.readLine()) != null) {
 System.out.println(line);
 }
 return line;
 } catch (Exception e) {
 e.printStackTrace();
 }
 return null;
 }




Unfortunately nothing seems to be working
Error below :



java.io.IOException: Cannot run program "/usr/bin/ffmpeg -version" (in directory "/abc/xyz"): error=2, No such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at ....getMediaDuration(FFmpegRunner.java:208)
 at ....ffmpegprocessor.FFmpegRunner.run(FFmpegRunner.java:61)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
 at java.lang.UNIXProcess.forkAndExec(Native Method)
 at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
 at java.lang.ProcessImpl.start(ProcessImpl.java:134)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 ... 5 more
</init>



Output for
whereis ffmpeg



ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz




Please help me understand where it is going wrong. Thank you.


-
How to speed up my video creating/encoding pipeline
23 septembre 2015, par user606521I am creating a video from 120 JPEG images and concatening it with intro video.
- video (and images) dimmensions : 960x540
- video/audio output format that I need : mp4 H.264, AAC
I am creating video from JPEG images using following command :
ffmpeg -f lavfi -i anullsrc -r 60 -i pipe:0 -y -acodec aac -strict experimental \
-shortest -movflags frag_keyframe+empty_moov -f mp4 video.mp4It creates 2 seconds (120 frames with 60FPS) mp4 video with "silence" (silent audio). video.mp4 size is 94KB. This process takes 1 second. (Note that I am passing images through pipe:0).
Next I concatenate it with existing intro.mp4 video (H.264, AAC, 931KB, lasts 6 seconds) using following command :
ffmpeg -i intro.mp4 -i video.mp4 -y \
-filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" \
-map "[v]" -map "[a]" -acodec aac -strict experimental \
-movflags frag_keyframe+empty_moov -f mp4 final.mp4It creates final mp4 H.254, AAC video which lasts 2 + 6 = 8 seconds and it’s size 990KB. This process takes 3.5 seconds.
So the whole process takes 5.5 seconds on my Mac. I have to speed it up, especially concatening videos. I am not familiar with video encoding and video formats, but I thought that maybe creating first video in mp4 and then concatening it with another mp4 video is not efficient. Are there any other formats in which I could create video (and intro) that will be faster to create/concatenate so I could encode only final video as mp4 ?
For example I could create
video.<format></format>
, concatenate it withintro.<format></format>
and finally encode it asfinal.mp4
.Use case : I have to create videos in almost real time. 5.5 secs is ok on my Mac, but I have to execute my app on a weaker machine on which this process currently takes 3 + 15 = 18 seconds.
Also maybe there are some cool flags I could pass to ffmpeg to make it faster ?