Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (36)

  • 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 ;

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4716)

  • hls.js starting a beginning with ANDROID mobile (chrome, webview also) and not live *** but works very nice in deskto, ios .. hls.js 1.0.0 2021-04-01

    27 avril 2021, par Jintor

    I'm streaming a .m3u8 with the latest hls.js 1.0.0 (not rc) but version of 2021-04-01...

    


    example : the stream began at 5pm, and now it's 5:15 pm...

    


    the stream start at live point in almost all browsers

    


    The pattern I see here : ALL browsers in android (tested in Android 10) won't start at live point, only at 0...

    


    I did all the tests

    


    • Safari desktop => stream live at 5:15

    


    • Safari mobile => stream live at 5:15

    


    • WebView (Android) => ••• ISSUE : the player starts the stream at 0 (5pm)

    


    • WKWebView (apple IOS iphone,ipad) => stream live at 5:15

    


    • Chrome Desktop (mac/win) => stream live at 5:15

    


    • Chrome MOBILE (Android) => ••• ISSUE : the player starts the stream at 0 (5pm)

    


    • Chrome MOBILE (iPhone) => stream live at 5:15

    


    • Microsoft EDGE Desktop => stream live at 5:15

    


    • Microsoft EDGE mobile (android) => ••• ISSUE : the player starts the stream at 0 (5pm)

    


    • Firefox Desktop (mac/win) => stream live at 5:15

    


    • Opera Desktop (mac/win) => stream live at 5:15

    


    • Opera Mini (iPhone) => stream live at 5:15

    


    • Opera Mini (android) => ••• ISSUE : the player starts the stream at 0 (5pm)

    


    • Brave Desktop (mac/win) => stream live at 5:15

    


    • Brave Mobile (iPhone) => stream live at 5:15

    


    • Brave Mobile (android) => ••• ISSUE : the player starts the stream at 0 (5pm)

    


    This code

    


    <code class="echappe-js">&lt;script src=&quot;https://cdn.jsdelivr.net/npm/hls.js@latest&quot;&gt;&lt;/script&gt;&#xA;    

    &#xA; &lt;script&gt;&amp;#xA;      var video = document.getElementById(&quot;video&quot;);&amp;#xA;      var videoSrc = &quot;https://www.example1.com/streaming/index.m3u8&quot;;&amp;#xA;      if (video.canPlayType(&quot;application/vnd.apple.mpegurl&quot;)) {&amp;#xA;        video.src = videoSrc;&amp;#xA;      } else if (Hls.isSupported()) {&amp;#xA;         var config = {&amp;#xA;            autoStartLoad: true,&amp;#xA;            startPosition: -1,&amp;#xA;            debug: false,&amp;#xA;            capLevelOnFPSDrop: false,&amp;#xA;            capLevelToPlayerSize: false,&amp;#xA;            defaultAudioCodec: undefined,&amp;#xA;            initialLiveManifestSize: 1,&amp;#xA;            maxBufferLength: 30,&amp;#xA;            maxMaxBufferLength: 500,&amp;#xA;            backBufferLength: Infinity,&amp;#xA;            maxBufferSize: 60 * 1000 * 1000,&amp;#xA;            maxBufferHole: 0.5,&amp;#xA;            highBufferWatchdogPeriod: 2,&amp;#xA;            nudgeOffset: 0.1,&amp;#xA;            nudgeMaxRetry: 3,&amp;#xA;            maxFragLookUpTolerance: 0.25,&amp;#xA;            liveSyncDurationCount: 3,&amp;#xA;            liveMaxLatencyDurationCount: Infinity,&amp;#xA;            liveDurationInfinity: false,&amp;#xA;            enableWorker: true,&amp;#xA;            enableSoftwareAES: true,&amp;#xA;            manifestLoadingTimeOut: 10000,&amp;#xA;            manifestLoadingMaxRetry: 1,&amp;#xA;            manifestLoadingRetryDelay: 1000,&amp;#xA;            manifestLoadingMaxRetryTimeout: 64000,&amp;#xA;            startLevel: undefined,&amp;#xA;            levelLoadingTimeOut: 10000,&amp;#xA;            levelLoadingMaxRetry: 4,&amp;#xA;            levelLoadingRetryDelay: 1000,&amp;#xA;            levelLoadingMaxRetryTimeout: 64000,&amp;#xA;            fragLoadingTimeOut: 20000,&amp;#xA;            fragLoadingMaxRetry: 6,&amp;#xA;            fragLoadingRetryDelay: 1000,&amp;#xA;            fragLoadingMaxRetryTimeout: 64000,&amp;#xA;            startFragPrefetch: false,&amp;#xA;            testBandwidth: true,&amp;#xA;            progressive: false,&amp;#xA;            lowLatencyMode: true,&amp;#xA;            fpsDroppedMonitoringPeriod: 5000,&amp;#xA;            fpsDroppedMonitoringThreshold: 0.2,&amp;#xA;            appendErrorMaxRetry: 3,&amp;#xA;            enableWebVTT: true,&amp;#xA;            enableIMSC1: true,&amp;#xA;            enableCEA708Captions: true,&amp;#xA;            stretchShortVideoTrack: false,&amp;#xA;            maxAudioFramesDrift: 1,&amp;#xA;            forceKeyFrameOnDiscontinuity: true,&amp;#xA;            abrEwmaFastLive: 3.0,&amp;#xA;            abrEwmaSlowLive: 9.0,&amp;#xA;            abrEwmaFastVoD: 3.0,&amp;#xA;            abrEwmaSlowVoD: 9.0,&amp;#xA;            abrEwmaDefaultEstimate: 500000,&amp;#xA;            abrBandWidthFactor: 0.95,&amp;#xA;            abrBandWidthUpFactor: 0.7,&amp;#xA;            abrMaxWithRealBitrate: false,&amp;#xA;            maxStarvationDelay: 4,&amp;#xA;            maxLoadingDelay: 4,&amp;#xA;            minAutoBitrate: 0,&amp;#xA;            emeEnabled: false&amp;#xA;        };&amp;#xA;        var hls = new Hls(config);&amp;#xA;        hls.loadSource(videoSrc);&amp;#xA;        hls.attachMedia(video);&amp;#xA;      }   &amp;#xA;      video.addEventListener(&quot;loadedmetadata&quot;, function(){ video.muted = true; video.play(); }, false);&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    // here I added video.muted = true ; video.play() ; to auto start, if I try to autoplay unmuted, many browsers refuse this command...

    &#xA;

    // playsinline="true" is NEEDED for safari

    &#xA;

    ••••••• THE FFMPEG COMMAND (working : it allows me to have 3 to 4 seconds delay ••••••

    &#xA;

    ffmpeg -re -i input.x -c:a aac -c:v libx264 &#xA;-movflags &#x2B;dash -preset ultrafast &#xA;-crf 28 -refs 4 -qmin 4 -pix_fmt yuv420p &#xA;-tune zerolatency -c:a aac -ac 2 -profile:v main &#xA;-flags -global_header -bufsize 969k &#xA;-hls_time 1 -hls_list_size 0 -g 30 &#xA;-start_number 0 -streaming 1 -hls_playlist 1 &#xA;-lhls 1 -hls_playlist_type event -f hls path_to_index.m3u8&#xA;

    &#xA;

    •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

    &#xA;

    How can this be fixed ?

    &#xA;

    How can I make play at live point on load in android MOBILE ?

    &#xA;

  • FFmpeg overlay PNG has not necessary black borders

    24 mars 2021, par Mikołaj Henklewski

    I have a few PNG files that I want to add to the video :

    &#xA;

    &#xA;

    but on the final video, some of them have black borders (they do not have it originally !) Actual Result.. The question is why FFmpeg is adding it, and how to avoid adding it ? Command is :

    &#xA;

    ffmpeg -i 3d9678e2e58c4d08a24363468d0cfd3e.mp4 -i caption-1616544596077.png -i caption-1616544596080.png -i caption-1616544597262.png -i caption-1616544598027.png -filter_complex "[1:v]format=rgba,colorchannelmixer=aa=1[1_alpha];&#xA;[1_alpha]setpts=1.0*PTS[1_alpha_speed];  [1_alpha_speed]rotate=6.178465552059927:c=none:ow=rotw(6.178465552059927):oh=roth(6.178465552059927)[1_alpha_speed_rot];&#xA;[1_alpha_speed_rot]scale=iw/2:ih/2[1_alpha_speed_rot_scale];&#xA;[0:v][1_alpha_speed_rot_scale]overlay=x=288:y=50:enable=&#x27;between(t,0,3.2)&#x27;:format=rgb[1_out];&#xA;[2:v]format=rgba,colorchannelmixer=aa=1[2_alpha];&#xA;[2_alpha]setpts=1.0*PTS[2_alpha_speed];&#xA;[2_alpha_speed]rotate=0.0:c=none:ow=rotw(0.0):oh=roth(0.0)[2_alpha_speed_rot];&#xA;[2_alpha_speed_rot]scale=iw/2:ih/2[2_alpha_speed_rot_scale];&#xA;[1_out][2_alpha_speed_rot_scale]overlay=x=589:y=71:enable=&#x27;between(t,0,3.2)&#x27;:format=rgb[2_out];&#xA;[3:v]format=rgba,colorchannelmixer=aa=1[3_alpha];&#xA;[3_alpha]setpts=1.0*PTS[3_alpha_speed]; [3_alpha_speed]rotate=6.178465552059927:c=none:ow=rotw(6.178465552059927):oh=roth(6.178465552059927)[3_alpha_speed_rot];&#xA;[3_alpha_speed_rot]scale=iw/2:ih/2[3_alpha_speed_rot_scale];&#xA;[2_out][3_alpha_speed_rot_scale]overlay=x=409:y=104:enable=&#x27;between(t,0,3.2)&#x27;:format=rgb[3_out];&#xA;[4:v]format=rgba,colorchannelmixer=aa=1[4_alpha];&#xA;[4_alpha]setpts=1.0*PTS[4_alpha_speed];&#xA;[4_alpha_speed]rotate=0.0:c=none:ow=rotw(0.0):oh=roth(0.0)[4_alpha_speed_rot];&#xA;[4_alpha_speed_rot]scale=iw/2:ih/2[4_alpha_speed_rot_scale];&#xA;[3_out][4_alpha_speed_rot_scale]overlay=x=593:y=337:enable=&#x27;between(t,0,3.2)&#x27;:format=rgb" -preset ultrafast -crf 23 d4d85756d7b54735b95720f9280bf6e2.mp4&#xA;

    &#xA;

    Here is also log from ffmpeg :

    &#xA;

    ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 12.0.0 (clang-1200.0.32.29)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.2_1 --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-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox&#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;3d9678e2e58c4d08a24363468d0cfd3e.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.77.100&#xA;  Duration: 00:00:03.72, start: 0.000000, bitrate: 2333 kb/s&#xA;    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2331 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;Input #1, png_pipe, from &#x27;caption-1616544596077.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #1:0: Video: png, rgba(pc), 1382x884, 25 tbr, 25 tbn, 25 tbc&#xA;Input #2, png_pipe, from &#x27;caption-1616544596080.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #2:0: Video: png, rgba(pc), 612x612, 25 tbr, 25 tbn, 25 tbc&#xA;Input #3, png_pipe, from &#x27;caption-1616544597262.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #3:0: Video: png, rgba(pc), 720x266, 25 tbr, 25 tbn, 25 tbc&#xA;Input #4, png_pipe, from &#x27;caption-1616544598027.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #4:0: Video: png, rgba(pc), 304x170, 25 tbr, 25 tbn, 25 tbc&#xA;File &#x27;d4d85756d7b54735b95720f9280bf6e2.mp4&#x27; already exists. Overwrite? [y/N] y&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> overlay:main&#xA;  Stream #1:0 (png) -> format&#xA;  Stream #2:0 (png) -> format&#xA;  Stream #3:0 (png) -> format&#xA;  Stream #4:0 (png) -> format&#xA;  overlay -> Stream #0:0 (libx264)&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x7fb2c7015a00] using SAR=1/1&#xA;[libx264 @ 0x7fb2c7015a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x7fb2c7015a00] profile High 4:4:4 Predictive, level 3.1, 4:4:4, 8-bit&#xA;[libx264 @ 0x7fb2c7015a00] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0&#xA;Output #0, mp4, to &#x27;d4d85756d7b54735b95720f9280bf6e2.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: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#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;frame=   17 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   93 fps=0.0 q=-1.0 Lsize=     972kB time=00:00:03.68 bitrate=2164.1kbits/s speed=4.01x&#xA;video:971kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.121794%&#xA;[libx264 @ 0x7fb2c7015a00] frame I:1     Avg QP:20.00  size: 90127&#xA;[libx264 @ 0x7fb2c7015a00] frame P:92    Avg QP:18.23  size:  9821&#xA;[libx264 @ 0x7fb2c7015a00] mb I  I16..4: 100.0%  0.0%  0.0%&#xA;[libx264 @ 0x7fb2c7015a00] mb P  I16..4:  1.7%  0.0%  0.0%  P16..4: 19.9%  0.0%  0.0%  0.0%  0.0%    skip:78.4%&#xA;[libx264 @ 0x7fb2c7015a00] coded y,u,v intra: 33.9% 3.1% 5.2% inter: 8.6% 0.9% 0.8%&#xA;[libx264 @ 0x7fb2c7015a00] i16 v,h,dc,p: 29% 34% 19% 18%&#xA;[libx264 @ 0x7fb2c7015a00] kb/s:2136.99&#xA;

    &#xA;

  • ffmpeg : Create a fake shadow below alpha channel webm/png sequence

    6 mai 2021, par Beneos Battlemaps

    Purpose : I'd like to render out animated 3D meshes as png sequence to use them as animated tokens for virtual tabletop games. To make the mesh looks more natural I'd like to create a fake show beneath the actual token.

    &#xA;

    Problem : I have a png sequence 1 (as well as a webm file created with ffmpet out of this png sequence if it makes it easier) with alpha channel. To create the webm I use :&#xA;ffmpeg -framerate 24 -f image2 -i Idle_Top.%04d.png -c:v libvpx-vp9 -crf 25 -pix_fmt yuva420p Idle_Top.webm (If its relevant). I'd like to render out the png sequence to a webm file that have the current images as well as the transparent shadow beneath the token combined.

    &#xA;

    Possible workflow : I think a good way to achieve the wanted shadow effect is to use the alpha channel image as a mask on a black picture with the same resolution as the source image 2. Then you have a complete black version of the image. Then you need to place this image beneath the colored image and make a offset of 10px left and 10px down to create the ilusion of perspective 3. At the end the black image below the colored image must have a transparency as well ( 30% visibility should be enough) 4.

    &#xA;

    Workflow overview

    &#xA;

    Assets : I've put the webm file and the png files on my gDrive https://drive.google.com/drive/folders/1wznGaPwhKc2UyPpSZBSISa1gs3oixsHR?usp=sharing

    &#xA;

    Though I work with ffmpeg on a regular basis I have no clue where to start. Can you please help me out with this interesting problem ?

    &#xA;

    Best regards&#xA;Ben

    &#xA;