
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (42)
-
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 (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
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 (5142)
-
"Pixel format 'yuvj420p' is not supported" when converting image to video using CUDA hardware acceleration
11 février 2020, par laurentI’m trying to convert an image to a video using CUDA hardware acceleration but I can’t get it to work.
The basic command I have is this one :
ffmpeg -y -hwaccel cuvid -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4
And I’m getting this error :
[AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
[mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Invalid argumentI’ve tried setting the pixel format like so, but that didn’t help :
ffmpeg -y -hwaccel cuvid -pix_fmt yuv420p -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4
I’ve also tried many other flags but can’t get anything to work. Any idea what the issue might be ?
For information this is the full log :
ffmpeg version N-96615-gc35382a Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --enable-nonfree --disable-shared --enable-gpl --enable-openssl --enable-libx264 --enable-cuda-sdk --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/usr/local/ssl/include -I/usr/local/cuda/include -I/usr/local/include -L/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib' --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 67.101 / 58. 67.101
libavformat 58. 37.100 / 58. 37.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 73.100 / 7. 73.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, image2, from 'tests/MediaSamples/portrait_0.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 40237 kb/s
Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1600x900 [SAR 72:72 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
[mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
Error while decoding stream #0:0: Invalid argument
[libx264 @ 0x2d1e840] using SAR=1/1
[libx264 @ 0x2d1e840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x2d1e840] profile High, level 4.0
[libx264 @ 0x2d1e840] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=24 lookahead_threads=4 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=25 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.37.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1600x900 [SAR 72:72 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.67.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed! -
Using libav-tools versus libav built from source - video quality much worse
17 juin 2015, par kisloWe are trying to create a video from still images, running on Ubuntu 14.04.
If we have installed libav-tools then the output video is much higher quality than if we have installed libav manually. Unfortunately, we need to run a solution where libav is built from source, so we want to find out how to improve the quality.
Here is the console output for the libav-tools (higher quality) :
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
[image2 @ 0x22ae120] max_analyze_duration reached
Input #0, image2, from 'frame.%04d.jpg':
Duration: 00:00:10.00, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 1280x720 [PAR 1:1 DAR 16:9], 8 fps, 8 tbr, 8 tbn
[libx264 @ 0x22afac0] using SAR=1/1
[libx264 @ 0x22afac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x22afac0] profile High, level 3.1
[libx264 @ 0x22afac0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 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=8 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.25 aq=1:1.00
Output #0, mp4, to 'a1.mp4':
Metadata:
encoder : Lavf54.20.4
Stream #0.0: Video: libx264, yuvj420p, 1280x720 [PAR 1:1 DAR 16:9], q=-1--1, 8 tbn, 8 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> libx264)
Press ctrl-c to stop encoding
frame= 159 fps= 43 q=32766.0 Lsize= 1580kB time=19.62 bitrate= 659.3kbits/s
video:607kB audio:0kB global headers:0kB muxing overhead 160.388953%
[libx264 @ 0x22afac0] frame I:21 Avg QP:14.32 size: 21142
[libx264 @ 0x22afac0] frame P:132 Avg QP:16.12 size: 8691
[libx264 @ 0x22afac0] frame B:6 Avg QP:13.61 size: 3874
[libx264 @ 0x22afac0] consecutive B-frames: 95.0% 0.0% 0.0% 5.0%
[libx264 @ 0x22afac0] mb I I16..4: 37.4% 61.4% 1.2%
[libx264 @ 0x22afac0] mb P I16..4: 9.1% 19.2% 0.3% P16..4: 6.2% 2.8% 1.3% 0.0% 0.0% skip:61.1%
[libx264 @ 0x22afac0] mb B I16..4: 1.8% 2.0% 0.0% B16..8: 31.9% 7.1% 0.7% direct: 9.2% skip:47.3% L0:69.8% L1:29.5% BI: 0.8%
[libx264 @ 0x22afac0] 8x8 transform intra:65.0% inter:92.8%
[libx264 @ 0x22afac0] coded y,uvDC,uvAC intra: 36.3% 31.8% 7.1% inter: 3.6% 6.0% 0.7%
[libx264 @ 0x22afac0] i16 v,h,dc,p: 74% 14% 6% 6%
[libx264 @ 0x22afac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 24% 32% 5% 2% 3% 2% 1% 3%
[libx264 @ 0x22afac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 51% 23% 9% 2% 3% 6% 3% 1% 2%
[libx264 @ 0x22afac0] i8c dc,h,v,p: 52% 20% 25% 2%
[libx264 @ 0x22afac0] Weighted P-Frames: Y:6.8% UV:6.1%
[libx264 @ 0x22afac0] ref P L0: 58.1% 6.2% 12.1% 22.6% 0.9%
[libx264 @ 0x22afac0] ref B L0: 83.0% 16.3% 0.7%
[libx264 @ 0x22afac0] ref B L1: 93.5% 6.5%
[libx264 @ 0x22afac0] kb/s:649.85Here is the console output for libav built manually (lower quality) :
avconv version 11.4, Copyright (c) 2000-2014 the Libav developers
built on Jun 17 2015 02:19:28 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
[image2 @ 0x329f140] max_analyze_duration 5000000 reached
Input #0, image2, from 'frame.%04d.jpg':
Duration: 00:00:10.00, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 1280x720 [PAR 1:1 DAR 16:9], 8 fps, 8 tbn
Output #0, mp4, to 'a2.mp4':
Metadata:
encoder : Lavf56.1.0
Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 8 fps, 8 tbn, 8 tbc
Metadata:
encoder : Lavc56.1.0 mpeg4
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
Press ctrl-c to stop encoding
frame= 159 fps= 0 q=31.0 Lsize= 902kB time=19.75 bitrate= 374.2kbits/s
video:900kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 0.239928%In case it helps : the images are named frame.0000.jpg, frame.0001.jpg, etc., so our command is :
avconv -y -f image2 -r 8 -i frame.%04d.jpg -vf "setpts=2*PTS" videofile.mp4
for both runs shown above. Any help would be hugely appreciated ! -
How to convert webp images to MP4 video using ffmpeg
12 octobre 2016, par Sunny TambiI have tried many possible command line options with ffmpeg, however not getting this to work. I want to convert series of webp images to a mp4 video.
Some commands that i tried are :ffmpeg -i img%04d.webp out.mp4
ffmpeg -i img%04d.webp -c:v libx264 out.mp4
ffmpeg -i img%04d.webp -pix_fmt yuv420p out.mp4
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 out.mp4
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 -b:v 0 out.mp4None of them creates an mp4 video. A mp4 file, though, gets created, however it is of 0 sec. Here is a sample output of one of the execution :
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 -y out.mp4
ffmpeg version N-81045-g450cf40 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 42.100 / 57. 42.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, image2, from 'img%04d.webp':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: webp, yuva420p(tv, bt470bg/unknown/unknown), 320x568, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 00000000006dbbc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000000006dbbc0] profile High, level 2.1
[libx264 @ 00000000006dbbc0] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 00000000006d8700] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf57.42.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x568, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.50.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (webp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=30.0 Lsize= 3kB time=00:00:00.00 bitrate=265435.9kbits/s speed=0.011x video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 44.661823%
[libx264 @ 00000000006dbbc0] frame I:1 Avg QP:23.37 size: 1100
[libx264 @ 00000000006dbbc0] mb I I16..4: 24.4% 71.5% 4.0%
[libx264 @ 00000000006dbbc0] 8x8 transform intra:71.5%
[libx264 @ 00000000006dbbc0] coded y,uvDC,uvAC intra: 6.1% 5.4% 4.2%
[libx264 @ 00000000006dbbc0] i16 v,h,dc,p: 80% 14% 6% 1%
[libx264 @ 00000000006dbbc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 5% 48% 0% 0% 0% 0% 0% 0%
[libx264 @ 00000000006dbbc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 20% 42% 2% 2% 2% 2% 2% 3%
[libx264 @ 00000000006dbbc0] i8c dc,h,v,p: 89% 9% 1% 0%
[libx264 @ 00000000006dbbc0] kb/s:220.00Excerpt from the above :
frame=1
fps=0.0
time=00:00:00.00
video:2kBThis should give the idea of what I am trying to say.
Need help if someone can tell how to convert a series of webp images to MP4 video.