
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (30)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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 (4632)
-
How to Make Video from Arraylist of images with Music
6 avril 2018, par hardik sojitraI am making an app which makes video from selected images which is stored in SD card I have implement the
group : ’com.github.hiteshsondhi88.libffmpeg’, name : ’FFmpegAndroid’, version : ’0.2.5’ this library and make this classes but it does not workUtility.java
public class Utility {
private final static String TAG = Utility.class.getName();
private static Context mContext;
public Utility(Context context) {
mContext = context;
}
public static String excuteCommand(String command)
{
try {
Log.d(TAG, "execute command : " + command);
Process process = Runtime.getRuntime().exec(command);
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
int read;
char[] buffer = new char[4096];
StringBuffer output = new StringBuffer();
while ((read = reader.read(buffer)) > 0) {
output.append(buffer, 0, read);
}
reader.close();
process.waitFor();
Log.d(TAG, "command result: " + output.toString());
return output.toString();
} catch (IOException e) {
Log.e(TAG, e.getMessage(), e);
} catch (InterruptedException e) {
Log.e(TAG, e.getMessage(), e);
}
return "";
}
public String getPathOfAppInternalStorage()
{
return Environment.getExternalStorageDirectory().getAbsolutePath();
}
public void saveFileToAppInternalStorage(InputStream inputStream, String fileName)
{
File file = new File(getPathOfAppInternalStorage() + "/" + fileName);
if (file.exists())
{
Log.d(TAG, "SaveRawToAppDir Delete Exsisted File");
file.delete();
}
FileOutputStream outputStream;
try {
outputStream = mContext.openFileOutput(fileName, Context.MODE_PRIVATE);
byte[] buffer = new byte[1024];
int length;
while ((length = inputStream.read(buffer)) > 0)
{
outputStream.write(buffer, 0, length);
}
outputStream.close();
inputStream.close();
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
}
}
public static boolean isFileExsisted(String filePath)
{
File file = new File(filePath);
return file.exists();
}
public static void deleteFileAtPath(String filePath)
{
File file = new File(filePath);
file.delete();
}
}ffmpegController.java
package com.example.admin.imagetovideowithnative;
import android.content.Context;
import android.util.Log;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
public class FfmpegController {
private static Context mContext;
private static Utility mUtility;
private static String mFfmpegBinaryPath;
public FfmpegController(Context context) {
mContext = context;
mUtility = new Utility(context);
initFfmpeg();
}
private void initFfmpeg()
{
mFfmpegBinaryPath = mContext.getApplicationContext().getFilesDir().getAbsolutePath() + "/ffmpeg";
if (Utility.isFileExsisted(mFfmpegBinaryPath))
return;
InputStream inputStream = mContext.getResources().openRawResource(R.raw.ffmpeg);
mUtility.saveFileToAppInternalStorage(inputStream, "ffmpeg");
Utility.excuteCommand(CommandHelper.commandChangeFilePermissionForExecuting(mFfmpegBinaryPath));
}
public void convertImageToVideo(String inputImgPath)
{
Log.e("Image Parth", "inputImgPath - "+inputImgPath);
if (Utility.isFileExsisted(pathOuputVideo()))
Utility.deleteFileAtPath(pathOuputVideo());
saveShellCommandImg2VideoToAppDir(inputImgPath);
Utility.excuteCommand("sh" + " " + pathShellScriptImg2Video());
}
public String pathOuputVideo()
{
return mUtility.getPathOfAppInternalStorage() + "/out.mp4";
}
private String pathShellScriptImg2Video()
{
return mUtility.getPathOfAppInternalStorage() + "/img2video.sh";
}
private void saveShellCommandImg2VideoToAppDir(String inputImgPath)
{
String command = CommandHelper.commandConvertImgToVideo(mFfmpegBinaryPath, inputImgPath, pathOuputVideo());
InputStream is = new ByteArrayInputStream(command.getBytes());
mUtility.saveFileToAppInternalStorage(is, "img2video.sh");
}
}CommandHelper.java
package com.example.admin.imagetovideowithnative;
import android.util.Log;
public class CommandHelper {
public static String commandConvertImgToVideo(String ffmpegBinaryPath, String inputImgPath, String outputVideoPath) {
Log.e("ffmpegBinaryPath", "ffmpegBinaryPath - " + ffmpegBinaryPath);
Log.e("inputImgPath", "inputImgPath - " + inputImgPath);
Log.e("outputVideoPath", "outputVideoPath - " + outputVideoPath);
return ffmpegBinaryPath + " -r 1/1 -i " + inputImgPath + " -c:v libx264 -crf 23 -pix_fmt yuv420p -s 640x480 " + outputVideoPath;
}
public static String commandChangeFilePermissionForExecuting(String filePath) {
return "chmod 777 " + filePath;
}
}AsynckTask
class Asynck extends AsyncTask {
FfmpegController mFfmpegController = new FfmpegController(PhotosActivity.this);
Utility mUtility = new Utility(PhotosActivity.this);
@Override
protected void onPreExecute() {
super.onPreExecute();
Log.e("Video Process Start", "======================== Video Process Start ======================================");
}
@Override
protected Void doInBackground(Object... objects) {
mFfmpegController.convertImageToVideo("");
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
Log.e("Video Process Complete", "======================== Video Process Complete ======================================");
Log.e("Video Path", "Path - " + mFfmpegController.pathOuputVideo());
Toast.makeText(PhotosActivity.this, "Video Process Complete", Toast.LENGTH_LONG).show();
}
} -
delay in lyrics shown when concat video with lyrics with an intro video using ffmpeg
19 mars 2018, par no nameI have a video with lyrics I add the lyrics used ffmpeg too. I have the lyrics in lrc formate and i change it to ass lyrics formate then I start to add it to my video using this command
ffmpeg -i video.mp4 -vf "ass=out.ass,fade=in:0:30" -y amr.mp4
I use fade=in:0:30 to make fade in the start of the video so when I start merge intro video my original video not start at once but to have some fade in, in the start to have a good view.
then I start to add the intro video using a text file which has thisfile intro.mp4
file amr.mp4then I merge them using this command
ffmpeg -f concat -safe 0 -i out.txt -c copy -y final.mp4
i got these message
[mov,mp4,m4a,3gp,3g2,mj2 @ 03eadb80] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 06419580] Non-monotonous DTS in output stream 0:1; previous: 310272, current: 285626; changing to 310273. This may result in incorrect timestamps in the output file.repeated many times.
when i watch the final video the lyrics have some delay from the sound the problem appeared when I merge the intro video but without it the lyrics have no problem so what I made wrong make the lyrics shown in this way and not in the right timing as it should have no problems as I merge only the intro video and after add the lyrics to the original one
Thanks in advance -
ffmpeg add music to video playing after video
11 janvier 2018, par Anuj TBEI’m using
ffmpeg
to create slideshow of images.I have to add music in the backgroup which will be played to the size of the slideshow (slicing audio if audio length is greater than video or repeating audio if audio length is shorter than video)
This is what my script is
ffmpeg -y \
-loop 1 -i in1.png \
-loop 1 -i in2.png \
-loop 1 -i in3.png \
-loop 1 -i in4.png \
-loop 1 -i in5.png \
-filter_complex \
"[0:v]trim=duration=6,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1,setsar=1:1[v0]; \
[1:v]trim=duration=6,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1,setsar=1:1[v1]; \
[2:v]trim=duration=6,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1,setsar=1:1[v2]; \
[3:v]trim=duration=6,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1,setsar=1:1[v3]; \
[4:v]trim=duration=6,fade=t=in:st=0:d=1,fade=t=out:st=5:d=1,setsar=1:1[v4]; \
[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,setsar=1:1[v]" -i music.mp3 -shortest -map "[v]" -aspect 16:9 -r 24 shortSlideshow1234.mp4;This generates output, but slideshow is silent and there is no music in the video.