Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (86)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (12383)

  • iOS SDK avcodec_decode_video Optimization

    6 août 2013, par Johny Cage

    I've recently started a project that relies on streaming FLV directly to an iOS device. As most famous i went with ffmpeg (and an iOS wrapper - kxmovie). To my surprise iPhone 4 is incapable of playing even SD low-bitrate FLV videos. The current implementation i'm using is decoding the video/audio/sub frames in dispatch_async while loop and copies the YUV frame data to a object, where the object is parsed to 3 textures - Y/U/V (in case of RGB color space - just parse the data) and rendered on screen. After much trial and error, i've decided to kill the whole rendering pipeline and leave only the avcodec_decode_video2 function to run. Surprisingly the FPS did not improve and videos are still unplayable.

    My question is : What can i do to improve the performance of avcodec_decode_video2 ?

    Note :
    I've tried a few commercial apps and they play the same file perfectly fine with no more than 50-60% cpu usage.

    The library is based off the 1.2 branch and this is are the build args :

    '--arch=arm',
    '--cpu=cortex-a8',
    '--enable-pic',
    "--extra-cflags='-arch armv7'",
    "--extra-ldflags='-arch armv7'",
    "--extra-cflags='-mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad'",
    '--enable-neon',
    '--enable-optimizations',
    '--disable-debug',
    '--disable-armv5te',
    '--disable-armv6',
    '--disable-armv6t2',
    '--enable-small',
    '--disable-ffmpeg',
    '--disable-ffplay',
    '--disable-ffserver',
    '--disable-ffprobe',
    '--disable-doc',
    '--disable-bzlib',
    '--target-os=darwin',
    '--enable-cross-compile',
    #'--enable-nonfree',
    '--enable-gpl',
    '--enable-version3',

    And according to Instruments the following functions take about 30% CPU usage each :

    Running Time    Self        Symbol Name
    37023.9ms   32.3%   13874,8                   ff_h264_decode_mb_cabac
    34626.2ms   30.2%   9194,7                    loop_filter
    29430.0ms   25.6%   173,8                     ff_h264_hl_decode_mb
  • How to get the exact macroblock bit sizes from H.264 (CABAC) bitstream

    15 juillet 2013, par Bhaskar Dey

    I am interested to get the exact size of a macroblock (MB) in bits form H.264 bitstream (CABAC entropy coded). I would like to verify this against the MB sizes available form commercial bitstream analyzers (like Codecvisa etc). I had a look at the FFmpeg source files cabac.h, h264_cabac.c and h.264.c.

    In function ff_h264_decode_mb_cabac(H264Context *h) of h264_cabac.c, I computed the MB sizes using CABAC bytestream pointer as :

    int ff_h264_decode_mb_cabac(H264Context *h) {

       int b=(int)h->cabac.bytestream;

       // function body of ff_h264_decode_mb_cabac() unmodified

       b=(int)h->cabac.bytestream-b;
       //print value of (b<<3), i.e., MB bit size(b is the difference in bytes);

    }

    This gives the value of MB size in bits but accurate within 16 of the actual bit size found using H.264 analyzers. I also printed the contents of h->cabac.bytestream (in binary) at the start and at the end of the function call but couldn't locate the exact MB-boundary bit positions(see following table for an example). Any hint would be of immense help.

    Frame No  MB index(type)        start(hex)               end(hex)                 b<<3  Exact size(analyzer)
    ....
    Frame 2,  742(P_L0_16x16),      1110011110100001 (e7a1), 0000001110010110 (0396),   80    78
    Frame 2,  743(P_8x8),           0000001110010110 (0396), 0000101101000101 (0b45),  400   400
    Frame 2,  744(P_L0_L0_16x8),    0000101101000101 (0b45), 0110011001011011 (665b),  336   325
    Frame 2,  745(P_L0_L0_16x8),    0110011001011011 (665b), 1010001010010000 (a290),  272   284
    Frame 2,  746(P_8x8),           1010001010010000 (a290), 0010010000111101 (243d),  464   463
    ....
  • How can I remove "original display aspect ratio" from a mp4 file using ffmpeg ?

    21 juin 2020, par aveceux

    I wish to remove the "original display aspect ratio" entry from the video section.

    



    Video
ID                             : 1
Format                         : AVC
Format/Info                    : Advanced Video Codec
Format profile                 : High@L4
Format settings                : CABAC / 4 Ref Frames
Format settings, CABAC         : Yes
Format settings, ReFrames      : 4 frames
Codec ID                       : avc1
Codec ID/Info                  : Advanced Video Coding
Duration                       : 44 min 29 s
Bit rate                       : 5 001 kb/s
Width                          : 1 920 pixels
Height                         : 1 072 pixels
Display aspect ratio           : 16:9
Original 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.097
Stream size                    : 1.55 GiB (97%)


    



    I tried the following commands,

    



    ffmpeg -i input.mp4 -map_metadata -1 -c copy output.mp4

    



    ffmpeg -i input.mp4 -metadata original_display_aspect_ratio=0 -c copy output.mp4

    



    but none of them worked.

    



    If I want to remove the "original display aspect ratio" entry completely, what ffmpeg command can I use to achieve that ?

    



    Thank you.

    



    EDIT :
