
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 (13)
-
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" ; -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (3756)
-
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 ?


-
How to get time stamp of closest keyframe before a given timestamp with ffmpeg
21 mai 2021, par loretoparisiTo seek to position and get the closest frame I was using


ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals $seconds%+#1



where I specify the start position as :


'-read_intervals', seconds + '%+#1', //Read only 1 packet after seeking to position 01:23



With latest
ffprobe
version

$ ffprobe --version
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers



it does not work anymore, and I get


N/A



hence the "first", while if I remove the
$seconds%+#1
I get all

ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20
N/A
1029888
1030306
1030724
1031142
1031560
1031978
1032396
1032814
1033232
1033650
1034068
1034486
1034904
...



How to retrieve the closest frame then not using the
read_intervals $seconds%+#1
butread_intervals $seconds
only ?

-
How to configure FFmpeg in windows ? [closed]
2 août 2021, par GrassWarlockHey there i'm not very tech savvy.


when i invoke this command :


ffmpeg -i input.mp4 -i subtitles.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -preset veryfast output.mp4



( which is supposed to overlay 'input.mp4' with subtitles from 'subtitle.srt' )


i get the following output :


ffmpeg version 2021-07-27-git-0068b3d0f0-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 2.100 / 57. 2.100
 libavcodec 59. 3.102 / 59. 3.102
 libavformat 59. 4.101 / 59. 4.101
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 1.103 / 8. 1.103
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
Input #0, matroska,webm, from 'video.mkv':
 Metadata:
 ENCODER : Lavf59.4.101
 Duration: 00:05:39.94, start: 0.000000, bitrate: 665 kb/s
 Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 720x480, SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 1k tbn (default)
 Metadata:
 DURATION : 00:05:39.839000000
 Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
 Metadata:
 HANDLER_NAME : SoundHandler
 VENDOR_ID : [0][0][0][0]
 DURATION : 00:05:39.940000000
Input #1, srt, from 'subtitles.srt':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Subtitle: subrip
[mp4 @ 000001aa596242c0] Could not find tag for codec subrip in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #1:0 -> #0:2 (copy)
 Last message repeated 1 times



i searched the internet and the official documentation mentions that libass should be enabled in the configuration in order for subtitling to work




11.218 subtitles


Draw subtitles on top of input video using the libass library.


To enable compilation of this filter you need to configure FFmpeg with
—enable-libass. This filter also requires a build with libavcodec and libavformat to convert the passed subtitles file to ASS (Advanced
Substation Alpha) subtitles format




how do i enable libass in configuration on windows ? my FFmpeg directory doesn't contain a configuration file nor a command that configures it from cmd


Thanks alot in advance