
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 (39)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
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 (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6671)
-
How to link FFmpeg libraries with CMake in windows
4 juillet 2021, par ldall03I'm new to CMake and not very familiar with how linking/compiling works. I am on windows 10 using MinGW in CLion. As the title says I want to use FFmpeg libraries in my c++ code. I downloaded the source code from : https://ffmpeg.org/download.html (Download Source Code button). I unzipped it and put the libavcodec library in my project. Here is my project structure :


project
 \-- cmake-build-debug
 \-- src
 \-- vendor
 \-- libavcodec
 \-- main.cpp
 \--CMakeLists.txt



Here is my main.cpp file :


extern "C" {
#include "libavcodec/avcodec.h"
}

#include <iostream>

int main(int argc, char *argv[]) {
 std::cout << "Hello World\n";
 return 0;
}

</iostream>


And my CMakeLists.txt file :


cmake_minimum_required(VERSION 3.19)
project(VidShare)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_PREFIX_PATH "C:/Qt/6.1.1/mingw81_64/lib/cmake")

find_package(Qt6Widgets REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

add_executable(VidShare main.cpp)
include_directories(src src/vendor)
target_link_libraries(VidShare Qt6::Widgets Qt6::Core Qt6::Gui)



Ignore the Qt stuff it works fine.


And well when I build I get this error message :


fatal error: libavutil/avconfig.h: No such file or directory
 #include "libavutil/avconfig.h"



I've seen that I had to run a configure script in the FFmpeg main file but I'm on windows so I can't really do that. I don't know if I have to use other kinds of libraries or if I downloaded the wrong thing... I am really at lost here. There is probably a better or more convenient way of doing what I want but I could not find many resources on it... Help would be appreciated :)


-
Not able to link ffmpeg library in cython package
12 août 2020, par Sagar DonadkarI am using cython package to call Cpp API and in my cpp code i am using ffmpeg library when i try to build my code i got and linking issue
In header file add include ffmpeg header file to call ffmpeg library function


header file
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include <iostream>

extern "C"
{
 #include "libavformat/avformat.h"
 #include "libavutil/dict.h"
}

using namespace std;

namespace shapes 
{
 class Rectangle {
 public:
 int x0, y0, x1, y1;
 Rectangle();
 Rectangle(int x0, int y0, int x1, int y1);
 ~Rectangle();
 int getArea();
 int ffmpegFile();
 void getSize(int* width, int* height);
 void move(int dx, int dy);
 };
}

#endif
</iostream>


Rectangle.Cpp file in ffmpegFile() i am using ffmpeg example code to test ffmpeg my code where i call mostly ffmpeg API



#include <iostream>
#include "Rectangle.hpp"

namespace shapes {
 

 // Default constructor
 Rectangle::Rectangle () {}

 // Overloaded constructor
 Rectangle::Rectangle (int x0, int y0, int x1, int y1) {
 this->x0 = x0;
 this->y0 = y0;
 this->x1 = x1;
 this->y1 = y1;
 }

 // Destructor
 Rectangle::~Rectangle () {}

 // Return the area of the rectangle
 int Rectangle::getArea () {
 return 10;
 }

 // Get the size of the rectangle.
 // Put the size in the pointer args
 void Rectangle::getSize (int *width, int *height) {
 (*width) = x1 - x0;
 (*height) = y1 - y0;
 }

 // Move the rectangle by dx dy
 void Rectangle::move (int dx, int dy) {
 this->x0 += dx;
 this->y0 += dy;
 this->x1 += dx;
 this->y1 += dy;
 }
 int Rectangle::ffmpegFile()
 {
 AVFormatContext *fmt_ctx = NULL;
 AVDictionaryEntry *tag = NULL;
 int ret = 0;
 char* filename = "D:\\Discovery.mp4";

 if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)))
 return ret;

 if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
 av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
 return ret;
 }

 while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
 printf("%s=%s\n", tag->key, tag->value);

 avformat_close_input(&fmt_ctx);
 return ret;
 }
}
</iostream>


Rectangle.pxd file declaration for cpp file function and variable


cdef extern from "Rectangle.cpp":
 pass
cdef extern from "Rectangle.hpp" namespace "shapes":
 cdef cppclass Rectangle:
 Rectangle() except +
 Rectangle(int, int, int, int) except +
 int x0, y0, x1, y1
 int getArea()
 void getSize(int* width, int* height)
 void move(int, int)
 int ffmpegFile()



rect.pyx file i am calling cpp API form pyx file


# distutils: language = c++

from Rectangle cimport Rectangle

cdef class PyRectangle:
 cdef Rectangle c_rect # Hold a C++ instance which we're wrapping

 def __cinit__(self, int x0, int y0, int x1, int y1):
 self.c_rect = Rectangle(x0, y0, x1, y1)

 def get_area(self):
 return self.c_rect.getArea()

 def get_size(self):
 cdef int width, height
 self.c_rect.getSize(&width, &height)
 return width, height

 def move(self):
 print(self.c_rect.ffmpegFile())



