
Recherche avancée
Autres articles (111)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (11099)
-
Concatenate 2 or more gif files with ffmpeg android
24 décembre 2017, par Chathu_smWell, I have spent a great deal of time to find a way of combine gif files using ffmpeg library.But none of them seems to work for me.
What I have tried (I have used ffmpeg android java library) :
String gif1=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)+"/gif1.gif";
String gif2=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)+"/gif2.gif";
String commandStr="-i concat:"+gif1+"|"+gif2+" -c copy "+file.getAbsolutePath()+"/output.gif";
String[]command=commandStr.split(" ");
ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {}
@Override
public void onProgress(String message) {
// Toast.makeText(Main.this,"Progress: "+message,Toast.LENGTH_SHORT).show();
Log.e("Progress TAG: ",message);
}
@Override
public void onFailure(String message) {
Toast.makeText(Main.this,"Failed: "+message,Toast.LENGTH_SHORT).show();
Log.e("Failure TAG: ",message);
}
@Override
public void onSuccess(String message)
{
Toast.makeText(Main.this,"Success: "+message,Toast.LENGTH_SHORT).show();
Log.e("Success TAG: ",message);
}
@Override
public void onFinish() {}
});
} catch (FFmpegCommandAlreadyRunningException e) {
// Handle if FFmpeg is already running
}But above command gives an error like this.
ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, gif, from 'concat:/storage/emulated/0/Pictures/gif1.gif|/storage/emulated/0/Pictures/gif2.gif':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: gif, bgra, 500x500, 1.70 fps, 10 tbr, 100 tbn, 100 tbc
Assertion video_enc->pix_fmt == AV_PIX_FMT_PAL8 failed at libavformat/gif.c:130Can anyone please suggest me an efficient command to do this.
P.S : I have a dynamic file list so can’t use the demuxing method which uses a text file.
-
FFMpeg concatenation with large list of inputs — how to minimize command line length
27 août 2020, par huitlacocheI have a python tool that concatentates several mp4s together into a single movie file using FFMPEG run from a subprocess call. The issue is that an arbitrarily large number of inputs in the command string will hit the windows CLI character max.


ffmpeg -y -i a.mp4 -i b.mp4 -i c.mp4 -f lavfi -t 0.1 -i anullsrc -filter_complex '[0]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2: (oh- ih)/2,setsar=1[0:v];[1]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(owiw)/2:(oh-ih)/2,setsar=1[1:v];[2]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow- iw)/2:(oh-ih)/2,setsar=1[2:v]; [0:v][3:a][1:v][3:a][2:v][3:a]concat=n=3:v=1:a=1[v][a]' -c:v libx264 -map [v] -map [a] output.mp4


Assuming 3 input movies that may or may have audio (hence the null audio source).
This works fine assuming there are no more than 30-50 input files. Often the input files have rather long filepaths and can get long very quickly.


After doing a bit of reading I tried a simple :


ffmpeg -f concat -i files.txt -c copy output.mp4


Which works if I can guarantee that all the files are the same codec/resolution/etc, but this cannot be guaranteed.
I'm not clear on how to translate my filter_complex to work with a text file of inputs. Finding a specific enough solution has proven elusive.


I'd be perfectly fine assigning the input paths to a temporary environment variable but in my use case this doesn't seem to work either. The subprocess call doesn't seem to translate wildcard %MYVAR% calls to environment variables.


I feel like there has to be an answer to this problem. If anyone can suggest a solution I would greatly appreciate it.


Thanks !


-
moviepy mp4 to mp3 converter
18 mai 2023, par EnspistI am trying to use python to convert files from mp4 to mp3. After some research most places recommend moviepy. I used the command
pip install moviepy
and it seemed to go off without a hitch. I go to VS Code and enter what a youtube video told me to enter (I know its not recommended to do that, I just wanted to see if it would work). This is what I have

#This code should convert a .mp4 file into a .mp3 file

#This imports the moviepy package
from moviepy.editor import *

#here are the names of my files (I have subbed out actual files names)
mp4_file = "file_name.mp4"

mp3_file = "file_name.mp3

#Here is the the audio being stripped from the .mp4 file
video_clip = VideoFileClip(mp4_file)
audio_clip = video_clip.audio

#this is writing the audio to a .mp3 file at the path that is specified.
audio_clip.write_audiofile(mp3_file)

#this closes the conversion code
audio_clip.close()
VideoClip.close()



After running the code I get this error :


RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.



There is a bunch of gibberish above it but that is the final line that gets spit out.


After looking up what the issue is I tried to input :


from moviepy.config import change_settings
change_settings({"FFMPEG_BINARY": "/usr/bin/ffmpeg"})



And it also did not work. I have tried searching for where ffmpeg is and it is not in
/usr/bin/ffmepg
or/usr/local/bin/ffmpeg
like most sources I have looked at tell me it should be.

I have tried installing ffmpeg on its own by doing
pip install ffmpeg
and 'brew install ffmpeg'. Both of those go off without a hitch as well but the error still pops.

I am using a macbook air m1 and I have I think everything I need installed already so I am so lost on what is causing this error to pop.


Can someone please help ?


I have tried installing ffmpeg on its own as well as searching for the file directly.


I should expect to get the .py file to run fine.


I instead get the error seen above :


RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.