Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (69)

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

  • invalid frame size error while using WxH in ffmpeg

    17 novembre 2018, par Siva Manasan

    I am trying to convert a video to images.

    ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg

    But every time it shows error in Windows CMD :

    Invalid frame size: WxH.

    The full Error code is posted below

    C:\Users\HP\Desktop\New folder>ffmpeg -i "C:\Users\HP\Desktop\foo.mp4" -r 1 -s WxH -f image2 afoo-%03d.jpeg
    ffmpeg version 3.4 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 --enable-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 'C:\Users\HP\Desktop\foo.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.40.101
     Duration: 00:00:45.05, start: 0.000000, bitrate: 1163 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 854x480 [SAR 1:1 DAR 427:240], 1032 kb/s, 25.02 fps, 25 tbr, 90k tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Invalid frame size: WxH.

    I tried with multiple video formats and video sizes but still not working :(

    I’ve checked whether it is really ’x’ and I typed it by hand.
    This question implies about the ’x’ problem and mine is different.

  • Does a track run in a fragmented MP4 have to start with a key frame ?

    18 janvier 2021, par stevendesu

    I'm ingesting an RTMP stream and converting it to a fragmented MP4 file in JavaScript. It took a week of work but I'm almost finished with this task. I'm generating a valid ftyp atom, moov atom, and moof atom and the first frame of the video actually plays (with audio) before it goes into an infinite buffering with no errors listed in chrome://media-internals

    



    Plugging the video into ffprobe, I get an error similar to :

    



    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x558559198080] Failed to add index entry
    Last message repeated 368 times
[h264 @ 0x55855919b300] Invalid NAL unit size (-619501801 > 966).
[h264 @ 0x55855919b300] Error splitting the input into NAL units.


    



    This led me on a massive hunt for data alignment issues or invalid byte offsets in my tfhd and trun atoms, however no matter where I looked or how I sliced the data, I couldn't find any problems in the moof atom.

    



    I then took the original FLV file and converted it to an MP4 in ffmpeg with the following command :

    



    ffmpeg -i ~/Videos/rtmp/big_buck_bunny.flv -c copy -ss 5 -t 10 -movflags frag_keyframe+empty_moov+faststart test.mp4


    



    I opened both the MP4 I was creating and the MP4 output by ffmpeg in an atom parsing file and compared the two :

    



    Comparing MP4 files with MP4A

    



    The first thing that jumped out at me was the ffmpeg-generated file has multiple video samples per moof. Specifically, every moof started with 1 key frame, then contained all difference frames until the next key frame (which was used as the start of the following moof atom)

    



    Contrast this with how I'm generating my MP4. I create a moof atom every time an FLV VIDEODATA packet arrives. This means my moof may not contain a key frame (and usually doesn't)

    



    Could this be why I'm having trouble ? Or is there something else I'm missing ?

    



    The video files in question can be downloaded here :

    



    



    Another issue I noticed was ffmpeg's prolific use of base_data_offset in the tfhd atom. However when I tried tracking the total number of bytes appended and setting the base_data_offset myself, I got an error in Chrome along the lines of : "MSE doesn't support base_data_offset". Per the ISO/IEC 14996-10 spec :

    



    


    If not provided, the base-data-offset for the first track in the movie fragment is the position of the first byte of the enclosing Movie Fragment Box, and for second and subsequent track fragments, the default is the end of the data defined by the preceding fragment.

    


    



    This wording leads me to believe that the data_offset in the first trun atom should be equal to the size of the moof atom and the data_offset in the second trun atom should be 0 (0 bytes from the end of the data defined by the preceding fragment). However when I tried this I got an error that the video data couldn't be parsed. What did lead to data that could be parsed was the length of the moof atom plus the total length of the first track (as if the base offset were the first byte of the enclosing moof box, same as the first track)

    


  • Failed to convert asf/wmv to mp4 using ffmpeg "Progressive Segmented Frame mode : not supported"

    21 janvier 2019, par Virtual Cloud

    Looks like ffmpeg hasn’t support PsF yet, is this right ?

    Is there any tool we can use to convert PsF WMV/asf file to mp4 in Linux ?

    Progressive Segmented Frame (PsF) : https://en.wikipedia.org/wiki/Progressive_segmented_frame

    ffmpeg parameters and output :

    ./ffmpeg -i test1.asf -c:v libx264 -strict -2 test1.mp4
    ffmpeg version 4.1-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
     built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
     configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [vc1 @ 0x7f8fc100e600] Progressive Segmented Frame mode: not supported (yet)
    [asf @ 0x7f8fc1005a00] Failed to open codec in avformat_find_stream_info
    [vc1 @ 0x7f8fc100e600] Progressive Segmented Frame mode: not supported (yet)
    Guessed Channel Layout for Input Stream #0.1 : stereo
    Input #0, asf, from 'test1.asf':
     Duration: 00:12:20.50, start: 0.000000, bitrate: 1073 kb/s
       Stream #0:0: Video: vc1 (WVC1 / 0x31435657), none, 1280x720, 1k tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 64 kb/s
    [vc1 @ 0x7f8fc081f600] Progressive Segmented Frame mode: not supported (yet)
    Stream mapping:
     Stream #0:0 -> #0:0 (vc1 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (wmav2 (native) -> aac (native))
    Error while opening decoder for input stream #0:0 : Operation not permitted