
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (51)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
Sur d’autres sites (6524)
-
Add overlay but output has wrong audio
16 septembre 2017, par xuan hoangffmpeg -i Knight.mp4 -i "4h.mp4" -filter_complex "scale=854:480 [v1]; [1:v][v1]overlay=20:20" output.mp4
But
output.mp4
not haveKnight.mp4
audio. -
Add overlay video but Other video not audio
5 septembre 2017, par xuan hoangffmpeg -i Kight.mp4 -i "4h.mp4" -filter_complex "scale=854:480 [v1]; [1:v][v1]overlay=20:20" output.mp4
But output.mp4 not have Knight.mp4 audio
-
FFMPEG filter is not implementing
31 août 2017, par Alok Kumar VermaI’m using FFMPEG for applying and saving the file to the specified path. Since I’m new to FFMPEG so I’ve followed this link to import the FFMPEG libraries inside my project.
FFMPEG libraries are working fine inside my project. Now I’ve followed FFMPEG Commands link for applying filters using commands. For now i’m using vintage filter command to check whether it is working or not
I’ve followed FFMPEG Project in Android link to apply the filters and save it to my storage path.
I’m using a file from my storage path to apply filter for the same and saving them inside the specified path. The problem is that the command is implementing(doubtful) but no file is getting saved with the filters, nor I get any exception or any error in my logcat. I"m very doubtful whether what is being left to get the desired result.
This is my code where I’m using the FFMPEG for applying filters and saving them in the specified path.
FilterAcitivity.java
public class FilterActivity extends AppCompatActivity {
private ArrayList<string> videoReceiveddata = null;
private EPlayerView ePlayerView;
private StringBuilder stringBuilder;
private DataSource.Factory dataSourceFactory;
private ExtractorsFactory extractorsFactory;
private Button play,stop,noneFilter,faded,noir,instant;
private FFmpeg fFmpeg;
private int choice = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_filter);
Bundle videoExtras = getIntent().getExtras();
videoReceiveddata = videoExtras.getStringArrayList("sendData");
Log.e("RECEIVED_VIDEO====", videoReceiveddata.toString());
stringBuilder = new StringBuilder();
for(String path : videoReceiveddata){
stringBuilder.append(path);
}
//laoding the ffmpeg binary files
loadFFMEPGBinary();
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
TrackSelection.Factory videoTrackSelectionFactory =
new AdaptiveTrackSelection.Factory(bandwidthMeter);
TrackSelector trackSelector =
new DefaultTrackSelector(videoTrackSelectionFactory);
// Measures bandwidth during playback. Can be null if not required.
DefaultBandwidthMeter defaultBandwidthMeter = new DefaultBandwidthMeter();
// Produces DataSource instances through which media data is loaded.
dataSourceFactory = new DefaultDataSourceFactory(getApplicationContext(),
Util.getUserAgent(getApplicationContext(), "TestApp"), defaultBandwidthMeter);
// Produces Extractor instances for parsing the media data.
extractorsFactory = new DefaultExtractorsFactory();
// This is the MediaSource representing the media to be played.
MediaSource videoSource = new ExtractorMediaSource(Uri.parse(stringBuilder.toString()),
dataSourceFactory, extractorsFactory, null, null);
// 2. Create the player
final SimpleExoPlayer player =
ExoPlayerFactory.newSimpleInstance(getApplicationContext(), trackSelector);
player.prepare(videoSource);
ePlayerView = (EPlayerView) findViewById(R.id.ePlayer);
ePlayerView.setSimpleExoPlayer(player);
ePlayerView.onResume();
play = (Button) findViewById(R.id.playButton);
stop = (Button) findViewById(R.id.stopButton);
faded = (Button) findViewById(R.id.fadedFilter);
noneFilter = (Button) findViewById(R.id.noFilter);
noir = (Button) findViewById(R.id.noirFilter);
instant = (Button) findViewById(R.id.instantFilter);
play.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MediaSource videoSource = new ExtractorMediaSource(Uri.parse(stringBuilder.toString()),
dataSourceFactory, extractorsFactory, null, null);
player.prepare(videoSource);
player.setPlayWhenReady(true);
}
});
stop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
player.stop();
}
});
noneFilter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
choice = 1;
ePlayerView.setGlFilter(new GlFilter());
}
});
faded.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
choice = 2;
ePlayerView.setGlFilter(new GlSepiaFilter());
Log.e("Filter Applied",ePlayerView.toString());
Log.e("Filter Applied====",stringBuilder.toString());
}
});
}
//loading binary of ffmpeg
private void loadFFMEPGBinary() {
try {
if (fFmpeg == null) {
Log.e("TEST=====", "ffmpeg : null");
fFmpeg = FFmpeg.getInstance(this);
}
fFmpeg.loadBinary(new LoadBinaryResponseHandler() {
@Override
public void onFailure() {
showUnsupportedExceptionDialog();
}
@Override
public void onSuccess() {
Log.d("TESTAPP====", "ffmpef : coorect loaded");
}
});
} catch (FFmpegNotSupportedException e) {
showUnsupportedExceptionDialog();
} catch (Exception e) {
Log.d("TESTAPP=====", "Exception not supported" + e);
}
}
private void showUnsupportedExceptionDialog() {
new AlertDialog.Builder(FilterActivity.this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("Not Supported")
.setMessage("Device Not Supported")
.setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
FilterActivity.this.finish();
}
})
.create()
.show();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.filter_menu,menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.save:
if(choice == 1){
addThatFilter();
}else if(choice == 2){
Toast.makeText(getApplicationContext(),"No filter",
Toast.LENGTH_SHORT).show();
}
default:
return super.onOptionsItemSelected(item);
}
}
private void addThatFilter() {
String savingPath = Environment.getExternalStorageDirectory().getAbsolutePath().toString()
+ "/FilterVideo.mp4";
String complexCommand = "ffmpeg -y -i"+ stringBuilder.toString() +"-strict experimental -vf " +
"curves=vintage -s 640x480 -r 30 -aspect 4:3 -ab 48000 -ac 2 -ar 22050 -b 2097k -vcodec " +
savingPath;
execFFMPEGBinary(complexCommand);
}
private void execFFMPEGBinary( final String complexCommand) {
try{
fFmpeg.execute(new String[]{complexCommand}, new ExecuteBinaryResponseHandler(){
@Override
public void onFailure(String message) {
Log.e("Failed with output", message);
}
@Override
public void onSuccess(String message) {
Toast.makeText(getApplicationContext(),"Success!",Toast.LENGTH_SHORT)
.show();
}
});
}catch (FFmpegCommandAlreadyRunningException e){
//do nothing
}
} }
</string>