
Recherche avancée
Autres articles (67)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (4710)
-
FFMPEG parameter -sseof position is not “cutting” as expected
9 mai 2020, par VitaliiI have a regular recording of the desktop screen, indefinite in time. I want to keep in memory, only the last 30 seconds. My command looks like this, where I try to cut the video of the last 30 seconds, using
-sizeof -30
. But the entire length of the video is saved.

avfoundation -i '1'
it's my macbook screen


ffmpeg -rtbufsize 300M -sseof -30 -f avfoundation -i '1' -c:v libx264 -preset ultrafast -tune zerolatency -crf 25 ~/Desktop/output.mkv




System Macos 10.15

ffmpeg version 4.2.2



My full log



ffmpeg -rtbufsize 300M -sseof -30 -f avfoundation -i '1' -c:v libx264 -preset ultrafast -tune zerolatency -crf 25 ~/Desktop/output.mkv
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with Apple clang version 11.0.3 (clang-1103.0.32.59)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --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
 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
[AVFoundation input device @ 0x7fec8551cec0] Configuration of video device failed, falling back to default.
[avfoundation @ 0x7fec8600a200] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fec8600a200] Supported pixel formats:
[avfoundation @ 0x7fec8600a200] uyvy422
[avfoundation @ 0x7fec8600a200] yuyv422
[avfoundation @ 0x7fec8600a200] nv12
[avfoundation @ 0x7fec8600a200] 0rgb
[avfoundation @ 0x7fec8600a200] bgr0
[avfoundation @ 0x7fec8600a200] Overriding selected pixel format to use uyvy422 instead.
[avfoundation @ 0x7fec8600a200] Stream #0: not enough frames to estimate rate; consider increasing probesize
Cannot use -sseof, duration of 1 not known
Input #0, avfoundation, from '1':
 Duration: N/A, start: 107388.118500, bitrate: N/A
 Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 2560x1600, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fec869bee00] MB rate (16000000000) > level limit (16711680)
