Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (28)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (7596)

  • MPEG-2 AAC frame-by-frame audio decoding

    3 mai 2018, par Jonathan May

    I have individual audio frames encoded in MPEG-2 AAC. Each frame consists of 1024 16 bit PCM samples.

    I notice that each AAC frame is a different size. I assume this is a result of the MPEG-2 AAC compression algorithm and perfectly normal.

    I need a way to decode a single frame and get back the original 1024 PCM samples (with error from lossy compression, that’s fine).

    I couldn’t find information about the MPEG-2 AAC algorithm ANYWHERE online. It’s kinda nuts.

    I’ve been trying a crude work around using a library called pydub, which contains a few methods which use FFMPEG’s AAC decoder. Trying to load the audio frame as an AudioSegment using AAC encoding :

    audioData = BytesIO(frame)
    sound = AudioSegment.from_file(audioData, format="aac")

    gives the following error :

    [aac @ 000002d444c1aa00] Estimating duration from bitrate, this may be inaccurate\r\n
    Input #0, aac, from 'C:\\Users\\jmk_m\\AppData\\Local\\Temp\\tmpjl3x0xao':\r\n
     Duration: 00:00:00.19, bitrate: 23 kb/s\r\n
    Stream #0:0: Audio: aac (LC), 22050 Hz, mono, fltp, 23 kb/s\r\nStream mapping:\r\n
    Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))\r\n
    Press [q] to stop, [?] for help\r\n
    Output #0, wav, to 'C:\\Users\\jmk_m\\AppData\\Local\\Temp\\tmpxmp942e4':\r\n
    Metadata:\r\n
    ISFT            : Lavf58.10.100\r\n
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s\r\n
    Metadata:\r\n      encoder         : Lavc58.13.100 pcm_s16le\r\n
    [aac @ 000002d444cc7480] Reserved bit set.\r\n
    [aac @ 000002d444cc7480] Prediction is not allowed in AAC-LC.\r\n
    Error while decoding stream #0:0: Invalid data found when processing input\r\n
    [aac @ 000002d444cc7480] Reserved bit set.\r\n
    [aac @ 000002d444cc7480] Prediction is not allowed in AAC-LC.\r\n
    Error while decoding stream #0:0: Invalid data found when processing input\r\n
    [aac @ 000002d444cc7480] Prediction is not allowed in AAC-LC.\r\n
    Error while decoding stream #0:0: Invalid data found when processing input\r\n
    size=       2kB time=00:00:00.04 bitrate= 366.2kbits/s speed=5.45x    \r\n
    video:0kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.808594%\r\n
    Conversion failed!\r\n"

    If anyone has any insights as to what may be causing the error, or any alternative approaches, that’d be greatly appreciated !

  • Reading JPEG in ffmpeg

    23 octobre 2012, par Paul Lammertsma

    I'm trying to get ffmpeg to encode several individual JPEG images into a video on Android. I've successfully built it for Android (see the configuration string at the end of this post).

    I can encode an h.263+ video with randomly generated frame content, and ffmpeg otherwise appears to work well.

    A similar question suggests that the following code should be sufficient to load an image into an AvFrame :

    // Make sure we have the codecs
    av_register_all();

    AVFormatContext *pFormatCtx;
    int ret = av_open_input_file(&pFormatCtx, imageFileName, NULL, 0, NULL);

    if (ret != 0) {
       printf("Can't open image file '%s': code %d, %s",
           imageFileName, ret, strerror(AVERROR(ret)));
    }

    The above returns the correct absolute file path and error :

    Failed '/sdcard/DCIM/Camera/IMG083.jpg' : code -1094995529, Unknown error : 1094995529

    Incidentally, if I omit av_register_all(), it returns with error 2.

    I've compiled ffmpeg with the following arguments :

    ./configure —target-os=linux
    —prefix=$PREFIX
    —enable-cross-compile
    —extra-libs="-lgcc"
    —arch=arm
    —cc=$PREBUILT/bin/arm-linux-androideabi-gcc
    —cross-prefix=$PREBUILT/bin/arm-linux-androideabi-
    —nm=$PREBUILT/bin/arm-linux-androideabi-nm
    —sysroot=$PLATFORM
    —extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS "
    —enable-shared
    —enable-static
    —extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
    —disable-everything
    —enable-demuxer=mov
    —enable-demuxer=h264
    —disable-ffplay
    —enable-protocol=file
    —enable-avformat
    —enable-avcodec
    —enable-decoder=mjpeg
    —enable-decoder=png
    —enable-parser=h264
    —enable-encoder=h263
    —enable-encoder=h263p
    —disable-network
    —enable-zlib
    —disable-avfilter
    —disable-avdevice

    Any suggestions would be most welcome !

  • Reading JPEG in ffmpeg

    16 juillet 2021, par Paul Lammertsma

    I'm trying to get ffmpeg to encode several individual JPEG images into a video on Android. I've successfully built it for Android (see the configuration string at the end of this post).

    



    I can encode an h.263+ video with randomly generated frame content, and ffmpeg otherwise appears to work well.

    



    A similar question suggests that the following code should be sufficient to load an image into an AvFrame :

    



    // Make sure we have the codecs
av_register_all();

AVFormatContext *pFormatCtx;
int ret = av_open_input_file(&pFormatCtx, imageFileName, NULL, 0, NULL);

if (ret != 0) {
    printf("Can't open image file '%s': code %d, %s",
        imageFileName, ret, strerror(AVERROR(ret)));
}


    



    The above returns the correct absolute file path and error :

    



    


    Failed '/sdcard/DCIM/Camera/IMG083.jpg' : code -1094995529, Unknown error : 1094995529

    


    



    Incidentally, if I omit av_register_all(), it returns with error 2.

    



    I've compiled ffmpeg with the following arguments :

    



    

    


    ./configure —target-os=linux 
 —prefix=$PREFIX 
 —enable-cross-compile 
 —extra-libs="-lgcc" 
 —arch=arm 
 —cc=$PREBUILT/bin/arm-linux-androideabi-gcc 
 —cross-prefix=$PREBUILT/bin/arm-linux-androideabi- 
 —nm=$PREBUILT/bin/arm-linux-androideabi-nm 
 —sysroot=$PLATFORM 
 —extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " 
 —enable-shared 
 —enable-static 
 —extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" 
 —disable-everything 
 —enable-demuxer=mov 
 —enable-demuxer=h264 
 —disable-ffplay 
 —enable-protocol=file 
 —enable-avformat 
 —enable-avcodec 
 —enable-decoder=mjpeg 
 —enable-decoder=png 
 —enable-parser=h264 
 —enable-encoder=h263 
 —enable-encoder=h263p 
 —disable-network 
 —enable-zlib 
 —disable-avfilter 
 —disable-avdevice

    


    


    



    Any suggestions would be most welcome !