Recherche avancée

Médias (0)

Mot : - Tags -/api

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (13)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (3563)

  • How to preserve data stream with none codec from a video while compressing it using ffmpeg ?

    5 octobre 2022, par rj_7

    I'm using the following command to compress a video of size 1.5GB to 80 MB.

    


    ffmpeg -i input.mp4 -copy_unknown -map_metadata 0 -c copy -c:v h264 -b:v 5000k -c:a aac -b:a 48k -map 0:v -map 0:a -map 0:d output.mp4


    


    The problem I'm facing is - it doesn't copy the data stream to the output video even when I explicitly mention it via mapping. If I don't use the -map options for each kind of stream, it just process the video and audio as expected. But I also want the data stream in my output video.

    


    The logs for the above command are -

    


    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000022581bc0f80] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomiso2
    creation_time   : 2021-09-16T16:10:08.000000Z
    artist          : AnafiThermal-H006560
    title           : Thu, 16 Sep 2021 09:10:08 -0700
    date            : 2021-09-16T09:10:08-07:00
    make            : Parrot
    model           : AnafiThermal
    encoder         : PI040445AC0H006560
    location        : +33.67128695-117.61610583+415.50/
    com.apple.quicktime.artist: AnafiThermal-H006560
    com.apple.quicktime.title: Thu, 16 Sep 2021 09:10:08 -0700
    com.apple.quicktime.creationdate: 2021-09-16T09:10:08-07:00
    com.apple.quicktime.make: Parrot
    com.apple.quicktime.model: AnafiThermal
    com.apple.quicktime.software: 1.8.0
    com.apple.quicktime.location.ISO6709: +33.67128695-117.61610583+415.50/
    com.parrot.model.id: 0919
    com.parrot.serial: PI040445AC0H006560
    com.parrot.build.id: anafi-thermal-1.8.0
    com.parrot.run.date: 2021-09-16T09:04:29-07:00
    com.parrot.run.id: 0B3D536B2F1A425EFA8978850B4C2C71
    com.parrot.boot.id: 992D5FBA74A04BA5077C3FCA3BE9C707
    com.parrot.video.mode: Standard
  Duration: 00:02:05.49, start: 0.000000, bitrate: 100391 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 99998 kb/s, 29.98 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2021-09-16T16:10:08.000000Z
      handler_name    : DefaultVideo
    Stream #0:1(eng): Data: none (mett / 0x7474656D), 27 kb/s (default)
    Metadata:
      creation_time   : 2021-09-16T16:10:08.000000Z
      handler_name    : ParrotVideoMetadata
    Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 2021-09-16T16:10:08.000000Z
      handler_name    : DefaultAudio
    Stream #0:3: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 320x180 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:3 -> #0:1 (mjpeg (native) -> h264 (libx264))
  Stream #0:2 -> #0:2 (aac (native) -> aac (native))
  Stream #0:1 -> #0:3 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0000022581c5e280] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0000022582975a00] using SAR=1/1
[libx264 @ 0000022582975a00] MB rate (21600000) > level limit (16711680)
[libx264 @ 0000022582975a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000022582975a00] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 0000022582975a00] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=5000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libx264 @ 000002258241c980] using SAR=1/1
[libx264 @ 000002258241c980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002258241c980] profile High, level 5.1, 4:2:0, 8-bit
[libx264 @ 000002258241c980] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=5000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0000022581c5e280] Could not find tag for codec h264 in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
[libx264 @ 000002258241c980] final ratefactor: 25.51
[libx264 @ 0000022582975a00] final ratefactor: 73.59
[aac @ 00000225829747c0] Qavg: 63100.754
[aac @ 00000225829747c0] 2 frames left in the queue on closing
Conversion failed!


    


    I've also tried mapping the streams via number, that doesn't work either (shows same logs as above).

    


    ffmpeg -i input.mp4 -copy_unknown -map_metadata 0 -c copy -c:v h264 -b:v 5000k -c:a aac -b:a 48k -map 0:0 -map 0:1 -map 0:2 output.mp4


    


    So, essentially my question is - How to preserve data stream (packed) with none codec from a video while compressing it using ffmpeg ?

    


  • Integrate necessary ffmpeg libraries in own project for MCU (microcontrolers) [closed]

    16 septembre 2023, par Borel Kamnang

    I use two ffmpeg commands here :

    


    ffmpeg -i BigBuckBunny_320x180.mp4 -vf scale=192:96,setsar=1:1 outputBBB.mp4
ffmpeg -i outputBBB.mp4 -vf "fps=12,scale=-1:96:flags=lanczos,crop=192:in_h:(in_w-192)/2:0" -c:v rawvideo -pix_fmt rgb565be BigBuckBunny_192x96_12fps.rgb


    


    The first is to downscale an original video and the second is to convert the scaled video to a .rgb format.

    


    As anew user of ffmpeg, I would like to know what are libraries used for that two command to just integrate them in my Arduino IDE C++ project an just call the necessary functions to do the downscale and the conversion.

    


    And another of my concerns is knowing how I can run any ffmpeg in an Raspberry Pi Pico W (RP2040) or ESP32 microcontroller ?

    


    I tried to include the ffmpeg libraries folder in a created Arduino IDE project for Raspberry pico w and the link for files doesn't work. In addition to having the config.h and config components.h files missing in the folder downloaded from the ffmpeg site, there are too many dependencies between .h and .c files.

    


    extern "C" {
  #include "src/ffmpeg/libavcodec/avcodec.h"       
  #include "src/ffmpeg/libavutil/mathematics.h"
}
void setup() {
   Serial.begin(115200);
   delay(10000);
 }
 loop(){
 }


    


    It's been three days today that I've been trying to compile from Arduino IDE, and correct the links in the files.
The problem is also that I don't even have the certainty of what it will work in the Raspberry Pi PicoW or ESP32 afterwards.

    


  • Encode Ogg/Opus with very specific structure

    28 septembre 2022, par sonovice

    I have an ogg/opus file with a pretty special structure that I would like to reproduce.

    


    opusinfo returns a few hints of how it was made :

    


    New logical stream (#1, serial: 59d24a85): type opus
Encoded with Lavf56.40.101
User comments section follows...
        encoder=Lavc56.60.100 libopus
        encoder_options=--quiet --bitrate 96 --vbr
        pad=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Opus stream 1:
        Pre-skip: 312
        Playback gain: 0 dB
        Channels: 2
        Original sample rate: 48000Hz
        Packet duration:   60.0ms (max),   56.6ms (avg),   20.0ms (min)
        Page duration:   1460.0ms (max),  323.6ms (avg),  120.0ms (min)
        Total data length: 38872802 bytes (overhead: 1.12%)
        Playback length: 51m:11.473s
        Average bitrate: 101.2 kb/s, w/o overhead: 100.1 kb/s
Logical stream 1 ended


    


    Lavf/Lavc suggests that it was made with FFMPEG, but I am not able to find suitable settings.

    


    Looking at the actual bytes, it starts with an 0x200 (512) byte long ogg page containing metadata, followed by an 0xE00 (3584) byte long ogg page with actual audio content. Both pages sum up exactly to 0x1000 (4096) bytes.
Head of the ogg file

    


    After that, each page is exactly 0x1000 (4096) bytes long with potential zero padding, so that the pages start at offsets 0x1000, 0x2000, 0x3000 etc.
examplary page boundary

    


    Is there any known tool or library that can produce such ogg/opus files from PCM wave audio ?

    


    (Unfortunately I cannot share the file as it contains proprietary content.)