Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (75)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (10801)

  • Trying to choose first audio stream of specific language in ffmpeg using python

    3 avril 2024, par R41D

    I have .mkv files that some of them have more than 1 audio stream in the same language so i need to first map the audio streams with specific language and then use only first of them to output .mp4 file. So it would need two -map audio arguments which doesn't work in ffmpeg.

    


    I found out that i could execute ffmpeg mapping audio with that specific language and then pipe the output to another ffmpeg command that would take the first audio stream from the first ffmpeg command and do the rest of things (scaling, burning-in subtitles, encoding it to different format), but i'm not sure how to pipe that output in python's Popen and if it is even possible in windows.

    


    The solution i found with piping :
FFMPEG Pick First Audio Stream of Specific Language

    


  • A C language ffmpeg project organized with CMakeLists, encounters errors in the Windows MinGW64 environment

    20 juin 2023, par flywen

    Project Structure

    


    ffmpeg-tutorial

    


      

    • include

        

      • libavcodec
      • 


      • libavdevice
      • 


      • libavfilter
      • 


      • libavformat
      • 


      • libavutil
      • 


      • libswresample
      • 


      • libswscale
      • 


      


    • 


    • lib

        

      • pkgconfig
      • 


      • libavcodec.a
      • 


      • libavdevice.a
      • 


      • libavfilter.a
      • 


      • libformat.a
      • 


      • libavutil.a
      • 


      • libswresample.a
      • 


      • libswscale.a
      • 


      


    • 


    • CMakeLists.txt
    • 


    • main.c
    • 


    


    CMakeLists.txt

    


    cmake_minimum_required(VERSION 3.20)
project(ffmpeg_tutorial)

set(CMAKE_C_STANDARD 11)

include_directories(include)
link_directories(lib)
add_executable(ffmpeg_tutorial main.cpp)
target_link_libraries(ffmpeg_tutorial
        avformat
        avcodec
        avutil
        swscale
        swresample
        z
        bz2
        iconv
        ws2_32
        schannel
        kernel32
        advapi32
        kernel32
        user32
        gdi32
        winspool
        shell32
        ole32
        oleaut32
        uuid
        comdlg32
        advapi32
        )


    


    main.c

    


    #include 
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libswresample/swresample.h"
int main() {
    std::cout << "Hello, World!" << std::endl;
    std::cout << av_version_info() << std::endl;
    printf("ffmpeg version is %s\n", av_version_info());
    // Open input file
    AVFormatContext *inputContext = nullptr;
    if (avformat_open_input(&inputContext, "input.mp3", nullptr, nullptr) != 0) {
        printf("Couldn't open input file\n");
        return -1;
    }

    // Read input stream
    if (avformat_find_stream_info(inputContext, nullptr) < 0) {
        printf("Couldn't find stream information\n");
        return -1;
    }

    // Get audio stream index
    int audioStream = -1;
    for (int i = 0; i < inputContext->nb_streams; i++) {
        if (inputContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
            audioStream = i;
            break;
        }
    }

    if (audioStream == -1) {
        printf("Couldn't find audio stream\n");
        return -1;
    }
}



    


    IDE

    


    clion

    


    ERRORS

    


    [ 50%] Building CXX object CMakeFiles/ffmpeg_tutorial.dir/main.cpp.obj
[100%] Linking CXX executable ffmpeg_tutorial.exe
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavformat.a(tls_schannel.o): in function `tls_write':
D:\Msys64\usr\src\ffmpeg/libavformat/tls_schannel.c:563: undefined reference to `EncryptMessage'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavformat.a(tls_schannel.o): in function `tls_read':
D:\Msys64\usr\src\ffmpeg/libavformat/tls_schannel.c:441: undefined reference to `DecryptMessage'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavcodec.a(mfenc.o):mfenc.c:(.rdata$.refptr.IID_ICodecAPI[.refptr.IID_ICodecAPI]+0x0): undefined reference to `IID_ICodecAPI'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavcodec.a(tiff.o): in function `tiff_uncompress_lzma':
D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:577: undefined reference to `lzma_stream_decoder'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:582: undefined reference to `lzma_code'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:583: undefined reference to `lzma_end'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavutil.a(random_seed.o): in function `av_get_random_seed':
D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:127: undefined reference to `BCryptOpenAlgorithmProvider'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:130: undefined reference to `BCryptGenRandom'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:131: undefined reference to `BCryptCloseAlgorithmProvider'
collect2.exe: error: ld returned 1 exit status
mingw32-make[3]: *** [CMakeFiles\ffmpeg_tutorial.dir\build.make:95: ffmpeg_tutorial.exe] Error 1
mingw32-make[2]: *** [CMakeFiles\Makefile2:82: CMakeFiles/ffmpeg_tutorial.dir/all] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:89: CMakeFiles/ffmpeg_tutorial.dir/rule] Error 2
mingw32-make: *** [Makefile:123: ffmpeg_tutorial] Error 2


    


    What is the way I compile ffmpeg

    


      

    • downlaod msys2

      


    • 


    • install mingw64

      


    • 


    


    pacman -S mingw-w64-x86_64-toolchain


    


      

    • install make,diffutils,nasm,yasm,pkg-config

      


    • 


    


    pacman -S base-devl yasm nasm pkg-config


    


      

    • download ffmpeg 5.1

      


    • 


    • compile

      


    • 


    


    cd ffmpeg
./configure --disable-shared --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config-flags=--static --prefix=../ffmpeg-build

make -j $(nproc)

make install



    


    Project Repoistory

    


    https://github.com/joinwen/learn_ffmpeg.git

    


    Expectation

    


      

    1. How to solve errors
    2. 


    3. In CMakeLists target_link_libraries's parameters is too much, Can I make it short
    4. 


    5. some advices on the project
    6. 


    


  • doc/developer.texi : update the language feature section

    14 novembre 2022, par Anton Khirnov
    doc/developer.texi : update the language feature section
    

    It is currently very out of touch with reality.

    * declare we are using C99 fully, rather than C90 plus extensions
    * mention our use of stdatomic.h
    * mention forbidden C99 features, like VLAs and complex numbers

    • [DH] doc/developer.texi