
Recherche avancée
Autres articles (17)
-
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" ; -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (6091)
-
Visual Studio LNK2001 Error, despite using extern "C" for ffmpeg libraries in C++ [duplicate]
1er février 2020, par Faizan CassimThis is what it looks like :
’’’
extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"
};’’’
But I still get these errors when using the FFmpeg libraries in Visual Studio 2019
1>AudioFile.obj : error LNK2001: unresolved external symbol avformat_open_input
1>AudioFile.obj : error LNK2001: unresolved external symbol av_read_frame
1>AudioFile.obj : error LNK2001: unresolved external symbol av_free
1>AudioFile.obj : error LNK2001: unresolved external symbol av_get_sample_fmt_name
1>AudioFile.obj : error LNK2001: unresolved external symbol avformat_close_input
1>AudioFile.obj : error LNK2001: unresolved external symbol av_init_packet
1>AudioFile.obj : error LNK2001: unresolved external symbol avcodec_receive_frame
1>AudioFile.obj : error LNK2001: unresolved external symbol avcodec_open2
1>AudioFile.obj : error LNK2001: unresolved external symbol av_sample_fmt_is_planar
1>AudioFile.obj : error LNK2001: unresolved external symbol avcodec_close
1>AudioFile.obj : error LNK2001: unresolved external symbol av_get_bytes_per_sample
1>AudioFile.obj : error LNK2001: unresolved external symbol av_packet_unref
1>AudioFile.obj : error LNK2001: unresolved external symbol avformat_find_stream_info
1>AudioFile.obj : error LNK2001: unresolved external symbol av_find_best_stream
1>AudioFile.obj : error LNK2001: unresolved external symbol av_frame_allocI would be greatfull to anyone who could help me resolve this. I am using C++ for Windows.
-
Android Studio FFMPEG "Protocol not found"
26 novembre 2022, par Whitestripe7773I am trying to run ffmpeg with android studio, but when I try the following code it shows this error message :


E/mobile-ffmpeg : content ://media/external/video/media/68 : Protocol not found
E/mobile-ffmpeg : Did you mean file:content ://media/external/video/media/68 ?


This is my code :


inputVideo = "content://media/external/video/media/68"
videoTitle = "abc"
public void method(String inputVideo, String videoTitle) {
 String cmdLine = "-i " + inputVideo + " -vcodec libx265 -crf 28 file:" + videoTitle;
 FFmpeg.execute(cmdLine);
 }



I think that the 'content :' in inputVideo leads to the error but I don't know how I could fix it.
Already tried out the following :


- 

- Add 'file :' in front of inputVideo and videoTitle
- Removing 'content ://' from the string leads to not finding the file






