Recherche avancée

Médias (91)

Autres articles (112)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP 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 (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (5739)

  • Return of FFMPEG in Background

    7 septembre 2018, par Bruno Andrade

    I am making a code that downloads a list of m3u8 links by FFMPEG

    I had this code :

    function FFMPEG($videocode, $dirvideo) {

       $ffmpeg = '"D:\FFMPEG\bin\ffmpeg.exe"' . " -hide_banner -loglevel verbose -n -i https://linkplaylist/{$videocode}.m3u8 -map 0:1 -map 0:2 -acodec copy -bsf:a aac_adtstoasc -vcodec copy {$dirvideo} 1> log.txt  2>&1";

       exec($ffmpeg, $output, $var);

       return $var;
    }

    $code = FFMPEG('football', 'football.mp4');

    if($code){
       {ERROR CODE};
       }else{

       {SUCCESS CODE}
    }  

    Initial problem

    And that worked well. I could download the video and know if it was downloaded completely or had some error.

    The problem is that this code "hangs" the script in exec () the page is loading until finalize exec () and that of timeout error (shared server) besides being visually strange to the visitor the page loading.

    Resolution of the initial problem

    After research I think the solution is to put the code execution in the background so I found this code :

    $descriptorspec = array(
      0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
      1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
      2 => array("file", "error-output.txt", "a") // stderr is a file to write to
    );

    function FFMPEG($videocode, $dirvideo) {
    $cmd = 'start /B D:\FFMPEG\bin\ffmpeg.exe  -y -i "https://linkplaylist/{$videocode}.m3u8" -map p:0 -acodec copy -bsf:a aac_adtstoasc -vcodec copy {$dirvideo}';
    proc_close(proc_open ($cmd
    ,$descriptorspec, $foo));
    }

    And finally my current problem

    And this works fine for the loading and timeout issue, but I can not get a return from when the download was successfully completed.

    1 ° proc_open Is this the best solution for my initial problem ?

    2 ° How can I get a return from when ffmpeg finishes running successfully and the script continues to flow.

    Extra Info

    I’m trying to build a solution that works on windows (xampp) but my final server is linux.

  • DirectX D3D11 Hardware Scaling Filter [closed]

    30 décembre 2024, par Dash Santosh

    I'm trying to implement a Hardware scaling filter (vf_scale_d3d11) using the VideoProcessBlt D3D11 DDI, and also add PIX_FMT_D3D11 support for the MediaFoundation Encoder (mfenc).

    


    Initially, there were a lot of "Static surface pool size exceeded".

    


    decode_receive_frame_internal failed = Invalid data found when processing input
Static surface pool size exceeded
get_buffer() failed
thread_get_buffer() failed
decode_slice_headec error
no frame!


    


    This got fixed by incrementing initial_pool_size by 3. Now the following two flows works as expected :

    


      

    1. ./ffmpeg.exe -hwaccel d3d11va -hwaccel_output_format d3d11 -hide_banner -i bbb_sunflower_2160p_30fps_normal.mp4 -hw_encoding 1 -c:v h264_mf -vframes 100 -loglevel verbose sample.mp4 -y
    2. 


    3. ./ffmpeg.exe -hwaccel d3d11va -hwaccel_output_format d3d11 -hide_banner -i bbb_sunflower_2160p_30fps_normal.mp4 -hw_encoding 1 -c:v h264_mf -vf "scale_d3d11=width=1920:height=1080" -vframes 100 -loglevel verbose sample.mp4 -y
    4. 


    


    When I try to call av_hwframe_transfer_data() within the if(encoder_requires_software_frame) block for the following flow, "Static surface pool size exceeded" occurs once again.

    


      

    1. ./ffmpeg.exe -hwaccel d3d11va -hwaccel_output_format d3d11 -hide_banner -i bbb_sunflower_2160p_30fps_normal.mp4 -c:v rawvideo -vframes 10 -loglevel verbose sample.yuv -y
    2. 


    


    Increasing the initial_pool_size to any higher value doesn't seem to resolve this issue. The same error can be observed when the changes are integrated in HandBrake application, even for use cases (1) and (2). Any insights on why this would occur and how to fix this would be appreciated. Link to patch : https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241230/ce28c8db/attachment.obj

    


  • Compile FFmpeg project for ARM in PC Linux 64-bits

    4 avril 2017, par Dang_Ho

    I want to compile a simple FFmpeg project for my Arrow Sockit Board with an arm-linux-gnueabihf architecture from my Linux-64bit PC. I don’t want to compile the project in the board directly because of my low CPU and that is not convenient for me.

    I’m using FFmpeg version 2.8.11 and this is my Makefile and my "main.c". I know, my Makefile has something wrong in it. If I command "make", it will compile depending on my PC’s architecture, I can’t use that binary file on my board. So, can someone please tell me how to do it.

    I Cross-Compiled the FFmpeg package and installed into the board. I tested all functions such as ffmpeg, ffplay. All them work. The source code folder is located to /home/hohaidang/ffmpeg-2.8.11

    #include
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>

    int main(int argc, char *argv[]){
            av_register_all();
            return 0;
    }
    # use pkg-config for getting CFLAGS and LDLIBS
    FFMPEG_LIBS=    libavdevice                        \
                   libavformat                        \
                   libavfilter                        \
                   libavcodec                         \
                   libswresample                      \
                   libswscale                         \
                   libavutil                          \

    CFLAGS += -Wall -g
    CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
    LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)

    EXAMPLES=       main

    OBJS=$(addsuffix .o,$(EXAMPLES))

    # the following examples make explicit use of the math library
    avcodec:           LDLIBS += -lm
    decoding_encoding: LDLIBS += -lm
    muxing:            LDLIBS += -lm
    resampling_audio:  LDLIBS += -lm

    .phony: all clean-test clean

    all: $(OBJS) $(EXAMPLES)

    clean-test:
            $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg

    clean: clean-test
            $(RM) $(EXAMPLES) $(OBJS)