
Recherche avancée
Autres articles (70)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (7036)
-
ffmpeg hangs when running -i in alpine docker container cron job
14 mai 2021, par Richard Westby-NunnI'm see strange behaviour in ffmpeg not running the -i option ONLY when running as a cron job. I can run the command fine directly via the shell. The the cronjob command runs, and it even "starts" the ffmpeg "executable", but it then hangs when it gets to the -i option and arguments.


I have included a copy of a working output when run from the shell prompt to demonstrate what the output should show.


alpine : 3.13.5


docker image : alpine:latest (date : 2021-05-14)


docker run :


docker run -v s:\_docker\_alpine-test:/media/pi --name alpine -it alpine crond -f -l8


crontab script :


/media/pi/_site/pics-alpine.sh 2>&1 | tee /media/pi/_site/alpine.log


/media/pi/_site/pics-alpine.sh script :


#!/bin/ash

set -xv

echo "START"

#encode jpgs to mp4
/usr/bin/ffmpeg -i /media/pi/to-video-back/%04d.jpg /media/pi/_site/back/back-latest.mp4

echo "END"



The output of the log file is :


echo "START"
+ echo START
START

### encode jpgs to mp4
/usr/bin/ffmpeg -i /media/pi/to-video-back/%04d.jpg /media/pi/_site/back/back-latest.mp4
+ /usr/bin/ffmpeg -i '/media/pi/to-video-back/%04d.jpg' /media/pi/_site/back/back-latest.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.1 (Alpine 10.2.1_git20210328) 20210328
 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-vaapi --enable-vdpau --enable-libopus --enable-vulkan --enable-libsoxr --enable-libwebp --enable-libaom --disable-debug



Script output when run directly from the shell prompt :


/media/pi/_site # ./pics-alpine.sh

echo "START"
+ echo START
START

### encode jpgs to mp4
/usr/bin/ffmpeg -i /media/pi/to-video-back/%04d.jpg /media/pi/_site/back/back-latest.mp4
+ /usr/bin/ffmpeg -i '/media/pi/to-video-back/%04d.jpg' /media/pi/_site/back/back-latest.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.1 (Alpine 10.2.1_git20210328) 20210328
 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-vaapi --enable-vdpau --enable-libopus --enable-vulkan --enable-libsoxr --enable-libwebp --enable-libaom --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
Input #0, image2, from '/media/pi/to-video-back/%04d.jpg':
 Duration: 00:00:00.96, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1280x960, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fd9cf099b00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fd9cf099b00] profile High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0x7fd9cf099b00] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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=12 lookahead_threads=2 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 '/media/pi/_site/back/back-latest.mp4':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1280x960, q=2-31, 25 fps, 12800 tbn
 Metadata:
 encoder : Lavc58.134.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 24 fps=0.0 q=-1.0 Lsize= 25kB time=00:00:00.84 bitrate= 242.1kbits/s speed=1.56x