-
java.lang.NoClassDefFoundError Android Studio Unity
26 juin 2017, par NestorajI’m having some troubles when I try to generate a library that contains another one in Android Studio. First of all I am using Android Studio 2.0 and Unity 5.3.4f1. What I want to do is integrate FFMpeg in Unity so I decided to create my own library that use FFMpeg library as an intermediary. The FFMpeg library is here.
To start I created a new empty project in Android Studio and inside of it, created a new module, which will be my library, using New->Module->Android Library and named it "ffmpegcodec". After that I opened build.gradle file inside the new module folder and paste :
compile 'com.writingminds:FFmpegAndroid:0.3.2'
inside dependencies brackets, and click Sync (It did not show any error).
After that create a new Java Class inside src/main/java/package-name/ and named it FFMpegCodec. Inside this paste this code :
public class FFMpegCodec {
private static FFmpeg ffmpeg;
private static Context context;
private static FFMpegCodec INSTANCE = null;
public FFMpegCodec(){
INSTANCE = this;
}
public static FFMpegCodec instance(){
if(INSTANCE == null){
INSTANCE = new FFMpegCodec();
}
return INSTANCE;
}
public void setContext(Context ctx){
this.context = ctx;
}
public void loadFFMpegBinary() {
try {
if (ffmpeg == null) {
ffmpeg = FFmpeg.getInstance(context);
}
ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
@Override
public void onFailure() {
Log.e("FFMPEG", "ffmpeg : NOT correct Loaded");
}
@Override
public void onSuccess() {
Log.e("FFMPEG", "ffmpeg : correct Loaded");
}
});
} catch (FFmpegNotSupportedException e) {
} catch (Exception e) {
}
}
public void execFFmpegCommand(final String[] command) {
try {
ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
@Override
public void onFailure(String s) {
Log.e("FFMPEG", "FAILED with output : " + s);
}
@Override
public void onSuccess(String s) {
Log.e("FFMPEG", "SUCCESS with output : " + s);
}
@Override
public void onProgress(String s) {
Log.e("FFMPEG", "Started command : ffmpeg " + command);
Log.e("FFMPEG", "progress : " + s);
}
@Override
public void onStart() {
Log.e("FFMPEG", "Started command : ffmpeg " + command);
}
@Override
public void onFinish() {
Log.e("FFMPEG", "Finished command : ffmpeg " + command);
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
// do nothing for now
}
}It basically generates an instance of FFmpeg and makes calls of ffmpeg commands.
Once I have my lib done I decided to test it in my project so I include my lib in my app graddle using :
compile project(':ffmpegcodec')
After that I just paste this code to my MainActivity :
public class MainActivity extends AppCompatActivity {
FFMpegCodec ffmpeg;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button execCommandButton = (Button) findViewById(R.id.execCommandButton);
ffmpeg = FFMpegCodec.instance();
execCommandButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(), "This is a Toast!!", Toast.LENGTH_SHORT).show();
ffmpeg.setContext(MainActivity.this);
ffmpeg.loadFFMpegBinary();
String []cmd = new String[1];
cmd[0] = "-version";
ffmpeg.execFFmpegCommand(cmd);
}
});
}After that, I run my project and when I press the button it returns that everythings its ok, showing ffmpeg version.
Once I have check that my lib works I decide to move it to Unity so copy the ffmpegcodec-realese.arr file inside ffmpegcodec/build/outputs/aar folder and paste it into my Unity project. Then I wrote an C# script to use my lib that contains this :using System;
using System.Runtime.InteropServices;
using UnityEngine;
using System.Collections;
using System.Diagnostics;
public class ScreenRecorder {
private AndroidJavaObject unityActivity = null;
private AndroidJavaObject captureObject = null;
// Use this for initialization
public ScreenRecorder () {
try{
using (AndroidJavaClass unityPlayerActivityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
unityActivity = unityPlayerActivityClass.GetStatic<androidjavaobject>("currentActivity");
}
AndroidJavaClass captureClass = new AndroidJavaClass ("com.promineostudios.ffmpegcodec.FFMpegCodec");
if (captureClass != null) {
captureObject = captureClass.CallStatic<androidjavaobject>("instance");
captureObject.Call("setContext", unityActivity);
captureObject.Call("loadFFMpegBinary");
}
}catch(Exception ex){
UnityEngine.Debug.Log(ex);
}
}
}
</androidjavaobject></androidjavaobject>The problems comes here. When I create a class instance using :
AndroidJavaClass captureClass = new AndroidJavaClass ("com.promineostudios.ffmpegcodec.FFMpegCodec");
It creates an instance correctly, and also when I create an object using :
captureObject = captureClass.CallStatic<androidjavaobject>("instance");
</androidjavaobject>But when I try to get access to FFMpeg library methods like in "setContext" it fails and returns this :
UnityEngine.AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/github/hiteshsondhi88/libffmpeg/FFmpeg;
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/github/hiteshsondhi88/libffmpeg/FFmpeg;
at com.promineostudios.ffmpegcodec.FFMpegCodec.loadFFMpegBinary(FFMpegAndroidCodec.java:39)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer$b.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.github.hiteshsondhi88.libffmpeg.FFmpeg" on path: DexPathList[[zip file "/data/app/com.promineostudios.ffmpegmodule-1/base.apk"],nativeLibraryDirectories=[/data/app/com.promineostudios.ffmpegmodule-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.promineostudios.ffmpegcodec.FFMpegCodec.loadFFMpegBinary(FFMpegAndroidCodec.java:39)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer$b.run(Unknown Source)I think that the problem is in when I export my lib into Unity but I do not know what is going wrong. If anybody could help me I will be really appreciated.
Thanks and excuse me for my English.