Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (60)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (6928)

  • FFMPEG Decoding - Memory Leak

    1er mai 2013, par Spamdark

    Developing an application for a test, I encountered an error. Meanwhile the packets were proccessed, I got a very horrible problem, a memory leak.

    The av_free_packet is applied correctly, I think (See the code). When I run the app, the memory grows up to 500MB meanwhile it's playing the audio file, that's not normal. VLC or WMplayer (Windows Media Player) just wastes 30/20mb reading that file.

    Here is the code :

    static AVPacket pkt;
    static uint8_t *audio_pkt_data = NULL;
    static int audio_pkt_size = 0;
    static AVFrame frame;
    static bool first_time = true;

    if(first_time){
       first_time=false;
    }

    int len1, data_size = 0;

    for(;;){
       bool do_rt = false;

       while(audio_pkt_size > 0){
           int obt_frame = 0;

           len1 = avcodec_decode_audio4(_audio_ccontext,&frame,&obt_frame,&pkt);
           if(len1 < 0){
               audio_pkt_size = 0;
               break;
           }
           audio_pkt_data+=len1;
           audio_pkt_size-=len1;
           if(obt_frame){
               data_size = av_samples_get_buffer_size(NULL,channel_count,sample_fr,_audio_ccontext->sample_fmt,1);
               memcpy((int16_t*)audio_buf,frame.data[0],data_size);

           }
           if(data_size <= 0){
               continue;
           }
           do_rt = true;
       }

       if(pkt.data){
           //MessageBox(0,"hi","Hi",MB_OK); // This is only for test if the app si reaching this av_free_packet
           av_free_packet(&pkt);
       }

       if(do_rt){
           return data_size;
       }

       // Try to get a new packet
       if(!audio_packets.empty()){
           WaitForSingleObject(Queue_Audio_Mutex,INFINITE);
               pkt = *audio_packets.front();
               audio_packets.pop();
           ReleaseMutex(Queue_Audio_Mutex);

           audio_pkt_size = pkt.size;
           audio_pkt_data = pkt.data;
       }else{
           return -1;
       }
    }
    return 0;
    }

    I would appreciate your help. Thank you very much.

  • FFmpeg "faststart" flag with images to video

    22 août 2016, par Calvin W.

    I am using MoviePy to process my video and stream it.

    In MoviePy, it decode the input file to a frames * width * heigh * 3 (RGB values) NumPy array. And when it encode the video, it pass the NumPy array frame by frame to standard input of ffmpeg.

    In order to stream the video on-the-fly, I have to move the video header to the front.

    Is it posible to use faststart flag with such video encoding ?

  • ffmpeg mapping to mkv introduces "fake" delay relative to video

    1er août 2016, par JMor

    I need to map this x.264 clip into a matroska container using ffmpeg :

    ffmpeg -i f-0.mp4 -c copy f-0.mkv

    Here is the ffmpeg console output :

    ffmpeg -i f-0.mp4 -c copy f-0.mkv  
    ffmpeg version N-69672-g078be09 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 18.100 / 54. 18.100
     libavcodec     56. 21.102 / 56. 21.102
     libavformat    56. 19.100 / 56. 19.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5.  9.104 /  5.  9.104
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'f-0.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.19.100
     Duration: 00:02:08.06, start: 0.005333, bitrate: 5030 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4865 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 160 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
       Side data:
         unknown side data type 7 (4 bytes)
    Output #0, matroska, to 'f-0.mkv':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.19.100
       Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 4865 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 30k tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 160 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
       Side data:
         unknown side data type 7 (4 bytes)
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    ...

    The result seems good, playing with well synchronized audio and video. However, MediaInfo shows a new item under Audio (that the original clip didn’t have) :

    Delay relative to video                  : 1mn 5s

    Here is the Mediainfo from the original f-0.mp4 file :

    Audio
     ID                                       : 2
     Format                                   : AC-3
     Format/Info                              : Audio Coding 3
     Mode extension                           : CM (complete main)
     Format settings, Endianness              : Big
     Codec ID                                 : ac-3
     Duration                                 : 2mn 8s
     Bit rate mode                            : Constant
     Bit rate                                 : 160 Kbps
     Channel(s)                               : 2 channels
     Channel positions                        : Front: L R
     Sampling rate                            : 48.0 KHz
     Bit depth                                : 16 bits
     Compression mode                         : Lossy
     Delay relative to video                  : 67ms
     Stream size                              : 2.44 MiB (3%)

    Mediainfo from the f-0.mkv output :

    Audio
     ID                                       : 2
     Format                                   : AC-3
     Format/Info                              : Audio Coding 3
     Mode extension                           : CM (complete main)
     Format settings, Endianness              : Big
     Codec ID                                 : A_AC3
     Duration                                 : 2mn 8s
     Bit rate mode                            : Constant
     Bit rate                                 : 160 Kbps
     Channel(s)                               : 2 channels
     Channel positions                        : Front: L R
     Sampling rate                            : 48.0 KHz
     Bit depth                                : 16 bits
     Compression mode                         : Lossy
     Delay relative to video                  : 1mn 5s
     Stream size                              : 2.44 MiB (3%)
     Default                                  : Yes
     Forced                                   : No
     HANDLER_NAME                             : SoundHandler

    There is no delay whatsoever and no reason to insert a delay.

    I am concerned that this information (Delay relative to video) be used by some players or other applications as a delay that should be corrected. Is there a way to prevent this from happening ?

    Adding ffprobe output : f-0.mp4 clip

    ffprobe -show_entries stream=codec_type,duration,start_time -of compact f-0.mp4
       ffprobe version N-69672-g078be09 Copyright (c) 2007-2015 the FFmpeg developers
       built with gcc 4.9.2 (GCC)
       configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
       libavutil      54. 18.100 / 54. 18.100
       libavcodec     56. 21.102 / 56. 21.102
       libavformat    56. 19.100 / 56. 19.100
       libavdevice    56.  4.100 / 56.  4.100
       libavfilter     5.  9.104 /  5.  9.104
       libswscale      3.  1.101 /  3.  1.101
       libswresample   1.  1.100 /  1.  1.100
       libpostproc    53.  3.100 / 53.  3.100
     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'f-0.mp4':
       Metadata:
         major_brand     : isom
         minor_version   : 512
         compatible_brands: isomiso2avc1mp41
         encoder         : Lavf56.19.100
       Duration: 00:02:08.06, start: 0.005333, bitrate: 5030 kb/s
         Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4865 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
         Metadata:
           handler_name    : VideoHandler
         Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 160 kb/s (default)
         Metadata:
           handler_name    : SoundHandler
         Side data:
           unknown side data type 7 (4 bytes)
     stream|codec_type=video|start_time=0.000000|duration=128.061267
     stream|codec_type=audio|start_time=-0.005333|duration=128.064000

    f-0.mkv clip :

    ffprobe version N-69672-g078be09 Copyright (c) 2007-2015 the FFmpeg developers
     built with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 18.100 / 54. 18.100
     libavcodec     56. 21.102 / 56. 21.102
     libavformat    56. 19.100 / 56. 19.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5.  9.104 /  5.  9.104
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from 'f-0.mkv':
     Metadata:
       COMPATIBLE_BRANDS: isomiso2avc1mp41
       MAJOR_BRAND     : isom
       MINOR_VERSION   : 512
       ENCODER         : Lavf56.19.100
     Duration: 00:02:08.13, start: 0.061000, bitrate: 5026 kb/s
       Stream #0:0(und): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
       Metadata:
         LANGUAGE        : und
         HANDLER_NAME    : VideoHandler
       Stream #0:1(und): Audio: ac3, 48000 Hz, stereo, fltp, 160 kb/s (default)
       Metadata:
         LANGUAGE        : und
         HANDLER_NAME    : SoundHandler
    stream|codec_type=video|start_time=0.066000|duration=N/A
    stream|codec_type=audio|start_time=0.061000|duration=N/A