Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (35)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (5900)

  • How can I programmatically delete frames from an mpg video and keep the audio in sync ?

    22 janvier 2018, par Pima omg

    I stream training videos from work, but don’t have a great connection and get a lot of buffering. I have captured the streamed video from the PC screen into an mpg file. Fortunately when the video buffers, it shows a characteristic buffering icon in the center of the screen and there is no sound. Using ffmpeg, I have been able to write a c++ method that can step through the video frames of the mpeg file, convert to an RBG frame and detect the presence or absence of this characteristic buffering icon.

    The final thing I need to do is generate a new mpeg file with only the frames that do not have this buffering image, and keep all the audio in sync. How do I do that with ffmpeg ?

    I have already found the dts and pts timestamps on the video and audio frames, but don’t know how to use this information to recode just the frames that don’t have the buffering image. The recode should keep all the properties of the original (framerate, resolution, size etc)

    Here is the stripped down code I use to traverse the frame and detect which ones I want to keep (omitting a lot of initialization and error checking)

    while (av_read_frame(pFormatCtx, &packet) >= 0)
       {
           // Is this a packet from the video stream?
           if (packet.stream_index == videoStream)
           {
               // Decode video frame
               avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);

               // Did we get a video frame?
               if (frameFinished)
               {
                   // Convert the image from its native format to RGB
                   sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
                   if (ThisIsAFrameIWant(pFrameRGB))
                   {
                       WRITE FRAME TO NEW MPEG KEEPING AUDIO IN SYNC
                   }
               }
           }
       }
  • ffmpeg muxing ismv&isma to mp4 resulting in wrong frame rates

    4 janvier 2018, par Frank Toxic

    I have problems muxing fragmented video and audio tracks (piff) to an unfragmented standard mp4 including audio&video

    From a metadata mediainfo point of view everything looks ok, Codec ID is mp41 not mp42 but shouldn’t be a big problem

    General
    Complete name                            : D:\Temp\output.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 2.76 GiB
    Duration                                 : 43 min 11 s
    Overall bit rate mode                    : Constant
    Overall bit rate                         : 9 161 kb/s
    Writing application                      : Lavf57.83.100

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Main@L4
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 43 min 11 s
    Source duration                          : 14 s 460 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 9 000 kb/s / 9 000 kb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.174
    Stream size                              : 2.71 GiB (98%)
    Source stream size                       : 2.71 GiB (98%)
    Writing library                          : x264 core 152
    Encoding settings                        : cabac=1 / ref=2 / deblock=1:-1:-1 / analyse=0x1:0x131 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=36 / lookahead_threads=3 / sliced_threads=0 / slices=1 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=50 / keyint_min=2 / scenecut=0 / intra_refresh=0 / rc_lookahead=50 / rc=cbr / mbtree=1 / bitrate=9000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=9000 / vbv_bufsize=9000 / nal_hrd=cbr / filler=1 / ip_ratio=1.40 / aq=3:1.00
    Language                                 : English
    mdhd_Duration                            : 2591440

    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 43 min 11 s
    Bit rate mode                            : Constant
    Bit rate                                 : 157 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 46.875 FPS (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 48.4 MiB (2%)
    Language                                 : German
    Default                                  : Yes
    Alternate group                          : 1

    The actual problem is the frame rate missmatch, reported by Baton or visible in Windows Explorer -> Properties -> Details

    Mismatch in system and elementary metadata.  System Level  
      
    For video track ID 1, Frame Rate at the system level is 4482.79 fps, whereas at the elementary level it is 25.00 fps. Specified criteria: Report as Serious if  Mismatch in Frame Rate detected

    Windows Explorer Details

    ffmpeg cmd line used

    D:\FFMPEG\bin>ffmpeg.exe -i "D:\Temp\video.ismv" -i "D:\Temp\audio.isma" -codec copy "D:\Temp\output.mp4"
    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable
    -libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --e
    nable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Temp\video.ismv':
     Metadata:
       major_brand     : piff
       minor_version   : 1
       compatible_brands: iso2piff
     Duration: 00:43:11.44, start: 0.080000, bitrate: 9000 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 8998 kb/s, 25 fps, 25 tbr, 10000k tbn, 50 tbc (default)
       Metadata:
         handler_name    : USP Video Handler
         encoder         : AVC Coding
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Temp\audio.isma':
     Metadata:
       major_brand     : piff
       minor_version   : 1
       compatible_brands: iso2piff
     Duration: 00:43:11.40, start: 0.000000, bitrate: 160 kb/s
       Stream #1:0(deu): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)
       Metadata:
         handler_name    : USP Sound Handler
    Output #0, mp4, to 'D:\Temp\output.mp4':
     Metadata:
       major_brand     : piff
       minor_version   : 1
       compatible_brands: iso2piff
       encoder         : Lavf57.83.100
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 8998 kb/s, 25 fps, 25 tbr, 10000k tbn, 10000k tbc (default)
       Metadata:
         handler_name    : USP Video Handler
         encoder         : AVC Coding
       Stream #0:1(deu): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)
       Metadata:
         handler_name    : USP Sound Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=64786 fps=4397 q=-1.0 Lsize= 2898087kB time=00:43:11.38 bitrate=9161.6kbits/s speed= 176x
    video:2846633kB audio:49555kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.065580%
  • How to use scale filter in doc/examples/transcoding.c

    19 janvier 2018, par siods333333

    I tried to replace the "null" filter with the "scale=320x180" filter in the doc/examples/transcoding.c file, it only resulted into the this error message :

    [libx264 @ 03303ee0] Input picture width (640) is greater than stride (256)
    Error occurred: Generic error in an external library

    What is wrong ? Look that init_filters happens after open_output_file, the encoder is already set before it even knows the resolution of the output.

    How to do this properly ?

    Look at this piece of code, I don’t get what it’s talking about, fiters ain’t going to magically set the correct resolution :

           /* In this example, we transcode to same properties (picture size,
            * sample rate etc.). These properties can be changed for output
            * streams easily using filters */
           if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
               enc_ctx->height = dec_ctx->height;
               enc_ctx->width = dec_ctx->width;

    Found this in the ffmpeg.c itself :

       enc_ctx->width  = av_buffersink_get_w(ost->filter->filter);
       enc_ctx->height = av_buffersink_get_h(ost->filter->filter);