Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (41)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

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

  • ffmpeg : specify/force pixel format for input H.264 video

    30 juillet 2017, par AndreG

    I have some MP4 video files missing the pixel format in their header information. I have already tried setting probesize and analyzeduration to their maximum values 2147483647 but that didn’t help.

    So I know these videos are probably corrupt but if this is the only information missing I was thinking I could maybe recover them by rebuilding their header information or somehow decoding them by forcing a pixel format. Does anyone have any idea if this is possible ? Some more background on the file :

    Mediainfo :

    $ mediainfo DJI_0090.MOV
    General
    Complete name                            : DJI_0090.MOV
    Format                                   : MPEG-4
    Format profile                           : QuickTime
    Codec ID                                 : qt   2014.02 (qt  )
    File size                                : 165 MiB
    Duration                                 : 22 s 322 ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 61.8 Mb/s
    Encoded date                             : UTC 2017-05-31 18:04:45
    Tagged date                              : UTC 2017-05-31 18:04:45
    Comment                                  : 0.9.145
    ©gpt                                     : -170.60
    ©gyw                                     : +157.30
    ©grl                                     : +0.00
    IsTruncated                              : Yes

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.2
    Format settings, CABAC                   : Yes
    Format settings, RefFrames               : 1 frame
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 22 s 322 ms
    Bit rate mode                            : Variable
    Bit rate                                 : 59.4 Mb/s
    Maximum bit rate                         : 50.0 Mb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 59.940 (60000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.478
    Stream size                              : 158 MiB (96%)
    Title                                    : DJI.AVC
    Language                                 : English
    Encoded date                             : UTC 2017-05-31 18:04:45
    Tagged date                              : UTC 2017-05-31 18:04:45
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709

    ffprobe :

    $ ffprobe -analyzeduration 2147483647 -probesize 2147483647 DJI_0090.MOV
    ffprobe version 3.3.2 Copyright (c) 2007-2017 the FFmpeg developers
     built with Apple LLVM version 8.1.0 (clang-802.0.42)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables     --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-indev=qtkit --enable-ffplay --enable-libfdk-aac --enable-libmp3lame     --enable-libsoxr --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-opencl --disable-lzma     --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.1.2_1/include/openjpeg-2.1 --enable-nonfree     --enable-vda
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libavresample   3.  5.  0 /  3.  5.  0
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc2e9002600] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080):     unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DJI_0090.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 538182144
       compatible_brands: qt  
       creation_time   : 2017-05-31T18:04:45.000000Z
       comment         : 0.9.145
     Duration: 00:00:22.36, bitrate: 61732 kb/s
       Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 59.94 fps, 59.94 tbr, 60k tbn, 120k tbc (default)
       Metadata:
         creation_time   : 2017-05-31T18:04:45.000000Z
         handler_name    : DJI.AVC
         encoder         : Dji AVC encoder

    I can’t force the pixel_format on ffmpeg this way :

    $ ffmpeg -pixel_format yuv420p -i DJI_0090.MOV test.mp4
    ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 8.1.0 (clang-802.0.42)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables     --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-indev=qtkit --enable-ffplay --enable-libfdk-aac --enable-libmp3lame     --enable-libsoxr --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-opencl --disable-lzma     --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.1.2_1/include/openjpeg-2.1 --enable-nonfree     --enable-vda
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libavresample   3.  5.  0 /  3.  5.  0
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Option pixel_format not found.

    Is there any other way to accomplish this with ffmpeg ? Is it possible to edit their header information to include the pixel format information ?

  • How to properly wrap H264 into FLV with FFMPEG ?

    9 août 2017, par mOfl

    First of all, the "properly" in the title refers to this related question, of which answer does not solve my problem.

    tl ;dr : There is a difference between encoding a video and directly storing it into FLV and doing this in two separate steps. I need to do it separately, how do I get the same result as doing it directly ?

    Nvidia’s hardware encoder NVENC produces raw H.264 data without a container, which is difficult to play in most video players. For an Adobe AIR application, I need to wrap the video into the FLV format, for which I wanted to use FFMPEG :

    ffmpeg -f h264 -i "input.h264" -c copy -f flv "output.flv"

    This did not work as expected, because the first frame of each video treated this way is simply not shown. Each video is only displayed from the second frame, which is a shame for single-frame videos (using the GPU’s hardware encoder for lightning-fast image compression only).

    For inspection, I now reencode the input video twice : once directly to FLV output

    ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f flv "A.flv"

    and once to H.264, then shoving it into an FLV afterwards.

    ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f h264 "reencode.h264"
    ffmpeg -f h264 -i "reencode.h264" -c copy -f flv "B.flv"

    The first video plays fine, the second does not. The resulting FLV of the direct approach (A.flv, see below) has a slightly different file structure, especially the NAL unit differs, which I suspect is the reason for the different behavior.

    So, my question is : If I already have a H.264 video and only want it to be copied into an FLV container without being transcoded, but the file and frame headers should be filled in correctly as is done when actually transcoding, how do I tell this to FFMPEG ? Are there commands for this, such as "-c copy butGenerateValidHeader" ?

    Here the relevant portions of the files :

    Direct approach

    ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f flv "A.flv"

    A.flv

    46 4C 56 01 01 00 00 00 09 00 00 00 00 12 00 00 // FLV header + metadata
    B8 00 00 00 00 00 00 00 02 00 0A 6F 6E 4D 65 74
    61 44 61 74 61 08 00 00 00 08 00 08 64 75 72 61
    74 69 6F 6E 00 3F A0 E5 60 41 89 37 4C 00 05 77
    69 64 74 68 00 40 93 80 00 00 00 00 00 00 06 68
    65 69 67 68 74 00 40 8E F0 00 00 00 00 00 00 0D
    76 69 64 65 6F 64 61 74 61 72 61 74 65 00 40 9E
    84 80 00 00 00 00 00 09 66 72 61 6D 65 72 61 74
    65 00 40 3E 00 00 00 00 00 00 00 0C 76 69 64 65
    6F 63 6F 64 65 63 69 64 00 40 1C 00 00 00 00 00
    00 00 07 65 6E 63 6F 64 65 72 02 00 0D 4C 61 76
    66 35 37 2E 37 31 2E 31 30 30 00 08 66 69 6C 65
    73 69 7A 65 00 40 F9 5C B0 00 00 00 00 00 00 09

    00 00 00 C3 09 00 00 2B 00 00 00 00 00 00 00 17 // AVC sequence start
    00 00 00 00
               01 4D 40 20 FF E1 00 17             // ?
                                       67 4D 40 20 // Sequence parameter set
    95 A0 13 81 F7 EB 01 10 00 00 3E 80 00 0E A6 08
    F1 C3 2A
            01 00 04                               // ?
                     68 EE 3C 80                   // Picture parameter set
                                 00 00 00 36 09 01 // AVC NALU
    94 9A 00 00 00 00 00 00 00 17 01 00 00 00
                                             00 01 // ?
    94 91
         65                                        // IDR frame
           [B8 04 1D FF ...]
    00 01 94 A5 09 00 00 05 00 00 00 00 00 00 00    // ?
                                                17 // AVC sequence end
    02 00 00 00 00 00 00 10

    Encoding first

    ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f h264 "reencode.h264"

    reencode.h264

    00 00 00 01 67 4D 40 20 95 A0 13 81 F7 EB 01 10 // Sequence parameter set
    00 00 3E 80 00 0E A6 08 F1 C3 2A
                                    00 00 00 01 68 // Picture parameter set
    EE 3C 80
            00 00 00 01 65                         // IDR frame
                          [B8 04 1D FF ...]        // Frame data

    Squeeze into container

    ffmpeg -f h264 -i "reencode.h264" -c copy -f flv "B.flv"

    B.flv

    46 4C 56 01 01 00 00 00 09 00 00 00 00 12 00 00 // FLV header + metadata
    A4 00 00 00 00 00 00 00 02 00 0A 6F 6E 4D 65 74
    61 44 61 74 61 08 00 00 00 07 00 08 64 75 72 61
    74 69 6F 6E 00 3F A4 7A E1 47 AE 14 7B 00 05 77
    69 64 74 68 00 40 93 80 00 00 00 00 00 00 06 68
    65 69 67 68 74 00 40 8E F0 00 00 00 00 00 00 0D
    76 69 64 65 6F 64 61 74 61 72 61 74 65 00 00 00
    00 00 00 00 00 00 00 0C 76 69 64 65 6F 63 6F 64
    65 63 69 64 00 40 1C 00 00 00 00 00 00 00 07 65
    6E 63 6F 64 65 72 02 00 0D 4C 61 76 66 35 37 2E
    37 31 2E 31 30 30 00 08 66 69 6C 65 73 69 7A 65
    00 40 F9 5B 40 00 00 00 00 00 00 09
                                       00 00 00 AF // AVC sequence start
    09 00 00 05 00 00 00 00 00 00 00 17 00 00 00 00

    00 00 00 10 09 01 94 BD 00 00 00 00 00 00 00 17 // AVC NALU
    01 00 00
            00 00 00 00 01 67 4D 40 20 95 A0 13 81 // Sequence parameter set
    F7 EB 01 10 00 00 3E 80 00 0E A6 08 F1 C3 2A
                                                00 // Picture parameter set
    00 00 01 68 EE 3C 80
                        00 00 00 01 65             // IDR frame
                                      [B8 04 1D FF // Frame data
    ...]
    00 01 94 C8 09 00 00 05 00 00 00 00 00 00 00    // ?
                                                17 // AVC sequence end
    02 00 00 00 00 00 00 10

    Update 08.08.2017 : Added input and output files for examination

  • ffmpeg recognises MXF dv but won't encode to h264

    6 août 2017, par 3pointedit

    I have a DV file encoded as an MXF that I want to transcode to h264. Running ffmpeg against the file it reads ok and understands the stream but won’t write the h264 file. It seems to get all the streams correct and I can confirm the attributes of video and audio streams.

    I just don’t understand why it won’t encode ? I tried to force a Decoder with -f dv but it complained that the source header was incorrect.

    ./ffmpeg -f dv -i camb_onitefire_050914.mov  camb_onitefire_A.mp4
    ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    [dv @ 0x7fd6f4800000] Cannot find DV header.
    camb_onitefire_050914.mov: Operation not permitted
    Davids-MacBook-Pro:camb_onitefire_050914(1).vmf davidmcsween$ ./ffmpeg -i camb_onitefire_050914.mov camb_onitefire_A.mp4
    ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Skipped opening external track: stream 0, alias: path='/VibrintAVFiles/P2 News Ingest/camb_onitefire_050914(1).vmf/video.vid', dir='camb_onitefire_050914(1).vmf', filename='video.vid', volume='default', nlvl_from=1, nlvl_to=1.Set enable_drefs to allow this.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Skipped opening external track: stream 1, alias: path='/VibrintAVFiles/P2 News Ingest/camb_onitefire_050914(1).vmf/audio_0.pcm', dir='camb_onitefire_050914(1).vmf', filename='audio_0.pcm', volume='default', nlvl_from=1, nlvl_to=1.Set enable_drefs to allow this.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Skipped opening external track: stream 2, alias: path='/VibrintAVFiles/P2 News Ingest/camb_onitefire_050914(1).vmf/audio_1.pcm', dir='camb_onitefire_050914(1).vmf', filename='audio_1.pcm', volume='default', nlvl_from=1, nlvl_to=1.Set enable_drefs to allow this.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Skipped opening external track: stream 3, alias: path='/VibrintAVFiles/P2 News Ingest/camb_onitefire_050914(1).vmf/audio_2.pcm', dir='camb_onitefire_050914(1).vmf', filename='audio_2.pcm', volume='default', nlvl_from=1, nlvl_to=1.Set enable_drefs to allow this.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Skipped opening external track: stream 4, alias: path='/VibrintAVFiles/P2 News Ingest/camb_onitefire_050914(1).vmf/audio_3.pcm', dir='camb_onitefire_050914(1).vmf', filename='audio_3.pcm', volume='default', nlvl_from=1, nlvl_to=1.Set enable_drefs to allow this.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe1fb000000] Could not find codec parameters for stream 0 (Video: dvvideo (dvpp / 0x70707664), none, 720x576, 28800 kb/s): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Guessed Channel Layout for Input Stream #0.1 : mono
    Guessed Channel Layout for Input Stream #0.2 : mono
    Guessed Channel Layout for Input Stream #0.3 : mono
    Guessed Channel Layout for Input Stream #0.4 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'camb_onitefire_050914.mov':
     Metadata:
       creation_time   : 2014-09-04T18:54:07.000000Z
     Duration: 00:17:47.18, start: 0.000000, bitrate: 1 kb/s
       Stream #0:0(eng): Video: dvvideo (dvpp / 0x70707664), none, 720x576, 28800 kb/s, SAR 118:81 DAR 295:162, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Alias Data Handler
         timecode        : 01:46:43:02
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Alias Data Handler
       Stream #0:5(eng): Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2014-09-04T18:54:07.000000Z
         handler_name    : Apple Handle Data Handler
         timecode        : 01:46:43:02
    File 'camb_onitefire_A.mp4' already exists. Overwrite ? [y/N] y
    Stream mapping:
     Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    Finishing stream 0:0 without any data written to it.
    Finishing stream 0:1 without any data written to it.
    Nothing was written into output file 0 (camb_onitefire_A.mp4), because at least one of its streams received no packets.
    frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [aac @ 0x7fe1fd010e00] Qavg: nan

    Heres an example of the file structure of this novel mxd :

    mxf example