setup.py
I provided pyx file and ffmpeg library path as well as include path


from setuptools import setup,Extension
from Cython.Build import cythonize 


directives={'linetrace':False, 'language_level':3}

setup(name = 'superfastcode', version = '1.0',
 description = 'Python Package with superfastcode C++ extension',
 ext_modules=cythonize([
 Extension(
 'demo',["rect.pyx"],
 include_dirs=['ffmpeg\\include'],)
 library_dirs=["ffmpeg\\lib"],
 libraries=["avcodec","avformat","avutil","swscale","avdevice","avfilter","postproc","swresample"]),
 
]))



getting below error


PS D:\SiVUE\Backend\Cython\demo> python setup.py build_ext --inplace
Compiling rect.pyx because it depends on .\Rectangle.pxd.
[1/1] Cythonizing rect.pyx
C:\python3.8\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: D:\SiVUE\Backend\Cython\demo\rect.pyx
 tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'demo' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Iffmpeg\include -IC:\python3.8\include -IC:\python3.8\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tprect.cpp /Fobuild\temp.win32-3.8\Release\rect.obj
rect.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:ffmpeg\lib /LIBPATH:C:\python3.8\libs /LIBPATH:C:\python3.8\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86" avcodec.lib avformat.lib avutil.lib swscale.lib avdevice.lib avfilter.lib postproc.lib swresample.lib /EXPORT:PyInit_demo build\temp.win32-3.8\Release\rect.obj /OUT:build\lib.win32-3.8\demo.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\demo.cp38-win32.lib
 Creating library build\temp.win32-3.8\Release\demo.cp38-win32.lib and object build\temp.win32-3.8\Release\demo.cp38-win32.exp
rect.obj : error LNK2001: unresolved external symbol _avformat_open_input
rect.obj : error LNK2001: unresolved external symbol _av_log
rect.obj : error LNK2001: unresolved external symbol _avformat_close_input
rect.obj : error LNK2001: unresolved external symbol _avformat_find_stream_info
rect.obj : error LNK2001: unresolved external symbol _av_dict_get
build\lib.win32-3.8\demo.cp38-win32.pyd : fatal error LNK1120: 5 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\link.exe' failed with exit status 1120



Thank You


-
How to link .so library on Android
9 juin 2014, par SayakiI’m trying to use FFMpeg with Android. First of all I have tryed to build FFMpeg on my Mac but I cant do that. I checked many solution on Internet but none working. Becouse of that I try to build FFMpeg on Ubuntu 12.04. I try a lot of solutions bu finally I found this example and I succeed build it. Then I get headers files and .so files. Then I copy all of them on my mac and try to use it in my project. I copy this files to my project. Now my project tree looks like this :
Here is my Android.mk file :
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := avformat
LOCAL_SRC_FILES := libavformat.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/libavformat
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ndksetup
LOCAL_SRC_FILES := native.c
LOCAL_LDLIBS := -llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)Here is my Application.mk file :
APP_MODULES := ndksetup
APP_PLATFORM := android-8
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libavformat.soHere is my natice.c file :
#include
#include
#include <android></android>log.h>
#include "include/libavcodec/avcodec.h"
#include "include/libavformat/avformat.h"
#define DEBUG_TAG "NDKSetupActivity"
void Java_com_example_ndksetup_MainActivity_printLog(JNIEnv *env, jobject this,
jstring logString) {
av_register_all();
jboolean isCopy;
const char * szLogString = (*env)->GetStringUTFChars(env, logString,
&isCopy);
__android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK: %s", szLogString);
(*env)->ReleaseStringUTFChars(env, logString, szLogString);
}
jint Java_com_example_ndksetup_MainActivity_fibonacci(JNIEnv * env,
jobject this, jint value) {
if (value <= 1)
return value;
return Java_com_example_ndksetup_MainActivity_fibonacci(env, this,
value - 1)
+ Java_com_example_ndksetup_MainActivity_fibonacci(env, this,
value - 2);
}I get error
[armeabi] SharedLibrary : libndksetup.so
/Applications/adt-bundle-mac-x86_64-20140321/sdk/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /Users/michal/Desktop/NDKSetup/obj/local/armeabi/objs/ndksetup/native.o: in function Java_com_example_ndksetup_MainActivity_printLog:/Users/michal/Desktop/NDKSetup/jni/native.c:11: error: undefined reference to 'av_register_all'
collect2: ld returned 1 exit status
make: *** [/Users/michal/Desktop/NDKSetup/obj/local/armeabi/libndksetup.so] Error 1And I really dont know how to deal with it. Can you tell me what Im dooing wrong and how can I fix it ? Or maybe there is another way to use .so library in Android