video:24kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.565835%
[libx264 @ 0x7fd9cf099b00] frame I:2 Avg QP:17.30 size: 3693
[libx264 @ 0x7fd9cf099b00] frame P:11 Avg QP:20.46 size: 854
[libx264 @ 0x7fd9cf099b00] frame B:11 Avg QP:22.05 size: 623
[libx264 @ 0x7fd9cf099b00] consecutive B-frames: 29.2% 25.0% 12.5% 33.3%
[libx264 @ 0x7fd9cf099b00] mb I I16..4: 14.6% 83.5% 2.0%
[libx264 @ 0x7fd9cf099b00] mb P I16..4: 3.0% 2.2% 0.0% P16..4: 5.2% 0.1% 0.1% 0.0% 0.0% skip:89.3%
[libx264 @ 0x7fd9cf099b00] mb B I16..4: 0.4% 0.1% 0.0% B16..8: 6.5% 0.0% 0.0% direct: 0.1% skip:92.9% L0:35.0% L1:64.8% BI: 0.2%
[libx264 @ 0x7fd9cf099b00] 8x8 transform intra:73.3% inter:94.3%
[libx264 @ 0x7fd9cf099b00] coded y,uvDC,uvAC intra: 8.5% 12.1% 0.5% inter: 0.7% 3.3% 0.0%
[libx264 @ 0x7fd9cf099b00] i16 v,h,dc,p: 77% 15% 6% 2%
[libx264 @ 0x7fd9cf099b00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 71% 6% 20% 1% 1% 0% 1% 0% 0%
[libx264 @ 0x7fd9cf099b00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 55% 13% 24% 1% 3% 1% 1% 1% 1%
[libx264 @ 0x7fd9cf099b00] i8c dc,h,v,p: 92% 4% 4% 0%
[libx264 @ 0x7fd9cf099b00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fd9cf099b00] ref P L0: 57.6% 2.5% 30.8% 9.1%
[libx264 @ 0x7fd9cf099b00] ref B L0: 70.2% 27.6% 2.2%
[libx264 @ 0x7fd9cf099b00] ref B L1: 98.5% 1.5%
[libx264 @ 0x7fd9cf099b00] kb/s:196.96

echo "END"
+ echo END
END



As you can see from the above, when run from the shell prompt it starts ffmpeg and then processes the arguments. But when running as cron, it opens ffmpeg, but ignores, or hangs on the processing of the arguments.


Lastly, I have the following show up in ps ax when I do a check to see what is running :


58 root 0:00 /bin/ash -c /media/pi/_site/pics-alpine.sh 2>&1 | tee /media/pi/_site/alpine.log
 59 root 0:00 {pics-alpine.sh} /bin/ash /media/pi/_site/pics-alpine.sh
 60 root 0:00 tee /media/pi/_site/alpine.log
 61 root 0:00 /usr/bin/ffmpeg -i /media/pi/to-video-back/%04d.jpg /media/pi/_site/back/back-latest.mp4



Those are just sitting there as though they are waiting on input, so I suspect the ffmpeg has a bug, or my cron is not passing the arguments correctly.


Any thoughts on how to fix this ?


-
ffmpeg 4.4 problem with image2 combined with stream loop -1 and overlay
14 mai 2021, par codeSamI have a python app and my code to stream ffmpeg is :


'ffmpeg',
'-thread_queue_size', '1024',
'-i', 'rtsp://...',
'-f', 'image2',
'-stream_loop', '-1',
'-i', 'image.png',
'-filter_complex', 'overlay=(main_w-overlay_w)/2:main_h*0.1-overlay_h',
'-acodec', 'aac',
'-ar', '44100',
'-ab', '128k',
'-f', 'flv',
'-g', '30',
'-vcodec', 'libx264',
'-preset', 'ultrafast',
'-crf', '30',
'rtmp://...'



Works fine on ffmpeg 4.3.2. But after ffmpeg updated to 4.4 the stream doesn't start at all. If I change stream_loop -1 to loop 1 the stream starts but as I want to update the image.png like every 10 seconds or so, it stops being updated on the stream. That is probably because new image.png is being saved at the same time it is being read. stream_loop doesn't mind this as I have understood.


Also if I delay image.png start with -ss -5, the stream starts with main video from rtsp ://... but it stops when image.png starts to be read.


Also if I remove -f image2 from the code, the stream starts fine but image.png is not being updated to the stream.


Would be easy to downgrade ffmpeg to the older 4.3.2 version but it is not possible as I want this thing to run on Android device in Termux. Termux has only the latest ffmpeg 4.4 available.


Any ideas how to make this work on ffmpeg 4.4.


Here is what is printed out when I run the command above. The stream does not start. This is done with Termux in Android device. Stream does not start in my Mac Book Pro's ffmpeg 4.4 either, in that 4.3.2 is ok.


ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with Android (6454773 based on r365631c2) clang version 9.0.8 
(https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
 configuration: --arch=aarch64 --as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang
 --cxx=aarch64-linux-android-clang++ --cross-prefix=aarch64-linux-android- --disable-indevs 
 --disable-outdevs --enable-indev=lavfi --disable-static --disable-symver --enable-cross-compile 
 --enable-gnutls --enable-gpl --enable-libass --enable-libdav1d --enable-libmp3lame 
 --enable-libfreetype --enable-libvorbis --enable-libopus --enable-libx264 --enable-libx265 
 --enable-libxvid --enable-libvpx --enable-shared --enable-libsoxr --enable-libvidstab 
 --enable-libwebp --prefix=/data/data/com.termux/files/usr --target-os=android 
 --extra-libs=-landroid-glob --enable-neon
 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
[udp @ 0x7ebe823840] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe8238e0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe823a20] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0x7ebe823ac0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)

Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://...':
 Metadata:
 title : Session streamed by "TP-LINK RTSP Server"
 comment : stream1
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc
 Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Input #1, image2, from 'image.png':
 Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 1152x87 [SAR 8504:8504 DAR 384:29], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 (h264) -> overlay:main (graph 0)
 Stream #1:0 (png) -> overlay:overlay (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help



-
Timestamp not printed on thumbnails with FFMPEG
26 août 2021, par mlatelcomI have a script using FFMPEG to generate an image with tiled thumbnails every 45 seconds for several videos on a given folder. The images are named with the name of the video it was generated from. It generates the thumbnails for each video but it does not print the time stamps on them. The path to the font file is correct ; so I don't know where the issue is. I'm using the script in Fedora Linux.


Here is the FFMPEG command line code on the script :


ffmpeg -ss 00:00:05 -i test.mp4 -loglevel 40 -frames 1 -bt 20M -vf "drawtext=fontfile=/usr/share/fonts/open-sans/OpenSans-Light.ttf:timecode='00\\:00\\:00\\:00':r=30:fontcolor=white:x=220:y=220:box=1:boxcolor=black@0.5,select=not(mod(n\,1350)),scale=200:150,tile=15x48" -n "${name}.png"



and this is the console output


ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (GCC)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
 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
[h264 @ 0x56051b4b3cc0] Reinit context to 1280x720, pix_fmt: yuv420p
[mpegts @ 0x56051b4acc80] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
Input #0, mpegts, from 'test.mp4':
 Duration: 00:04:57.02, start: 1.400000, bitrate: 2853 kb/s
 Program 1 
 Metadata:
 service_name : Service01
 service_provider: FFmpeg
 Stream #0:0[0x100]: Video: h264 (Main), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
 Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[h264 @ 0x56051ba69e00] Reinit context to 1280x720, pix_fmt: yuv420p
[Parsed_scale_2 @ 0x56051b5953c0] w:200 h:150 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x56051b725ac0] w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:30/1 sar:1/1
[Parsed_scale_2 @ 0x56051b5953c0] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:200 h:150 fmt:rgb24 sar:4/3 flags:0x4
Output #0, image2, to '.png':
 Metadata:
 encoder : Lavf58.76.100
 Stream #0:0: Video: png, 1 reference frame, rgb24(pc, progressive, left), 3000x7200 (0x0) [SAR 4:3 DAR 5:9], q=2-31, 200 kb/s, 0.04 fps, 0.04 tbn
 Metadata:
 encoder : Lavc58.134.100 png
No more output streams to write to, finishing.00.00 bitrate=N/A speed= 0x 
[AVIOContext @ 0x56051b84c8c0] Statistics: 0 seeks, 2 writeouts
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:24.00 bitrate=N/A speed=0.47x 
video:465kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (test.mp4):
 Input stream #0:0 (video): 8761 packets read (96159422 bytes); 8760 frames decoded; 
 Input stream #0:1 (audio): 0 packets read (0 bytes); 
 Total: 8761 packets (96159422 bytes) demuxed
Output file #0 (.png):
 Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (476224 bytes); 
 Total: 1 packets (476224 bytes) muxed
[AVIOContext @ 0x56051b4b5d00] Statistics: 107090352 bytes read, 18 seeks