Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (47)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

Sur d’autres sites (6800)

  • how to add hvt1 hvc2 to ffmpeg ?

    19 août 2020, par user10716022

    i only add libavformat library isom.c

    


    { AV_CODEC_ID_HEVC , MKTAG ('h', 'v', 'c', '2') }, /* HEVC / H.265 coded
with gpac */
 { AV_CODEC_ID_HEVC , MKTAG ('h', 'v', 't', '1') }, /* HEVC / H.265 coded
with gpac */


    


    i want use ffmpeg mpeg dash srd

    


    MPD video code ffmpeg do not have
this is my MPD

    


    &lt;?xml version="1.0"?>&#xA;&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H3M37.792S" maxsegmentduration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011">&#xA; <programinformation moreinformationurl="http://gpac.io">&#xA;  &#xA; </programinformation>&#xA;&#xA; <period duration="PT0H3M37.792S">&#xA;  <adaptationset segmentalignment="true" maxwidth="1920" maxheight="1012" maxframerate="24" par="1920:1012" lang="und" startwithsap="1">&#xA;   <essentialproperty schemeiduri="urn:mpeg:dash:srd:2014" value="1,0,0,0,0"></essentialproperty>&#xA;   <segmenttemplate media="output_qp22_dash_track1_$Number$.m4s" initialization="hight01_set1_init.mp4" timescale="24000" startnumber="1" duration="120000"></segmenttemplate>&#xA;   <representation mimetype="video/mp4" codecs="hvc2.1.6.L186.80" width="1920" height="1012" framerate="24" sar="1:1" bandwidth="3010576">&#xA;   </representation>&#xA;  </adaptationset>&#xA;</period>&#xA;</mpd>&#xA;

    &#xA;

  • Prevent ffmpeg from changing the intensity of colors while downscaling the resolution of the video

    29 août 2022, par dravit

    I have a use case where I need to downscale a 716x1280 mp4 video to 358x640 (half of the original). Command that I used is

    &#xA;

    ffmpeg -i ./input.mp4 -vf "scale=640:640:force_original_aspect_ratio=decrease,pad=ceil(iw/2)*2:ceil(ih/2)*2" ./output.mp4&#xA;

    &#xA;

    Out of 10 sample videos, 2 of the them suffered impact on colors. Below I have attached a comparison from the one which was impacted the most.

    &#xA;

    Comparison of frames from the most impacted video

    &#xA;

    NOTE : The one on the right is a frame from the original video and the frame on the left is the one from the processed (down scaled) video. Notice the colors red and green in the image (even the skin color and hair color were changed).

    &#xA;

    What I am looking for is

    &#xA;

      &#xA;
    • Is there any way I can prevent changes like these happening ? Probably some flag on saturation, brightness, contrast or any other parameter.
    • &#xA;

    • I am assuming that ffmpeg uses some default settings while downscaling a video. What made ffmpeg change colors only for these two videos ? If it made similar changes for the rest of the videos as well, how to predict this behaviour before hand ?
    • &#xA;

    &#xA;

    EDIT :

    &#xA;

    What I already have Tried ?

    &#xA;

      &#xA;
    • -crf with values 0 and 18.
    • &#xA;

    • -preset veryslow as mentioned here
    • &#xA;

    &#xA;

    None helped

    &#xA;

    Mediainfo input V/S output

    &#xA;

    &#xA;&#xA;&#xA;&#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;&#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    param input output
    color range Limited NA (attribute not in description)
    color primaries BT.2020 NA (attribute not in description)
    transfer characteristics HLG NA (attribute not in description)
    matrix coefficients BT.2020 non-constant NA (attribute not in description)
    bit deapth 8 8

    &#xA;

    &#xA;

    Logs of the ffmpeg command

    &#xA;

    ffmpeg -i ./input.mp4 -vf "scale=640:640:force_original_aspect_ratio=decrease,pad=ceil(iw/2)*2:ceil(ih/2)*2" -movflags &#x2B;faststart ./output.mp4&#xA;ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with Apple clang version 12.0.0 (clang-1200.0.32.28)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;./input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:00:30.05, start: 0.000000, bitrate: 10366 kb/s&#xA;    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt2020nc/bt2020/arib-std-b67), 716x1280, 10116 kb/s, 30 fps, 30 tbr, 19200 tbn, 38400 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Video&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 245 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Audio&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x7faab4808800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x7faab4808800] profile High, level 3.0, 4:2:0, 8-bit&#xA;[libx264 @ 0x7faab4808800] 264 - core 161 r3027 4121277 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, mp4, to &#x27;./output.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.45.100&#xA;    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 358x640, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Video&#xA;      encoder         : Lavc58.91.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Audio&#xA;      encoder         : Lavc58.91.100 aac&#xA;[mp4 @ 0x7faab5808800] Starting second pass: moving the moov atom to the beginning of the file&#xA;frame=  901 fps=210 q=-1.0 Lsize=    3438kB time=00:00:30.02 bitrate= 938.0kbits/s speed=7.01x&#xA;video:2933kB audio:472kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.974633%&#xA;[libx264 @ 0x7faab4808800] frame I:6     Avg QP:22.60  size: 20769&#xA;[libx264 @ 0x7faab4808800] frame P:228   Avg QP:24.84  size:  7657&#xA;[libx264 @ 0x7faab4808800] frame B:667   Avg QP:27.59  size:  1697&#xA;[libx264 @ 0x7faab4808800] consecutive B-frames:  0.9%  0.9%  1.0% 97.2%&#xA;[libx264 @ 0x7faab4808800] mb I  I16..4:  9.5% 64.6% 26.0%&#xA;[libx264 @ 0x7faab4808800] mb P  I16..4:  2.5% 12.2%  2.5%  P16..4: 37.2% 20.6% 11.2%  0.0%  0.0%    skip:13.7%&#xA;[libx264 @ 0x7faab4808800] mb B  I16..4:  0.4%  2.1%  0.2%  B16..8: 42.2%  7.1%  1.2%  direct: 1.8%  skip:44.9%  L0:39.4% L1:52.8% BI: 7.8%&#xA;[libx264 @ 0x7faab4808800] 8x8 transform intra:72.2% inter:74.2%&#xA;[libx264 @ 0x7faab4808800] coded y,uvDC,uvAC intra: 61.8% 67.2% 20.2% inter: 16.7% 13.9% 1.3%&#xA;[libx264 @ 0x7faab4808800] i16 v,h,dc,p: 24% 19%  7% 50%&#xA;[libx264 @ 0x7faab4808800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 16% 15%  6%  9% 11%  7% 10%  6%&#xA;[libx264 @ 0x7faab4808800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 16% 13%  7%  9% 10%  7%  9%  4%&#xA;[libx264 @ 0x7faab4808800] i8c dc,h,v,p: 53% 16% 26%  5%&#xA;[libx264 @ 0x7faab4808800] Weighted P-Frames: Y:3.9% UV:1.8%&#xA;[libx264 @ 0x7faab4808800] ref P L0: 57.8% 19.5% 14.8%  7.8%  0.1%&#xA;[libx264 @ 0x7faab4808800] ref B L0: 90.7%  7.2%  2.1%&#xA;[libx264 @ 0x7faab4808800] ref B L1: 95.3%  4.7%&#xA;[libx264 @ 0x7faab4808800] kb/s:799.80&#xA;[aac @ 0x7faab2036a00] Qavg: 189.523&#xA;

    &#xA;

  • Fragmented MP4 not playing in ffplay/QuickTime/Safari, but in VLC

    6 août 2020, par Stack64

    I encoded a fMP4-Video (HEVC) in Swift using VideoToolbox and CoreMedia. The resulting fragmented MP4 is only playing in VLC.

    &#xA;

    The library I am using to write the fMP4 is an HEVC-adapted version of this GitHub-Project : https://github.com/krad/morsel

    &#xA;

    Process of encoding and writing :

    &#xA;

      &#xA;
    1. VideoToolbox : Encoding SampleBuffer from the camera (VTCompressionSession, as described in WWDC 2014 Session 513)
    2. &#xA;

    3. Using CoreMedia-Functions (e.g. CMVideoFormatDescriptionGetHEVCParameterSetAtIndex, CMVideoFormatDescriptionGetDimensions) to get the encoded streams metadata. I am writing the content of CMFormatDescriptionGetExtension(description, extensionKey: "SampleDescriptionExtensionAtoms" as CFString)["hvcC"] directly to the hvcC box. This box is obviously written correctly, when I alter one bit of the box of the mp4, QuickTime throws an error.
    4. &#xA;

    5. I am appending the sample buffer data to the morsel-library, which manages fragmentation and creates the moof and mdat atoms.
    6. &#xA;

    &#xA;

    The result file is playable in VLC, when I just let the playback "run" without doing anything. When I scroll the time in VLC, VLC crashes and the playback stops.

    &#xA;

    It is also sort of "playable" in Safari and QuickTime (no error message shown, the playback window opens and the correct length of the file is shown, I can even change to playback time / play/pause, but there is no video shown. The window remains empty. And that is the problem I have. I need to get an fMP4 running in Safari and QuickTime.

    &#xA;

    The file is not playing at all in ffplay (same problem when converting with ffmpeg). The line where the playback time is shown remains nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0 , there are no error messages. The playback just does not start.&#xA;When playing the file with ffplay, this is the output :

    &#xA;

    ffplay version 4.3 Copyright (c) 2003-2020 the FFmpeg developers&#xA;  built with Apple clang version 11.0.3 (clang-1103.0.32.62)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;test.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 1&#xA;    compatible_brands: mp41mp42isomhlsf&#xA;    creation_time   : 2020-08-03T20:41:08.000000Z&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 1000000000.00 tbr, 1000000000.00 tbn, 1000000000.00 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-08-03T20:41:08.000000Z&#xA;      handler_name    : video&#xA;    nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0 &#xA;

    &#xA;

    My file has this structure :

    &#xA;

    ftyp&#xA;moov&#xA;    mvhd&#xA;    trak&#xA;        tkhd&#xA;        mdia&#xA;            mdhd&#xA;            hdlr&#xA;            minf&#xA;                vmhd&#xA;                dinf&#xA;                    dref&#xA;                stbl&#xA;                    stsd&#xA;                    stts&#xA;                    stsc&#xA;                    stsz&#xA;                    stco&#xA;    mvex&#xA;        trex&#xA;moof-(1)&#xA;mdat&#xA;moof-(2)&#xA;mdat &#xA;...&#xA;

    &#xA;

    The result file I want to create should be like the fMP4 served within this HLS playlist : (Example : https://developer.apple.com/streaming/examples/advanced-stream-hevc.html, Playlist : https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8)&#xA;This file has the following structure :

    &#xA;

    ftyp&#xA;moov&#xA;    mvhd&#xA;    trak&#xA;        tkhd&#xA;        mdia&#xA;            mdhd&#xA;            hdlr&#xA;            minf&#xA;                vmhd&#xA;                dinf&#xA;                    dref&#xA;                stbl&#xA;                    stsd&#xA;                    stts&#xA;                    stsc&#xA;                    stsz&#xA;                    stco&#xA;    trak (same structure as above)&#xA;    mvex&#xA;        trex&#xA;moof-(1)&#xA;mdat&#xA;moof-(2)&#xA;mdat &#xA;...&#xA;

    &#xA;

    This file from Apple plays perfectly in ffmpeg and QuickTime/Safari. Except for the second trak atom, it has the same structure.

    &#xA;

    The "good" file is : https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/v14/main.mp4 (It is intended for use in a HLS Playlist I've downloaded it with curl)

    &#xA;

    The "bad" file is : https://www.transfernow.net/ddl/fmp4_bad (link should work, tested it just now :) ). The video shows a slowly rotating sheet of paper.

    &#xA;

    Any suggestions what the problem with my file is ?&#xA;Thanks in advance !

    &#xA;