
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 (36)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
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" ; -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4746)
-
Blank video as the result of converting from bmp ffmpeg [duplicate]
1er juin 2021, par Артур Клочко

Update


I'm sorry, as I wrote I tried to play video via different variants and got nothing, but now I send it to myself via Telegram app, and it displays there correctly. It plays via Chrome also. Seems it is not the ffmpeg problem.


I uploaded it to my site, if you are not aware, please check it via stupid uwp app or Windows Media player if you are using Windows, and if you have the same problem, please feedback and I will report it as a bug





Recently I have been using ffmpeg to convert
jpg
file set tomp4
, and it was successfully. I used the next.bat
file to do it :

ffmpeg -framerate 60 -i out\%%d.jpg render.mp4



Now, I am trying to do the same, but with
bmp
files, generated as screenshots using WinApi. Images as themselves are absolutely correct - I can open them via photos app, or anything else. Images resolution is constant and equals 2002x773.

So now I am using the same
.bat
to make video :

ffmpeg -framerate 60 -i out\%%d.bmp render.mp4



It generates a tiny-size video (17 kb, for 10 bmp images, 5 mb each), that is opening by UWP video app or Windows Media program, but nothing is happening - no errors, yet no video length. If there are more images, the result video size also increases, but the video still doesn't play.


Full output from ffmpeg :


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 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
 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 'rnd\%d.bmp':
 Duration: 00:00:00.17, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: bmp, bgra, 2002x773, 60 tbr, 60 tbn, 60 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 052fed40] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2
