
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (61)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (8094)
-
How can I correctly provide a mock webcam video to Chrome ?
15 décembre 2022, par doppelgreenerI'm trying to run end-to-end testing in Chrome for a product that requires a webcam feed halfway through to operate. From what I understand this means providing a fake webcam video to Chrome using the
--use-file-for-fake-video-capture="/path/to/video.y4m"
command line argument. It will then use that as a webcam video.


However, no matter what y4m file I provide, I get the following error from Chrome running under these conditions :



DOMException: Could not start video source
{
 code: 0,
 message: "Could not start video source",
 name: "NotReadableError"
}




Notably I can provide an audio file just fine using
--use-file-for-fake-audio-capture
and Chrome will work with it well. The video has been my sticking point.


This error comes out of the following straightforward mediaDevices request :



navigator.mediaDevices.getUserMedia({ video: true, audio: true })
 .then(data => {
 // do stuff
 })
 .catch(err => {
 // oh no!
 });




(This always hits the “oh no !” branch when a video file is provided.)



What I've tried so far



I've been running Chrome with the following command line arguments (newlines added for readability), and I'm using a Mac hence the
open
command :




open -a "Google Chrome" --args
 --disable-gpu
 --use-fake-device-for-media-stream
 --use-file-for-fake-video-capture="~/Documents/mock/webcam.y4m"
 --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"




webcam.y4m
andmicrophone.wav
were generated from a video file I recorded.


I first recorded a twenty-second mp4 video using my browser's MediaRecorder, downloaded the result, and converted it using the following command line commands :



ffmpeg -y -i original.mp4 -f wav -vn microphone.wav
ffmpeg -y -i original.mp4 webcam.y4m




When this didn't work, I tried the same using a twenty-second movie file I recorded in Quicktime :



ffmpeg -y -i original.mov -f wav -vn microphone.wav
ffmpeg -y -i original.mov webcam.y4m




When that also failed, I went straight to the Chromium file that explains fake video capture, went to the example y4m file list it provided, and downloaded the grandma file and provided that as a command line argument to Chrome instead :



open -a "Google Chrome" --args
 --disable-gpu
 --use-fake-device-for-media-stream
 --use-file-for-fake-video-capture="~/Documents/mock/grandma_qcif.y4m"
 --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"




Chrome provides me with the exact same error in all of these situations.



The only time Chrome doesn't error out with that mediaDevices request is when I omit the video completely :



open -a "Google Chrome" --args
 --disable-gpu
 --use-fake-device-for-media-stream
 --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"




Accounting for C420mpeg2



TestRTC suggests Chrome will “crash” if I give it a
C420mpeg2
file, and recommends that simply replacing the metadata fixes the issue. Indeed the video file I generate from ffmpeg gives me the following header :


YUV4MPEG2 W1280 H720 F30:1 Ip A1:1 C420mpeg2 XYSCSS=420MPEG2




Chrome doesn't actually crash when run with this file, I just get the error above. If I edit the video file to the following header though per TestRTC's recommendations I get the same situation :



YUV4MPEG2 W1280 H720 F30:1 Ip A1:1 C420 XYSCSS=420MPEG2




The video file still gives me the above error in these conditions.



What can/should I do ?



How should I be providing a video file to Chrome for this command line argument ?



How should I be recording or creating the video file ?



How should I convert it to y4m ?


-
Dash output with ffmpeg not producing durations specified with -seg_duration
30 juillet 2022, par CodieThere is a .mp4 file of 35 MB and 51 seconds. I have to create 51 chunks, each corresponding to 1 second with a size of less than 1MB (the total size should be almost the same as the original file). Please note that I have to implement lossless converting.


I've tried many times, but it just produces about 10 files above 10 MB.



Command :


ffmpeg -re -i input.mp4 -map 0:v -c:v libx264 -crf 0 -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -use_template 1 -seg_duration 1 -window_size 60 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash ./dashTest/out.mpd




Command line log :


ffmpeg version 5.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2022-07-27T09:13:31.000000Z
 Duration: 00:00:50.03, start: 0.000000, bitrate: 5716 kb/s
 Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 5396 kb/s, 25 fps, 25 tbr, 25k tbn (default)
 Metadata:
 creation_time : 2022-07-27T09:13:31.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
 Metadata:
 creation_time : 2022-07-27T09:13:31.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000001d13acb0380] using SAR=1/1
[libx264 @ 000001d13acb0380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 000001d13acb0380] profile High 4:4:4 Predictive, level 3.1, 4:2:0, 8-bit
[libx264 @ 000001d13acb0380] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=120 keyint_min=61 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
[dash @ 000001d13a2a4680] No bit rate set for stream 0
[dash @ 000001d13a2a4680] Opening './dashTest/init-stream0.m4s' for writing
Output #0, dash, to './dashTest/out.mpd':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 encoder : Lavf59.27.100
 Stream #0:0(eng): Video: h264, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
 Metadata:
 creation_time : 2022-07-27T09:13:31.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00001.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.849x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00002.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.918x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00003.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.942x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00004.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.957x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00005.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.964x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00006.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.971x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00007.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.975x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00008.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.978x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00009.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.981x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00010.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.982x
[dash @ 000001d13a2a4680] Opening './dashTest/chunk-stream0-00011.m4s.tmp' for writing
[dash @ 000001d13a2a4680] Opening './dashTest/out.mpd.tmp' for writing0.983x
frame= 1250 fps= 25 q=-1.0 Lsize=N/A time=00:00:49.96 bitrate=N/A speed=0.992x
video:171641kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 000001d13acb0380] frame I:11 Avg QP: 0.00 size:255122
[libx264 @ 000001d13acb0380] frame P:1239 Avg QP: 0.00 size:139591
[libx264 @ 000001d13acb0380] mb I I16..4: 52.8% 8.8% 38.4%
[libx264 @ 000001d13acb0380] mb P I16..4: 3.9% 0.7% 1.3% P16..4: 28.0% 13.9% 11.3% 0.0% 0.0% skip:40.8%
[libx264 @ 000001d13acb0380] 8x8 transform intra:11.9% inter:33.4%
[libx264 @ 000001d13acb0380] coded y,uvDC,uvAC intra: 68.6% 80.1% 78.9% inter: 38.0% 47.1% 46.5%
[libx264 @ 000001d13acb0380] i16 v,h,dc,p: 65% 28% 5% 2%
[libx264 @ 000001d13acb0380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 33% 28% 2% 1% 1% 1% 1% 1%
[libx264 @ 000001d13acb0380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 36% 7% 3% 5% 3% 4% 3% 2%
[libx264 @ 000001d13acb0380] i8c dc,h,v,p: 17% 38% 44% 1%
[libx264 @ 000001d13acb0380] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001d13acb0380] ref P L0: 86.4% 7.6% 4.6% 1.4%
[libx264 @ 000001d13acb0380] kb/s:28121.58




.mpd file :


<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT50.0S" maxsegmentduration="PT1.0S" minbuffertime="PT9.6S">
 <programinformation>
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="25/1" maxwidth="1280" maxheight="720" par="16:9" lang="eng">
 <representation mimetype="video/mp4" codecs="avc1.f4001f" bandwidth="28122926" width="1280" height="720" sar="1:1">
 <segmenttemplate timescale="12800" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 <segmenttimeline>
 <s t="0" d="61440" r="9"></s>
 <s d="25600"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">
 </adaptationset>
 </period>
</mpd>




Please, if you want to put a negative point, mention your reason in the comments !



 -
7 Fintech Marketing Strategies to Maximise Profits in 2024
24 juillet 2024, par Erin