The result of mediainfo -f :

    



    General
Count                                    : 331
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AAC LC
Audio_Format_WithHint_List               : AAC LC
Audio codecs                             : AAC LC
Complete name                            : Downloads/3.mp4
File name                                : Downloads/3.mp4
File name                                : Downloads/3
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media
Internet media type                      : video/mp4
Codec ID                                 : isom
Codec ID                                 : isom (isom/iso2/avc1/mp41/letv)
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible                       : isom/iso2/avc1/mp41/letv
File size                                : 1715744367
File size                                : 1.60 GiB
File size                                : 2 GiB
File size                                : 1.6 GiB
File size                                : 1.60 GiB
File size                                : 1.598 GiB
Duration                                 : 2670080
Duration                                 : 44 min 30 s
Duration                                 : 44 min 30 s 80 ms
Duration                                 : 44 min 30 s
Duration                                 : 00:44:30.080
Duration                                 : 00:44:29:24
Duration                                 : 00:44:30.080 (00:44:29:24)
Overall bit rate                         : 5140653
Overall bit rate                         : 5 141 kb/s
Frame rate                               : 25.000
Frame rate                               : 25.000 FPS
Frame count                              : 66749
Stream size                              : 3988740
Stream size                              : 3.80 MiB (0%)
Stream size                              : 4 MiB
Stream size                              : 3.8 MiB
Stream size                              : 3.80 MiB
Stream size                              : 3.804 MiB
Stream size                              : 3.80 MiB (0%)
Proportion of this stream                : 0.00232
HeaderSize                               : 1510470
DataSize                                 : 1711755635
FooterSize                               : 2478262
IsStreamable                             : Yes
File creation date                       : UTC 2019-02-20 11:24:46.448
File creation date (local)               : 2019-02-20 19:24:46.448
File last modification date              : UTC 2017-05-26 00:00:00.000
File last modification date (local)      : 2017-05-26 08:00:00.000
Writing application                      : Lavf56.15.102
Writing application                      : Lavf56.15.102

Video
Count                                    : 348
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4
Format settings, ReFrames                : 4 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 2669960
Duration                                 : 44 min 29 s
Duration                                 : 44 min 29 s 960 ms
Duration                                 : 44 min 29 s
Duration                                 : 00:44:29.960
Duration                                 : 00:44:29:24
Duration                                 : 00:44:29.960 (00:44:29:24)
Bit rate                                 : 5000927
Bit rate                                 : 5 001 kb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1072
Height                                   : 1 072 pixels
Sampled_Width                            : 1920
Sampled_Height                           : 1072
Pixel aspect ratio                       : 0.993
Display aspect ratio                     : 1.779
Display aspect ratio                     : 16:9
Original display aspect ratio            : 1.778
Original display aspect ratio            : 16:9
Rotation                                 : 0.000
Frame rate mode                          : CFR
Frame rate mode                          : Constant
FrameRate_Mode_Original                  : VFR
Frame rate                               : 25.000
Frame rate                               : 25.000 FPS
Frame count                              : 66749
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.097
Stream size                              : 1669034254
Stream size                              : 1.55 GiB (97%)
Stream size                              : 2 GiB
Stream size                              : 1.6 GiB
Stream size                              : 1.55 GiB
Stream size                              : 1.554 GiB
Stream size                              : 1.55 GiB (97%)
Proportion of this stream                : 0.97278
Codec configuration box                  : avcC

Audio
Count                                    : 277
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : AAC
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Commercial name                          : AAC
Format_AdditionalFeatures                : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 2670080
Duration                                 : 44 min 30 s
Duration                                 : 44 min 30 s 80 ms
Duration                                 : 44 min 30 s
Duration                                 : 00:44:30.080
Duration                                 : 00:44:34:09
Duration                                 : 00:44:30.080 (00:44:34:09)
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 128000
Bit rate                                 : 128 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Samples per frame                        : 1024
Sampling rate                            : 44100
Sampling rate                            : 44.1 kHz
Samples count                            : 117750528
Frame rate                               : 43.066
Frame rate                               : 43.066 FPS (1024 SPF)
Frame count                              : 114991
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 42721373
Stream size                              : 40.7 MiB (2%)
Stream size                              : 41 MiB
Stream size                              : 41 MiB
Stream size                              : 40.7 MiB
Stream size                              : 40.74 MiB
Stream size                              : 40.7 MiB (2%)
Proportion of this stream                : 0.02490
Default                                  : Yes
Default                                  : Yes
Alternate group                          : 1
Alternate group                          : 1