
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (38)
-
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 -
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" (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (5796)
-
ffmpeg sequence of multiple filters syntax
5 juillet 2021, par otomarii am trying to use multiple filters in ffpmeg, but it does not allow more than one -af.
so, then i decided to try to do it with a -complex_filter.


sudo ffmpeg -f alsa -i default:CARD=Device \
 -filter_complex \
 "lowpass=5000,highpass=200; \
 volume=+5dB; \
 afftdn=nr=0.01:nt=w;" \
 -c:a libmp3lame -b:a 128k -ar 48000 -ac 1 -t 00:00:05 -y $recdir/audio_$(date '+%Y_%m_%d_%H_%M_%S').mp3



it must work, but for some reason i get an error :


Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'default:CARD=Device':
 Duration: N/A, start: 1625496748.441207, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[AVFilterGraph @ 0xaaab0a8b14e0] No such filter: ''
Error initializing complex filters.
Invalid argument



i have tried quotes and others, nothing helps..


-
How to manipulate a Uri as File in android
3 juin 2021, par Omid.NI am trying to use FFmpeg in android. As you know the framework no longer lets you to use absolute paths or open files freely even with WRITE_EXTERNAL_STORAGE permission :|

So, using the SAF, I get the file as an Uri, then I need to put it as an argument to ffmpeg to encode it but it only accepts file paths.

How can i achieve this ?


Note : There are some bad practices in my code but I hope we can ignore them for now because that's not the problem here :)


public class MainActivity extends AppCompatActivity {

 private static final int PICK_VIDEO_FILE = 2;

 private static final String TAG = "MainActivity";
 
 File theFile;
 TextView textView;

 @Override
 protected void onCreate(Bundle savedInstanceState) {


 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);

 textView = (TextView) findViewById(R.id.text_view);

 
 if (theFile == null) {
 openFile(Uri.fromFile(new File("/storage/emulated/0/")));
 }


 }

 @Override
 protected void onResume() {
 super.onResume();
 if (theFile !=null) {

 FFmpegSession fFmpegSession = FFmpegKit.executeAsync("-i " + theFile.getAbsolutePath()
 + " -c:v mpeg4 file:///storage/emulated/0/out.mp4",
 new ExecuteCallback() {
 @Override
 public void apply(Session session) {

 }
 });
 try {
 Thread.sleep(5000);
 } catch (InterruptedException e) {
 e.printStackTrace();
 }
 textView.setText("" + fFmpegSession.getState().name() + " " + fFmpegSession.getOutput());
 }
 }

 private void openFile(Uri pickerInitialUri) {
 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
 intent.addCategory(Intent.CATEGORY_OPENABLE);
 intent.setType("video/mp4");
 
 // Optionally, specify a URI for the file that should appear in the
 // system file picker when it loads.
 intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, pickerInitialUri);

 startActivityForResult(intent, PICK_VIDEO_FILE);
 }
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {

 super.onActivityResult(requestCode, resultCode, data);
 if (requestCode == PICK_VIDEO_FILE) {
 if (resultCode == RESULT_OK) {
 theFile = new File(data.getData().getPath());
 }
 }

 }




-
How to get a file converted by ffmpeg in Android : permission denied
2 juin 2021, par Omid.NI am trying to use FFmpeg in my android app. So I want to test it if it works before moving on. I use an external library : github link

The code looks like this :

package net.omidn.aslanmediaconverter;

import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.arthenica.ffmpegkit.ExecuteCallback;
import com.arthenica.ffmpegkit.FFmpegKit;
import com.arthenica.ffmpegkit.FFmpegSession;
import com.arthenica.ffmpegkit.Session;

import net.bramp.ffmpeg.job.FFmpegJob;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;


public class MainActivity extends AppCompatActivity {
 
 private static final String TAG = "MainActivity";
 FFmpegJob myjob;

 @Override
 protected void onCreate(Bundle savedInstanceState) {


 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);

 TextView textView = (TextView) findViewById(R.id.text_view);


 FFmpegJob job = null;

 File inFile = new File("/storage/emulated/0/video_2021-05-29_17-50-20.mp4");
 String inputName = Uri.fromFile(inFile).toString();
 Log.d(TAG, inputName);
 Log.d(TAG,"file exists : " + String.valueOf(inFile.exists()));
 Log.d(TAG,"file canRead : " + String.valueOf(inFile.canRead()));

 FFmpegSession fFmpegSession = FFmpegKit.executeAsync("-i file:///storage/emulated/0/video_2021-05-29_17-50-20.mp4 -c:v mpeg4 file:///storage/emulated/0/out.mp4",
 new ExecuteCallback() {
 @Override
 public void apply(Session session) {

 }
 });
 try {
 Thread.sleep(5000);
 } catch (InterruptedException e) {
 e.printStackTrace();
 }
 textView.setText("" + fFmpegSession.getState().name() + " " + fFmpegSession.getOutput());
 }

}




As you can see I give the files with
file:///
protocol. If I don't use that the resault is the same. The three lines ofLog.d(...)
will print :

2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file:///storage/emulated/0/video_2021-05-29_17-50-20.mp4
2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file exists : true
2021-06-03 00:58:08.869 8376-8376/net.omidn.aslanmediaconverter D/MainActivity: file canRead : false



The video file has read access on the storage :