[libx264 @ 052fed40] profile High 4:4:4 Predictive, level 4.2, 4:4:4, 8-bit
[libx264 @ 052fed40] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=4 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'caev.mp4':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 2002x773, q=-1--1, 60 fps, 15360 tbn, 60 tbc
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 10 fps=0.0 q=-1.0 Lsize= 16kB time=00:00:00.11 bitrate=1142.4kbits/s speed=0.151x
video:15kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.097639%
[libx264 @ 052fed40] frame I:1 Avg QP:18.80 size: 6840
[libx264 @ 052fed40] frame P:4 Avg QP:25.73 size: 1517
[libx264 @ 052fed40] frame B:5 Avg QP:35.54 size: 426
[libx264 @ 052fed40] consecutive B-frames: 20.0% 40.0% 0.0% 40.0%
[libx264 @ 052fed40] mb I I16..4: 21.1% 76.3% 2.6%
[libx264 @ 052fed40] mb P I16..4: 0.6% 0.3% 0.3% P16..4: 0.9% 0.6% 0.1% 0.0% 0.0% skip:97.0%
[libx264 @ 052fed40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 4.0% 0.2% 0.0% direct: 0.0% skip:95.6% L0:34.5% L1:64.6% BI: 0.9%
[libx264 @ 052fed40] 8x8 transform intra:73.8% inter:10.2%
[libx264 @ 052fed40] coded y,u,v intra: 1.8% 1.5% 1.5% inter: 0.1% 0.1% 0.1%
[libx264 @ 052fed40] i16 v,h,dc,p: 52% 47% 1% 0%
[libx264 @ 052fed40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 45% 8% 0% 0% 0% 0% 0% 0%
[libx264 @ 052fed40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 31% 32% 3% 0% 1% 2% 5% 2%
[libx264 @ 052fed40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 052fed40] ref P L0: 75.8% 4.1% 15.8% 4.3%
[libx264 @ 052fed40] ref B L0: 63.5% 34.8% 1.7%
[libx264 @ 052fed40] ref B L1: 97.6% 2.4%
[libx264 @ 052fed40] kb/s:721.78



-
How to resize an animated webp?
23 mai 2023, par shsfI want to be able to change the size of a dynamic webp.
Sample picture address : https://postimg.cc/2qpx5bQm
I found this website to do just that : https://ezgif.com/resize


So how can I implement something similar in my own program ?
I tried using ImageMagick7 or ffmpeg5, but failed.


environment :


[developer@Dev_Payment_229 ~]$ cat /etc/redhat-release


CentOS Linux release 7.8.2003 (Core)


1. tried ffmpeg :


[developer@Dev_Payment_229 ~]$ /opt/ffmpeg-5/ffmpeg -i b.webp -vf "scale=320:-1" b_320.webp
ffmpeg version 5.1.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --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
 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
[webp @ 0x7686f40] skipping unsupported chunk: ANIM
[webp @ 0x7686f40] skipping unsupported chunk: ANMF
 Last message repeated 10 times
[webp @ 0x7686f40] image data not found
[webp_pipe @ 0x7685700] Could not find codec parameters for stream 0 (Video: webp, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, webp_pipe, from 'b.webp':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: webp, none, 25 fps, 25 tbr, 25 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (webp (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[webp @ 0x7697600] skipping unsupported chunk: ANIM
[webp @ 0x7697600] skipping unsupported chunk: ANMF
 Last message repeated 10 times
[webp @ 0x7697600] image data not found
Error while decoding stream #0:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!



It seems that ffmpeg cannot recognize this dynamic webp image.


2. tried ImageMagick7


install :


yum -y install libwebp-devel libwebp-tools
[root@Dev_FTP_241 developer]# yum list installed | grep webp
libwebp.x86_64 0.3.0-11.el7 @updates
libwebp-devel.x86_64 0.3.0-11.el7 @updates
libwebp-tools.x86_64 0.3.0-11.el7 @updates




source code: https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-0.tar.gz
tar -xvf ImageMagick-7.1.1-0.tar.gz
./configure --with-webp --prefix=/usr/local/imagemagick
make
make install



single webp can be resized :


[root@Dev_FTP_241 developer]# /usr/local/imagemagick/bin/convert -resize 480 simple.webp simple_480.webp
Decoded /tmp/magick-LNPdXgk2zDpiuU6Qv9CpDups3560EATh. Dimensions: 2160 x 608. Now saving...
Saved file /tmp/magick-Q8JHRZZOXdp1r1x187eftzsFlw8AqAuo



but animated webp failed :


[root@Dev_FTP_241 developer]# /usr/local/imagemagick/bin/convert -resize 480 b.webp b_480.webp
Error! Decoding of an animated WebP file is not supported.
 Use webpmux to extract the individual frames or
 vwebp to view this image.
Decoding of /tmp/magick-jMiy7ytmAnBzpS8UpafCQ5B44BjDTUSD failed.
Status: 4 (UNSUPPORTED_FEATURE)
convert: delegate failed `'dwebp' -pam '%i' -o '%o'' @ error/delegate.c/InvokeDelegate/1924.
convert: unable to open file '/tmp/magick-D-NMEGWU_a0IypZWwTpYiWIE61nteoig': No such file or directory @ error/constitute.c/ReadImage/786.
convert: no images defined `b_480.webp' @ error/convert.c/ConvertImageCommand/3342.



-
Using ffserver to stream older IP cam MJPEG to RTSP
26 mai 2016, par tmar89I have an older Sony IP camera that has an MJPEG stream. I need to connect this to an NVR that only takes ONVIP or RTSP and I’m trying to use ffserver and ffmpeg to convert the MJPEG stream to RTSP but it’s not working. Any have some idea of what I may be doing wrong ? Saw an error in the attempted playback about an unsupported Protocol.
Here is my ffserver config :Port 8090
RTSPPort 5544
BindAddress 0.0.0.0
RTSPBindAddress 0.0.0.0
MaxClients 100
MaxBandwidth 10000
<feed>
File /tmp/feed27.ffm
FileMaxSize 5M
ACL allow 127.0.0.1
</feed>
<stream>
Format rtp
Feed feed27.ffm
NoAudio
VideoCodec mjpeg
VideoFrameRate 30
VideoSize 736x480
</stream>And here is the ffmpeg command I am using :
[tm@tele ffserver-rtsp]# ffmpeg -f mjpeg -r 30 -s 736x480 -i http://[CAMIP]/image http://localhost:8090/feed27.ffm
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mjpeg @ 0x1ece670]Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'http://[CAMIP]/image':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj422p, 736x480, 30 fps, 30 tbr, 1200k tbn, 30 tbc
Output #0, ffm, to 'http://localhost:8090/feed27.ffm':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: mjpeg, yuvj420p, 736x480, q=2-31, 200 kb/s, 1000k tbn, 30 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mjpeg @ 0x222d110]rc buffer underflow
frame= 640 fps= 17 q=31.4 size= 12884kB time=21.33 bitrate=4947.5kbits/sWhen I use VLC to open the stream, it cannot be found :
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://localhost:5544/stream27.mpg'. Check the log for details.Finally, using ffplay on the same machine :
[tm@tele tmp]# ffplay rtsp://localhost:5544/stream27.sdp
FFplay version 0.6.5, Copyright (c) 2003-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused
rtsp://localhost:5544/stream27.sdp: Protocol not supportedAnd here was the log from ffserver :
127.0.0.1:5000 - - "PLAY stream27.mpg/streamid=0 RTP/UDP"
[rtp @ 0x721dc0]Unsupported codec 8
127.0.0.1:0 - - "PLAY stream27.mpg/streamid=0 RTP/TCP"
[rtp @ 0x728cb0]Unsupported codec 8
127.0.0.1 - - [SETUP] "rtsp://localhost:5544/stream27.mpg/streamid=0 RTSP/1.0" 200 641