Recherche avancée

Médias (91)

Autres articles (33)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4776)

  • FFmpeg : "Invalid data found when processing input" when reading video from memory

    24 avril 2020, par Drawoceans

    I'm trying to read a mp4 video file from memory with C++ and FFmpeg library, but I got "Invalid data found when processing input" error. Here are my codes :

    



    #include <cstdio>&#xA;#include <fstream>&#xA;#include <filesystem>&#xA;&#xA;extern "C"&#xA;{&#xA;#include "libavformat/avformat.h"&#xA;#include "libavformat/avio.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;namespace fs = std::filesystem;&#xA;&#xA;struct VideoBuffer&#xA;{&#xA;    uint8_t* ptr;&#xA;    size_t size;&#xA;};&#xA;&#xA;static int read_packet(void* opaque, uint8_t* buf, int buf_size)&#xA;{&#xA;    VideoBuffer* vb = (VideoBuffer*)opaque;&#xA;    buf_size = FFMIN(buf_size, vb->size);&#xA;&#xA;    if (!buf_size) {&#xA;        return AVERROR_EOF;&#xA;    }&#xA;&#xA;    printf("ptr:%p size:%zu\n", vb->ptr, vb->size);&#xA;&#xA;    memcpy(buf, vb->ptr, buf_size);&#xA;    vb->ptr &#x2B;= buf_size;&#xA;    vb->size -= buf_size;&#xA;&#xA;    return buf_size;&#xA;}&#xA;&#xA;void print_ffmpeg_error(int ret)&#xA;{&#xA;    char* err_str = new char[256];&#xA;    av_strerror(ret, err_str, 256);&#xA;    printf("%s\n", err_str);&#xA;    delete[] err_str;&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    fs::path video_path = "test.mp4";&#xA;    ifstream video_file;&#xA;    video_file.open(video_path);&#xA;    if (!video_file) {&#xA;        abort();&#xA;    }&#xA;    size_t video_size = fs::file_size(video_path);&#xA;    char* video_ptr = new char[video_size];&#xA;    video_file.read(video_ptr, video_size);&#xA;    video_file.close();&#xA;&#xA;    VideoBuffer vb;&#xA;    vb.ptr = (uint8_t*)video_ptr;&#xA;    vb.size = video_size;&#xA;&#xA;    AVIOContext* avio = nullptr;&#xA;    uint8_t* avio_buffer = nullptr;&#xA;    size_t avio_buffer_size = 4096;&#xA;    avio_buffer = (uint8_t*)av_malloc(avio_buffer_size);&#xA;    if (!avio_buffer) {&#xA;        abort();&#xA;    }&#xA;&#xA;    avio = avio_alloc_context(avio_buffer, avio_buffer_size, 0, &amp;vb, read_packet, nullptr, nullptr);&#xA;&#xA;    AVFormatContext* fmt_ctx = avformat_alloc_context();&#xA;    if (!fmt_ctx) {&#xA;        abort();&#xA;    }&#xA;    fmt_ctx->pb = avio;&#xA;&#xA;    int ret = 0;&#xA;    ret = avformat_open_input(&amp;fmt_ctx, nullptr, nullptr, nullptr);&#xA;    if (ret &lt; 0) {&#xA;        print_ffmpeg_error(ret);&#xA;    }&#xA;&#xA;    avformat_close_input(&amp;fmt_ctx);&#xA;    av_freep(&amp;avio->buffer);&#xA;    av_freep(&amp;avio);&#xA;    delete[] video_ptr;&#xA;    return 0;&#xA;}&#xA;</filesystem></fstream></cstdio>

    &#xA;&#xA;

    And here is what I got :

    &#xA;&#xA;

    ptr:000001E10CEA0070 size:4773617&#xA;ptr:000001E10CEA1070 size:4769521&#xA;...&#xA;ptr:000001E10D32D070 size:1777&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e10caaeac0] moov atom not found&#xA;Invalid data found when processing input&#xA;

    &#xA;&#xA;

    FFmpeg version is 4.2.2, with Windows 10 and Visual Studio 2019 in x64 Debug mode. FFmpeg library is the Windows compiled shared library from FFmpeg homepage. Some codes are from official example avio_reading.c. Target MP4 file can be played normally by VLC player so I think the file is OK. Is anywhere wrong in my codes ? Or is it an FFmpeg library problem ?

    &#xA;

  • FFMpeg Concatenation Filters : Stream specifier ':0' in filtergraph matches no streams

    8 décembre 2018, par Anthony Eden

    I am developing an application that relies heavily on FFMpeg to perform various transformations on audio files. I am currently testing my FFMpeg configuration on the command line.

    I am trying to concatenate multiple audio files which are in different formats (Primarily MP3, MP2 & WAV). I have been using the official TRAC documentation (https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join%2C%20merge)%20media%20files#differentcodec) to help me with this and have created the following command :

    ffmpeg -i OHIn.wav -i OHOut.wav -filter_complex '[0:0] [1:0] concat=n=2:a=1 [a]' -map '[a]' output.wav

    However, when I run this on Mac OS X using version 2.0.1 of FFMpeg, I get the following error message :

    Stream specifier ':0' in filtergraph description [0:0] [1:0] concat=n=2:a=1 [a] matches no streams.

    Here is my full output from the terminal :

    ~/ffmpeg -i OHIn.wav -i OHOut.wav -filter_complex '[0:0] [1:0] concat=n=2:a=1 [a]' -map '[a]' output.wav

    ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
     built on Aug 15 2013 10:56:46 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect
     libavutil      52. 38.100 / 52. 38.100
     libavcodec     55. 18.102 / 55. 18.102
     libavformat    55. 12.100 / 55. 12.100
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 79.101 /  3. 79.101
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, wav, from 'OHIn.wav':
     Duration: 00:00:06.71, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Guessed Channel Layout for  Input Stream #1.0 : stereo
    Input #1, wav, from 'OHOut.wav':
     Duration: 00:00:07.19, bitrate: 1411 kb/s
       Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Stream specifier ':0' in filtergraph description [0:0] [1:0] concat=n=2:a=1 [a] matches no streams.

    I do not understand why this does not work. FFMpeg shows that the streams 0:0 and 1:0 exist in the source files. The only other similar problems online have surrounded the use of the single quote in Windows, however testing of this confirm it does not apply to my Mac command line.

    Any help would be much appreciated.

  • FFMpeg Android Stagefright SIGSEGV error (h264 decode)

    19 avril 2013, par Sergey Ochkur

    I need to decode h264 file to YUV on Android 2.3+. As I understand I need to communicate with Stagefright, as it`s the only way now, after closing access with OpenMAX IL implementations. I have used FFmpeg 0.10 (and tried 0.9/0.9.1..) for this issue, compiled it with NDK7 (and also tried NDK6b with the same result) :

     ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
     built on Jan 28 2012 14:42:37 with gcc 4.4.3
     configuration: --target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a --sysroot=/home/grid/Android/Android_NDK/platforms/android-9/arch-arm --disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-libstagefright-h264 --prefix=build/stagefright/armeabi-v7a --extra-cflags=&#39;-Iandroid-source/frameworks/base/include -Iandroid-source/system/core/include -Iandroid-source/frameworks/base/media/libstagefright -Iandroid-source/frameworks/base/include/media/stagefright/openmax -I/home/grid/Android/Android_NDK/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon&#39; --extra-ldflags=&#39;-Wl,--fix-cortex-a8 -Landroid-libs -Wl,-rpath-link,android-libs&#39; --extra-cxxflags=&#39;-Wno-multichar -fno-exceptions -fno-rtti&#39;
     libavutil      51. 34.101 / 51. 34.101
     libavcodec     53. 60.100 / 53. 60.100
     libavformat    53. 31.100 / 53. 31.100
     libavfilter     2. 60.100 /  2. 60.100
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0.  6.100 /  0.  6.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Hardware : Beagleboard-Xm + TI Android 2.3 (official)

    So, entering next command give me error with 480p :
    ffmpeg -i /sdcard/Video/480p.mp4

    Stopped (signal) ffmpeg -i /sdcard/Video/480p.mp4

    Full Android "answer" from ADB Logcat :
    http://pastebin.com/76JLgtXX

    Android-developers, does anybody know what this error means and how to deal with it ?
    I tried to make DSP window bigger, but with no luck.
    Commands like "stagefright /sdcard/Video/480p.mp4" works fine.

    P.S. Additionally I found that on some bigger files (720p) Android answers next :

    [libstagefright_h264 @ 0xd479b0] Decode failed : 80000000