
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (9)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (4412)
-
Android : Pass video path to FFmpeg
7 janvier 2016, par marianI have developed an app that play video from gallery. I would like to add watermark using FFmpeg command in the video selected. But I do not know how to pass the path to the FFmpeg command. I could not find proper tutorials or reference regarding this. My coding are as follows :
MainActivity.java :
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.widget.VideoView;
import com.netcompss.ffmpeg4android.CommandValidationException;
import com.netcompss.ffmpeg4android.GeneralUtils;
import com.netcompss.ffmpeg4android.Prefs;
import com.netcompss.ffmpeg4android.ProgressCalculator;
import com.netcompss.loader.LoadJNI;
public class MainActivity extends Activity {
public ProgressDialog progressBar;
String workFolder = null;
String demoVideoFolder = null;
String demoVideoPath = null;
String vkLogPath = null;
LoadJNI vk;
private final int STOP_TRANSCODING_MSG = -1;
private final int FINISHED_TRANSCODING_MSG = 0;
private boolean commandValidationFailedFlag = false;
Button button;
VideoView videoView;
private static final int PICK_FROM_GALLERY = 1;
private void runTranscodingUsingLoader() {
Log.i(Prefs.TAG, "runTranscodingUsingLoader started...");
PowerManager powerManager = (PowerManager)MainActivity.this.getSystemService(Activity.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
Log.d(Prefs.TAG, "Acquire wake lock");
wakeLock.acquire();
String[] complexCommand = {"ffmpeg","-y" ,"-i", "/sdcard/videokit/in.mp4","-strict","experimental",
"-vf", "movie=/sdcard/videokit/watermark.png [watermark];" +
" [in][watermark] overlay=main_w-overlay_w-10:10 [out]","-s",
"320x240","-r", "30", "-b", "15496k", "-vcodec", "mpeg4","-ab",
"48000", "-ac", "2", "-ar", "22050", "/sdcard/videokit/out1.mp4"};
///////////////////////////////////////////////////////////////////////
vk = new LoadJNI();
try {
// running complex command with validation
vk.run(complexCommand, workFolder, getApplicationContext());
// running without command validation
//vk.run(complexCommand, workFolder, getApplicationContext(), false);
// running regular command with validation
//vk.run(GeneralUtils.utilConvertToComplex(commandStr), workFolder, getApplicationContext());
Log.i(Prefs.TAG, "vk.run finished.");
// copying vk.log (internal native log) to the videokit folder
GeneralUtils.copyFileToFolder(vkLogPath, demoVideoFolder);
} catch (CommandValidationException e) {
Log.e(Prefs.TAG, "vk run exeption.", e);
commandValidationFailedFlag = true;
} catch (Throwable e) {
Log.e(Prefs.TAG, "vk run exeption.", e);
}
finally {
if (wakeLock.isHeld()) {
wakeLock.release();
Log.i(Prefs.TAG, "Wake lock released");
}
else{
Log.i(Prefs.TAG, "Wake lock is already released, doing nothing");
}
}
// finished Toast
String rc = null;
if (commandValidationFailedFlag) {
rc = "Command Vaidation Failed";
}
else {
rc = GeneralUtils.getReturnCodeFromLog(vkLogPath);
}
final String status = rc;
MainActivity.this.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(MainActivity.this, status, Toast.LENGTH_LONG).show();
if (status.equals("Transcoding Status: Failed")) {
Toast.makeText(MainActivity.this, "Check: " + vkLogPath + " for more information.", Toast.LENGTH_LONG).show();
}
}
});
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button) findViewById(R.id.button);
videoView = (VideoView) findViewById(R.id.videoview);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setType("video/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Complete action using"), PICK_FROM_GALLERY);
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
if (requestCode == PICK_FROM_GALLERY) {
Uri mVideoURI = data.getData();
videoView.setVideoURI(mVideoURI);
videoView.start();
demoVideoFolder = mVideoURI.getPath();
demoVideoPath = demoVideoFolder;
savevideo(mVideoURI);
}
}
private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
Log.i(Prefs.TAG, "Handler got message");
if (progressBar != null) {
progressBar.dismiss();
// stopping the transcoding native
if (msg.what == STOP_TRANSCODING_MSG) {
Log.i(Prefs.TAG, "Got cancel message, calling fexit");
vk.fExit(getApplicationContext());
}
}
}
};
public void runTranscoding() {
progressBar = new ProgressDialog(MainActivity.this);
progressBar.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressBar.setTitle("FFmpeg4Android Direct JNI");
progressBar.setMessage("Press the cancel button to end the operation");
progressBar.setMax(100);
progressBar.setProgress(0);
progressBar.setCancelable(false);
progressBar.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.sendEmptyMessage(STOP_TRANSCODING_MSG);
}
});
progressBar.show();
new Thread() {
public void run() {
Log.d(Prefs.TAG,"Worker started");
try {
//sleep(5000);
runTranscodingUsingLoader();
handler.sendEmptyMessage(FINISHED_TRANSCODING_MSG);
} catch(Exception e) {
Log.e("threadmessage",e.getMessage());
}
}
}.start();
// Progress update thread
new Thread() {
ProgressCalculator pc = new ProgressCalculator(vkLogPath);
public void run() {
Log.d(Prefs.TAG,"Progress update started");
int progress = -1;
try {
while (true) {
sleep(300);
progress = pc.calcProgress();
if (progress != 0 && progress < 100) {
progressBar.setProgress(progress);
}
else if (progress == 100) {
Log.i(Prefs.TAG, "==== progress is 100, exiting Progress update thread");
pc.initCalcParamsForNextInter();
break;
}
}
} catch(Exception e) {
Log.e("threadmessage",e.getMessage());
}
}
}.start();
}
public void savevideo (Uri mVideoURI){
demoVideoFolder = mVideoURI.getPath();
demoVideoPath = demoVideoFolder;
Log.i(Prefs.TAG, getString(R.string.app_name) + " version: " + GeneralUtils.getVersionName(getApplicationContext()));
Button invoke = (Button) findViewById(R.id.button);
invoke.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Log.i(Prefs.TAG, "run clicked.");
runTranscoding();
}
});
workFolder = getApplicationContext().getFilesDir() + "/";
Log.i(Prefs.TAG, "workFolder (license and logs location) path: " + workFolder);
vkLogPath = workFolder + "vk.log";
Log.i(Prefs.TAG, "vk log (native log) path: " + vkLogPath);
GeneralUtils.copyLicenseFromAssetsToSDIfNeeded(this, workFolder);
GeneralUtils.copyDemoVideoFromAssetsToSDIfNeeded(this, demoVideoFolder);
int rc = GeneralUtils.isLicenseValid(getApplicationContext(), workFolder);
Log.i(Prefs.TAG, "License check RC: " + rc);
}
}ffmpeg command :
String[] complexCommand = {"ffmpeg","-y" ,"-i", "/sdcard/videokit/in.mp4","-strict","experimental",
"-vf", "movie=/sdcard/videokit/watermark.png [watermark];" +
" [in][watermark] overlay=main_w-overlay_w-10:10 [out]","-s",
"320x240","-r", "30", "-b", "15496k", "-vcodec", "mpeg4","-ab",
"48000", "-ac", "2", "-ar", "22050", "/sdcard/videokit/out1.mp4"};Tis command is from a sample project. How do i pass the video path to this command ? I do not know how to edit the command to support my requirement. Can someone guide me through this. Any help will be really helpful. Thank you.
-
Game Music Appreciation, One Year Later
1er août 2013, par Multimedia Mike — GeneralI released my game music website last year about this time. It was a good start and had potential to grow in a lot of directions. But I’m a bit disappointed that I haven’t evolved it as quickly as I would like to. I have made a few improvements, like adjusting the play lengths of many metadata-less songs and revising the original atrocious design of the website using something called Twitter Bootstrap (and, wow, once you know what Bootstrap is, you start noticing it everywhere on the modern web). However, here are a few of the challenges that have slowed me down over the year :
Problems With Native Client – Build System
The technology which enables this project — Google’s Native Client (NaCl) — can be troublesome. One of my key frustrations with the environment is that every single revision of the NaCl SDK seems to adopt a completely new build system layout. If you want to port your NaCl project forward to newer revisions, you have to spend time wrapping your head around whatever the favored build system is. When I first investigated NaCl, I think it was using vanilla GNU Make. Then it switched to SCons. Then I forgot about NaCl for about a year and when I came back, the SDK had reverted back to GNU Make. While that has been consistent, the layout of the SDK sometimes changes and a different example Makefile shows the way.The very latest version of the API has required me to really overhaul the Makefile and to truly understand the zen of Makefile programming. I’m even starting to grasp the relationship it has to functional programming.
Problems With Native Client – API Versions and Chrome Bugs
I built the original Salty Game Music Player when NaCl API version 16 was current. By the time I published the v16 version, v19 was available. I made the effort to port forward (a few APIs had superfically changed, nothing too dramatic). However, when I would experiment with this new player, I would see intermittent problems on my Windows 7 desktop. Because of this, I was hesitant to make a new player release.Around the end of May, I started getting bug reports from site users that their Chrome browsers weren’t allowing them to activate the Salty Game Music Player — the upshot was that they couldn’t play music unless they manually flipped a setting in their browser configuration. It turns out that Chrome 27 introduced a bug that caused this problem. Not only that, but my player was one of only 2 known NaCl apps that used the problematic feature (the other was developed by the Google engineer who entered the bug).
After feeling negligent for a long while about not doing anything to fix the bug, I made a concerted and creative effort to work around the bug and pushed out a new version of the player (based on API v25). My effort didn’t work and I had to roll it back somewhat (but still using the new player binaries). The bug was something that I couldn’t work around. However, at about the same time that I was attempting to do this, Google was rolling out Chrome 28 which fixed the bug, rendering my worry and effort moot.
Problems With Native Client – Still Not In The Clear
I felt reasonably secure about releasing the updated player since I couldn’t make my aforementioned problem occur on my Windows 7 setup anymore. I actually have a written test plan for this player, believe it or not. However, I quickly started receiving new bug reports from Windows users. Mostly, these are Windows 8 users. The player basically doesn’t work at all for them now. One user reports the problem on Windows 7 (and another on Windows 2008 Server, I think). But I can’t see it.I have a theory about what might be going wrong, but of course I’ll need to test it, and determine how to fix it.
Database Difficulties
The player is only half of the site ; the other half is the organization of music files. Working on this project has repeatedly reminded me of my fundamental lack of skill concerning databases. I have a ‘production’ database– now I’m afraid to do anything with it for fear of messing it up. It’s an an SQLite3 database, so it’s easy to make backups and to create a copy in order to test and debug a new script. Still, I feel like I’m missing an entire career path worth of database best practices.There is also the matter of ongoing database maintenance. There are graphical frontends for SQLite3 which make casual updates easier and obviate the need for anything more sophisticated (like a custom web app). However, I have a slightly more complicated database entry task that I fear will require, well, a custom web app in order to smoothly process hundreds, if not thousands of new song files (which have quirks which prohibit the easy mass processing I have been able to get away with so far).
Going Forward
I remain hopeful that I’ll gradually overcome these difficulties. I still love this project and I have received nothing but positive feedback over the past year (modulo the assorted recommendations that I port the entire player to pure JavaScript).You would think I would learn a lesson about building anything on top of a Google platform in the future, especially Native Client. Despite all this, I have another NaCl project planned.
-
10 Customer Segments Examples and Their Benefits
9 mai 2024, par Erin