
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (26)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...) -
Les formats acceptés
28 janvier 2010, parLes 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 (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (4479)
-
Failed setup for format dxva2_vld : hwaccel initialisation returned error
13 juin 2023, par jamesMy program is a video player based on ffmpeg implementation, enabling d3d11va and dxva2 hardware acceleration to decode video frames, play most of the video is normal, only a small part of the video will report this error, ffmpeg printed log as follows :
I:2023-06-13 15:34:53 ms:887:No decoder device for codec found
I:2023-06-13 15:34:53 ms:887:Failed setup for format dxva2_vld : hwaccel initialisation returned error.
I:2023-06-13 15:34:53 ms:888:Format dxva2_vld not usable, retrying get_format() without it.
I:2023-06-13 15:34:53 ms:888:decode_slice_header error
I:2023-06-13 15:34:53 ms:888:no frame !


If ffplay is used and d3d11va and dxva2 hardware acceleration is not enabled, the video can be played normally, and the printed video information is as follows :
PS D :\msys64\home\wangj\ffmpeg-4.4.1\buildout\bin> .\ffplay.exe -i D :\Desktop\13132023061300012_1_C1_34.mp4
ffplay version 4.4.1 Copyright (c) 2003-2021 the FFmpeg developers
configuration : —prefix=./buildout —arch=x86 —toolchain=msvc —enable-shared —disable-debug —enable-sdl2 —enable-dxva2 —enable-d3d11va
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D :\Desktop\13132023061300012_1_C1_34.mp4' :
Metadata :
major_brand : isom
minor_version : 512
compatible_brands : isomiso2avc1mp41
encoder : Lavf56.38.102
Duration : 00:00:44.00, start : 0.000000, bitrate : 1706 kb/s
Stream #0:0(und) : Video : h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 1705 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
vendor_id : [0][0][0][0]


Is this pixel format not supported by d3d11va and dxva2 ? What can I do to get ffplay to play this video file with hardware acceleration ?


When d3d11va and dxva2 hardware acceleration is enabled, most of the videos that can be played also have yuv420p pixel format, why can't this video be played?


-
How can I concat several videos generated by MediaRecorder slices
28 mai 2023, par Bruno FranciscoI have the following frontend code :


const mediaRecorder = new MediaRecorder(stream, {
 mimeType: 'video/webm'
 });

 mediaRecorder.start(10000);

 mediaRecorder.ondataavailable = (e) => {
 const formData = new FormData();

 formData.append('video', new Blob([e.data], { 'type' : 'video/webm;' }));

 fetch('http://localhost/api/session/12/video/stream', {
 method: 'POST',
 body: formData,
 }).then(() => {
 console.log('success')
 }).catch((e) => {
 console.log('error')
 console.log(e);
 });
 };



Then, in the backend I'm saving the each 10 seconds video into a folder. Then, whenever the user finishes his session, we would like to stitch together all the videos together.


If the user has recorded for 20 seconds, we will have 2 videos of 10 seconds.


I have the following files in my folder :


erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin
hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv



I'm assuming that the first slice generated by
MediaRecord
includes the mime type, while the subsequent parts do not have mime types, generating a.bin
file.

Now, I run the following command to stitch all parts together :


ffmpeg -i erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin -i hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv -filter_complex "concat=n=2:v=0:a=1" -vn -y final-video.mp4



Then I get the following error :


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
[h264 @ 0xaaaaf1ad3a70] non-existing PPS 0 referenced
 Last message repeated 1 times

...

Input #0, h264, from 'erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (Baseline), yuv420p(tv, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, matroska,webm, from 'hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv':
 Metadata:
 encoder : Chrome
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #1:0(eng): Video: h264 (Baseline), yuv420p(tv, bt709, progressive), 1920x1080, SAR 1:1 DAR 16:9, 29.33 fps, 29.33 tbr, 1k tbn, 2k tbc (default)
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_0



Is there any way to stitch all files together ? Do I have to send the mime type on each time
ondataavailable
is called ?

-
FFMPEG Error : Padded dimensions smaller then input dimensions
17 mai 2023, par HekimenI have this ffmpeg command


ffmpeg -i input.mp4 \
-vf "scale=80:45:force_original_aspect_ratio=decrease,pad=80:45:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1,fps=1/5" \
-q:v 2 \
output/screenshot_%05d.jpg



but it returns error :


[Parsed_pad_1 @ 0x7f2014097f00] Padded dimensions cannot be smaller than input dimensions.
[Parsed_pad_1 @ 0x7f2014097f00] Failed to configure input pad on Parsed_pad_1
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!



I tried command without
pad
filter and checked all screenshots, they are all generated with resolution 60x45. When i use same command but changescale
andpad
to 160x90 resolution it works without any error.

I also checked ffmpeg manual for
pad
filter but i can't find anything helpful what should explain this error (https://ffmpeg.org/ffmpeg-filters.html#pad-1)

How to make this command work ?


I am using this ffmpeg version :


ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.3.1 (Alpine 10.3.1_git20211027) 20211027
 configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --disable-debug
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100