[libx264 @ 0x7fec869bee00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fec869bee00] profile High 4:2:2, level 6.2, 4:2:2 8-bit
[libx264 @ 0x7fec869bee00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 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=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, matroska, to '/Users/vitalii-artec3d/Desktop/output.mkv':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p, 2560x1600, q=-1--1, 1000k fps, 1k tbn, 1000k tbc
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 322 fps= 30 q=19.0 Lsize= 947kB time=00:00:10.80 bitrate= 718.0kbits/s speed=0.998x 
video:943kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.382723%
[libx264 @ 0x7fec869bee00] frame I:2 Avg QP:19.00 size:465715
[libx264 @ 0x7fec869bee00] frame P:320 Avg QP:19.30 size: 105
[libx264 @ 0x7fec869bee00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x7fec869bee00] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0% skip:99.9%
[libx264 @ 0x7fec869bee00] coded y,uvDC,uvAC intra: 36.9% 24.9% 21.0% inter: 0.0% 0.1% 0.0%
[libx264 @ 0x7fec869bee00] i16 v,h,dc,p: 66% 28% 4% 2%
[libx264 @ 0x7fec869bee00] i8c dc,h,v,p: 70% 16% 12% 1%
[libx264 @ 0x7fec869bee00] kb/s:23977740.00



-
FFmpeg Hardware Acceleration with NVENC produces Half Green output video
17 juin 2016, par Dan SandlandUsing the FFmpeg build found here : https://github.com/illuspas/ffmpeg-hw-win32
gcc 5.3.0
--enable-nvenc nvidia_video_sdk_6.0.1
--enable-libmfx Intel(R)_Media_SDK_2016.0.1
--enable-libfdk-aac 0.1.4
--enable-libspeex 1.2rc1
--enable-libx264 1:148.20150725
--enable-libopenh264 1.5.0
--enable-libx265 1.8
--enable-libopus 1.1.2
--enable-libmp3lame 3.99.5
--enable-libkvazaar 0.8.2./configure —prefix=/home/aliang/FFmpeg/x86_64 —enable-small —disable-debug —disable-doc —arch=x86_64 —cc=’ccache x86_64-w64-mingw32-gcc’ —cross-prefix=x86_64-w64-mingw32- —enable-cross-compile —target-os=mingw32 —enable-libfdk-aac —enable-libmp3lame —enable-libopus —enable-libspeex —enable-libx264 —enable-libx265 —enable-libmfx —enable-nvenc —enable-libopenh264 —enable-libkvazaar —enable-gpl —enable-nonfree
I’m running Windows on a MacBook Pro. I also tried with a more recent build and had the same output.
Input video is from sample-videos.com.
The ffmpeg command I am running is :
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
sample-out-nvenc.mp4 looks like this via ffplay or vlc :
When I grab a frame using jpeg2, the colors appear normal, but the height is squished.
ffmpeg -y -ss 15.5 -i sample.mp4 -vframes 1 -s 480x300 -f image2 grab.jpg
The ffprobe results for the output (sample-out-nvenc.mp4) :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:31.02, start: 0.021333, bitrate: 1994 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 1650 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 342 kb/s (default)
Metadata:
handler_name : SoundHandlerLastly the output from the nvenc encoding command :
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/home/aliang/FFmpeg/x86_64 --enable-small --disable-debug --disable-doc --arch=x86_64 --cc='ccache x86_64-w64-mingw32-gcc' --cross-prefix=x86_64-w64-mingw32- --enable-cross-compile --target-os=mingw32 --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libx264 --enable-libx265 --enable-libmfx --enable-nvenc --enable-libopenh264 --enable-libkvazaar --enable-gpl --enable-nonfree
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:31.00, start: 0.000000, bitrate: 1353 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 966 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Output #0, mp4, to 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Stream #0:0(und): Video: h264 (nvenc_h264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 2000 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.24.102 nvenc_h264
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1, fltp, 341 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.24.102 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (nvenc_h264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 774 fps=253 q=-0.0 Lsize= 7551kB time=00:00:30.99 bitrate=1995.6kbits/s speed=10.1x
video:6236kB audio:1297kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.243011%
[aac @ 000001cdd9900520] Qavg: 743.457 -
FFMPEG Error while processing the decoded data for stream #0:1
2 décembre 2020, par Michael Joseph AubryWhen using the FFMPEG command in my Lambda function I am getting this issue (version 4.2.1). When using it on my local machine it works fine (4.3.1).


Lambda Version Info


{
 data: 'ffmpeg version 4.2.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers\n' +
 'built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516\n' +
 'configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n' +
 'libavutil 56. 31.100 / 56. 31.100\n' +
 'libavcodec 58. 54.100 / 58. 54.100\n' +
 'libavformat 58. 29.100 / 58. 29.100\n' +
 'libavdevice 58. 8.100 / 58. 8.100\n' +
 'libavfilter 7. 57.100 / 7. 57.100\n' +
 'libswscale 5. 5.100 / 5. 5.100\n' +
 'libswresample 3. 5.100 / 3. 5.100\n' +
 'libpostproc 55. 5.100 / 55. 5.100\n'
}



Macbook Pro Version Info


{
 data: 'ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.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-videotoolbox --disable-libjack --disable- 
 indev=jack
 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
 libpostproc 55. 7.100 / 55. 7.100'
}



My goal with this command is to generate a thumbnail sprite sheet.


ffmpeg \
 -threads 8 \
 -ignore_editlist 1 \
 -i URL \
 -f image2 \
 -vf "select='not(mod(n,25))',setpts='N/(25*TB)',scale=180:180,tile=5x25" \ 
 -pix_fmt yuvj420p \
 -an \
 -qscale:v 28 \
 -vsync 0 \
 -preset veryfast \
 pipe:1



The same error occurs when I have a .jpg output on disk i.e
/tmp/test.jpg


This is the exact log from cloudwatch


{
 "errorType": "Error",
 "errorMessage": "ffmpeg exited with code 1: Error reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:1\nConversion failed!\n",
 "stack": [
 "Error: ffmpeg exited with code 1: Error reinitializing filters!",
 "Failed to inject frame into filter network: Invalid argument",
 "Error while processing the decoded data for stream #0:1",
 "Conversion failed!",
 "",
 " at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22)",
 " at ChildProcess.emit (events.js:314:20)",
 " at ChildProcess.EventEmitter.emit (domain.js:483:12)",
 " at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)"
 ]
}
</anonymous>


Here is the raw command using
fluent-ffmpeg
inside node.js

const passThrough = new stream.PassThrough();
 const fps = 25;
 const sWidth = 720 / 4;
 const sHeight = 1920 / 4;

 ffmpeg(s3Url)
 .setFfmpegPath("/opt/ffmpeg")
 .inputOptions([`-threads`, "8", "-ignore_editlist", "1"])
 .outputOptions([
 "-f",
 "image2",
 "-vf",
 `"select='not(mod(n,${fps}))',setpts='N/(${fps}*TB)',scale=${sWidth}:${sHeight},tile=5x25"`,
 "-pix_fmt",
 "yuvj420p",
 "-an",
 "-qscale:v",
 "28",
 "-vsync",
 "0",
 "-preset",
 "veryfast"
 ])
 .output(passThrough)
 .on("start", (cmdline) => console.log(cmdline))
 .on("progress", (progress) => {
 console.log(progress);
 })
 .on("error", (err) => {
 console.log(err);
 reject(err);
 })
 .run();



Additional log from cloudwatch


2020-12-02T18:42:55.023Z 2f334838-f748-4f2e-a639-15df0686ab4b INFO Error: ffmpeg exited with code 1: Error reinitializing filters!Failed to inject frame into filter network: Invalid argumentError while processing the decoded data for stream #0:1Conversion failed! at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22) at ChildProcess.emit (events.js:314:20) at ChildProcess.EventEmitter.emit (domain.js:483:12) at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
</anonymous>