Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (44)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (7722)

  • FFMPEG command runs in terminal but not by subprocess

    1er septembre 2022, par Basilique

    I am trying to run a bash command using the subprocess module from within python 3.10.

    


    The bash command is :

    


    ffmpeg -framerate 1 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4


    


    In terminal the command runs fine. Here is the output :

    


    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  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
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, image2, from '*.png':
  Duration: 00:16:39.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 895x332 [SAR 3937:3937 DAR 895:332], 1 fps, 1 tbr, 1 tbn, 1 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x55726ab95d00] using SAR=1/1
[libx264 @ 0x55726ab95d00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x55726ab95d00] profile High, level 2.2
[libx264 @ 0x55726ab95d00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=10 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=1 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
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 894x332 [SAR 1:1 DAR 447:166], q=-1--1, 1 fps, 16384 tbn, 1 tbc
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  173 fps=0.0 q=17.0 size=     512kB time=00:01:56.00 bitrate=  36.2kbits/frame=  351 fps=350 q=17.0 size=    1536kB time=00:04:54.00 bitrate=  42.8kbits/frame=  517 fps=343 q=17.0 size=    2560kB time=00:07:40.00 bitrate=  45.6kbits/frame=  725 fps=361 q=17.0 size=    3328kB time=00:11:08.00 bitrate=  40.8kbits/frame=  913 fps=364 q=17.0 size=    4352kB time=00:14:16.00 bitrate=  41.6kbits/frame=  999 fps=361 q=-1.0 Lsize=    4986kB time=00:16:36.00 bitrate=  41.0kbits/s speed= 360x    
video:4974kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.241361%
[libx264 @ 0x55726ab95d00] frame I:4     Avg QP: 6.12  size: 24072
[libx264 @ 0x55726ab95d00] frame P:346   Avg QP:12.94  size:  5708
[libx264 @ 0x55726ab95d00] frame B:649   Avg QP:18.19  size:  4655
[libx264 @ 0x55726ab95d00] consecutive B-frames:  5.8% 16.0% 20.1% 58.1%
[libx264 @ 0x55726ab95d00] mb I  I16..4: 59.1% 10.6% 30.4%
[libx264 @ 0x55726ab95d00] mb P  I16..4:  5.6%  0.6%  2.2%  P16..4: 10.5%  4.3%  2.3%  0.0%  0.0%    skip:74.5%
[libx264 @ 0x55726ab95d00] mb B  I16..4:  2.2%  0.1%  1.7%  B16..8: 16.9%  4.8%  1.6%  direct: 1.1%  skip:71.5%  L0:50.9% L1:45.2% BI: 3.9%
[libx264 @ 0x55726ab95d00] 8x8 transform intra:5.9% inter:10.4%
[libx264 @ 0x55726ab95d00] coded y,uvDC,uvAC intra: 20.1% 18.3% 17.3% inter: 4.7% 4.7% 4.6%
[libx264 @ 0x55726ab95d00] i16 v,h,dc,p: 66% 33%  1%  0%
[libx264 @ 0x55726ab95d00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18%  8% 73%  0%  0%  0%  0%  0%  0%
[libx264 @ 0x55726ab95d00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 31% 31%  2%  3%  2%  4%  2%  3%
[libx264 @ 0x55726ab95d00] i8c dc,h,v,p: 73% 23%  3%  0%
[libx264 @ 0x55726ab95d00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55726ab95d00] ref P L0: 57.2%  1.5% 24.3% 17.0%
[libx264 @ 0x55726ab95d00] ref B L0: 69.6% 24.8%  5.6%
[libx264 @ 0x55726ab95d00] ref B L1: 92.4%  7.6%
[libx264 @ 0x55726ab95d00] kb/s:40.78


    


    In my python script I tried the following solutions :

    


    video_cmd = """ffmpeg -framerate 1 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4"""

subprocess.run(shlex.split(video_cmd), shell=False, cwd=path_viz, stderr=subprocess.STDOUT, check=True, text=False)

subprocess.run(video_cmd, shell=True, cwd=path_viz, stderr=subprocess.STDOUT, check=True, text=False)


    


    as well as the solution proposed for this similar question

    


    subprocess.Popen(video_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)


    


    None of them worked. Apparently, the right command is run (output of the check_out function) :

    


    Command 'ffmpeg -y -framerate 1 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4' returned non-zero exit status 1.


    


    the first part of the job (up to Stream mapping:) is done also correctly :

    


    fmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
  configuration: --prefix=/home/rsghazanfari/anaconda3/envs/_cuda --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
Input #0, image2, from '*.png':
  Duration: 00:16:39.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 895x332 [SAR 3937:3937 DAR 895:332], 1 fps, 1 tbr, 1 tbn, 1 tbc


    


    but it then pops up the following error :

    


    Unknown encoder &#x27;libx264&#x27;&#xA;Traceback (most recent call last):&#xA;  File "/home/rsgh/anaconda3/envs/_cuda/lib/python3.10/code.py", line 90, in runcode&#xA;    exec(code, self.locals)&#xA;  File "<input />", line 1, in <module>&#xA;  File "/home/rsgh/anaconda3/envs/_cuda/lib/python3.10/subprocess.py", line 524, in run&#xA;    raise CalledProcessError(retcode, process.args,&#xA;&#xA;subprocess.CalledProcessError: Command &#x27;ffmpeg -y -framerate 1 -pattern_type glob -i &#x27;*.png&#x27; -c:v libx264 -pix_fmt yuv420p -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4&#x27; returned non-zero exit status 1.&#xA;</module>

    &#xA;

    Any ideas of why this error is produced in python while in terminal it runs fine ? Thank you in advance.

    &#xA;

    PS : ffmpeg -version outputs :

    &#xA;

    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers&#xA;built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)&#xA;configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;libavutil      56. 31.100 / 56. 31.100&#xA;libavcodec     58. 54.100 / 58. 54.100&#xA;libavformat    58. 29.100 / 58. 29.100&#xA;libavdevice    58.  8.100 / 58.  8.100&#xA;libavfilter     7. 57.100 /  7. 57.100&#xA;libavresample   4.  0.  0 /  4.  0.  0&#xA;libswscale      5.  5.100 /  5.  5.100&#xA;libswresample   3.  5.100 /  3.  5.100&#xA;libpostproc    55.  5.100 / 55.  5.100&#xA;

    &#xA;

    ubuntu version :

    &#xA;

    Distributor ID: Ubuntu&#xA;Description:    Ubuntu 20.04.4 LTS&#xA;Release:    20.04&#xA;Codename:   focal&#xA;

    &#xA;

  • AVPlayer currentTime not match with the displayed frame after many seeking. (HLS Stream)

    26 août 2022, par D.Bence

    I have a m3u8 file which i want to use with HLS.&#xA;link to m3u8 file

    &#xA;

    My problem is that when i seek many times, the currentTime not match with the displayed frame. I experience that, the more seeking there is more difference. (it's like a constant +offset)

    &#xA;

    Our use case is very timing sensitive, we need to stop the videos at specific positions. For this we use the following code :

    &#xA;

    [_player addBoundaryTimeObserverForTimes:times&#xA;      queue:dispatch_get_main_queue()&#xA;      usingBlock:^{&#xA;            weakSelf.player.rate = 0.0;&#xA;            // The time is correct here, but the displayed frame is not sync with this time&#xA;            CMTimeShow(weakSelf.player.currentTime);&#xA;      }&#xA;]   &#xA;

    &#xA;

    I read that AVURLAssetPreferPreciseDurationAndTimingKey can help, but the currentTime still wrong.

    &#xA;

    NSDictionary<nsstring> *options = @{AVURLAssetPreferPreciseDurationAndTimingKey:@YES};&#xA;AVURLAsset *urlAsset = [AVURLAsset URLAssetWithURL:url options:options];&#xA;AVPlayerItem *item = [AVPlayerItem playerItemWithAsset:urlAsset];&#xA;</nsstring>

    &#xA;

    I also read that there is a problem with the m3u8 itself. (for example wrong GOP size.)

    &#xA;

    What is the reason for the incorrect currentTime, and how can i fix this ?

    &#xA;

    ffprobe m3u8 :

    &#xA;

    ffprobe https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized.m3u8&#xA;ffprobe version 5.1 Copyright (c) 2007-2022 the FFmpeg developers&#xA;  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1 --enable-shared --enable-pthreads --enable-version3 --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-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;[hls @ 0x152f04280] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x152f04280] Skip (&#x27;#EXT-X-INDEPENDENT-SEGMENTS&#x27;)&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_6000000bitrate.m3u8&#x27; for reading&#xA;[hls @ 0x152f04280] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[https @ 0x154045000] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_15000000bitrate.m3u8&#x27; for reading&#xA;[hls @ 0x152f04280] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[https @ 0x154045000] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1520p_33000000bitrate.m3u8&#x27; for reading&#xA;[hls @ 0x152f04280] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_6000000bitrate_00001.ts&#x27; for reading&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_6000000bitrate_00002.ts&#x27; for reading&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_15000000bitrate_00001.ts&#x27; for reading&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1080p_15000000bitrate_00002.ts&#x27; for reading&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1520p_33000000bitrate_00001.ts&#x27; for reading&#xA;[hls @ 0x152f04280] Opening &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized1520p_33000000bitrate_00002.ts&#x27; for reading&#xA;Input #0, hls, from &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/released/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized.m3u8&#x27;:&#xA;  Duration: 00:49:43.00, start: 2.033367, bitrate: 0 kb/s&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 8133826&#xA;  Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 8133826&#xA;  Program 1&#xA;    Metadata:&#xA;      variant_bitrate : 18870392&#xA;  Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 18870392&#xA;  Program 2&#xA;    Metadata:&#xA;      variant_bitrate : 40776144&#xA;  Stream #0:2: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 2704x1520 [SAR 1:1 DAR 169:95], 29.97 fps, 29.97 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 40776144&#xA;

    &#xA;

    ffprobe original mp4 :

    &#xA;

    ffprobe https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/finalized/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized.mp4&#xA;ffprobe version 5.1 Copyright (c) 2007-2022 the FFmpeg developers&#xA;  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1 --enable-shared --enable-pthreads --enable-version3 --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-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;https://mrkresz-content-bucket.s3.eu-central-1.amazonaws.com/applicationData/extended-path-videos/4b0046fd-0be7-4a07-bc7c-c1a0069116b1/finalized/50816bc9-6118-4dd1-a90e-fb72652bb06f-final-from-anonymized.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:49:42.81, start: 0.000000, bitrate: 36142 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 2486x1398, 36138 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;

    &#xA;

  • ffmpeg failing to add png mask to video : Requested planes not available

    23 août 2022, par Alexandr Sugak

    I am trying to add png mask to make webm video round (cut off its corners).

    &#xA;

    The command I am using :

    &#xA;

    video="./dist/tmp/19_2.webm"&#xA;mask="./dist/tmp/mask.png"&#xA;output="./dist/tmp/circle.webm"&#xA;&#xA;ffmpeg -report -c:v libvpx-vp9 -i "${video}" -loop 1 -i "${mask}" -filter_complex " \&#xA;[1:v]alphaextract[alf];\&#xA;[0:v][alf]alphamerge" \&#xA;-c:a copy -c:v libvpx-vp9 "${output}"&#xA;

    &#xA;

    The command output :

    &#xA;

    sh ./scripts/video_mask.sh &#xA;ffmpeg started on 2022-08-23 at 17:27:48&#xA;Report written to "ffmpeg-20220823-172748.log"&#xA;Log level: 48&#xA;ffmpeg version 5.1-tessus Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;[libvpx-vp9 @ 0x7fa072f05140] v1.11.0-30-g888bafc78&#xA;    Last message repeated 1 times&#xA;Input #0, matroska,webm, from &#x27;./dist/tmp/19_2.webm&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf59.27.100&#xA;  Duration: 00:00:02.77, start: -0.007000, bitrate: 308 kb/s&#xA;  Stream #0:0(eng): Video: vp9 (Profile 0), yuva420p(tv, unknown/bt709/iec61966-2-1, progressive), 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn (default)&#xA;    Metadata:&#xA;      ALPHA_MODE      : 1&#xA;      ENCODER         : Lavc59.37.100 libvpx-vp9&#xA;      DURATION        : 00:00:02.744000000&#xA;  Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 libopus&#xA;      DURATION        : 00:00:02.767000000&#xA;Input #1, png_pipe, from &#x27;./dist/tmp/mask.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #1:0: Video: png, pal8(pc), 640x480 [SAR 2835:2835 DAR 4:3], 25 fps, 25 tbr, 25 tbn&#xA;[libvpx-vp9 @ 0x7fa082f04880] v1.11.0-30-g888bafc78&#xA;Stream mapping:&#xA;  Stream #0:0 (libvpx-vp9) -> alphamerge&#xA;  Stream #1:0 (png) -> alphaextract:default&#xA;  alphamerge:default -> Stream #0:0 (libvpx-vp9)&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[libvpx-vp9 @ 0x7fa082f04880] v1.11.0-30-g888bafc78&#xA;[Parsed_alphaextract_0 @ 0x7fa083906e80] Requested planes not available.&#xA;[Parsed_alphaextract_0 @ 0x7fa083906e80] Failed to configure input pad on Parsed_alphaextract_0&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Invalid argument&#xA;Error while processing the decoded data for stream #0:0&#xA;Conversion failed!&#xA;

    &#xA;

    I've tried different combination of codecs and pixel formats but I still get the same error. My initial understanding was that ffmpeg fails to find the alpha channel in the input video. By setting -c:v libvpx-vp9 option it looks like ffmpeg correctly picks up yuva420p pixel format but it still gives the same error.

    &#xA;

    What I am doing wrong ?

    &#xA;

    Update : if I remove the alphaextract step as suggested in comments, the ffmpeg starts processing video indefinitely (the video I use to test is only 2 sec long). If I specify the number of frames manually, then the output is generated but the mask does not seem to have any effect :

    &#xA;

    ffmpeg -c:v libvpx-vp9 -i "${video}" -loop 1 -i "${mask}" -filter_complex " \&#xA;[0:v][1:v]alphamerge" \&#xA;-c:a copy -b:v 2000k -vframes 60 "${output}"&#xA;

    &#xA;

     sh ./scripts/video_mask.sh &#xA;ffmpeg version 5.1-tessus Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;[libvpx-vp9 @ 0x7fdd6b005f00] v1.11.0-30-g888bafc78&#xA;    Last message repeated 1 times&#xA;Input #0, matroska,webm, from &#x27;./dist/tmp/19_2.webm&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf59.27.100&#xA;  Duration: 00:00:02.77, start: -0.007000, bitrate: 308 kb/s&#xA;  Stream #0:0(eng): Video: vp9 (Profile 0), yuva420p(tv, unknown/bt709/iec61966-2-1, progressive), 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn (default)&#xA;    Metadata:&#xA;      ALPHA_MODE      : 1&#xA;      ENCODER         : Lavc59.37.100 libvpx-vp9&#xA;      DURATION        : 00:00:02.744000000&#xA;  Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 libopus&#xA;      DURATION        : 00:00:02.767000000&#xA;Input #1, png_pipe, from &#x27;./dist/tmp/mask.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #1:0: Video: png, pal8(pc), 640x480 [SAR 2835:2835 DAR 4:3], 25 fps, 25 tbr, 25 tbn&#xA;File &#x27;./dist/tmp/circle.webm&#x27; already exists. Overwrite? [y/N] y&#xA;[libvpx-vp9 @ 0x7fdd6b007ec0] v1.11.0-30-g888bafc78&#xA;Stream mapping:&#xA;  Stream #0:0 (libvpx-vp9) -> alphamerge&#xA;  Stream #1:0 (png) -> alphamerge&#xA;  alphamerge:default -> Stream #0:0 (libvpx-vp9)&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[libvpx-vp9 @ 0x7fdd6b007ec0] v1.11.0-30-g888bafc78&#xA;[libvpx-vp9 @ 0x7fdd6b024580] v1.11.0-30-g888bafc78&#xA;Output #0, webm, to &#x27;./dist/tmp/circle.webm&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf59.27.100&#xA;  Stream #0:0: Video: vp9, yuva420p(tv, unknown/bt709/iec61966-2-1, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 2000 kb/s, 1k fps, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc59.37.100 libvpx-vp9&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;  Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 libopus&#xA;      DURATION        : 00:00:02.767000000&#xA;frame=   60 fps= 16 q=2.0 Lsize=     285kB time=00:00:01.98 bitrate=1175.5kbits/s speed=0.526x    &#xA;video:270kB audio:11kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.529399%&#xA;

    &#xA;