
Recherche avancée
Autres articles (61)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (9533)
-
How could I achieve a good ratio of compression and time while converting video files with ffmpeg ?
17 février 2021, par Guilherme RichterSo, I made 2 scripts that convert CCTV footage in mp4 videos. One of them is just a
-vcodec copy
and creates a mp4 with the same size of the footage (huge, btw) and my other alternative was tweak with some parameters and figure out what was the best I could do without sacrifice too much quality and make it "fast".
Then I come up withc:v libx264 -crf 30 -preset veryfast -filter:v fps=fps=20
which took something like 2 secs in my machine to run an average 6MB file and transform into a 600kB file.

Happy with the results I decided to put it on AWS lambda (to avoid bottlenecks), and then people started to complain about missing files, so I increase the timeout and the memory to 380MB. And even after that, I am still getting a few lambda errors...


Anyway, the lambda is going to cost me too much compared to just store the file without compression, there is another way to decrease size without sacrificing time ?


[UPDATE]
I crunch some numbers and even tho using lambda is not what I expected, I am still saving a lot of cash monthly by reducing the file size 10x times.


As asked, this is the logs for the ffmpeg.


ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10 (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-liblensfun --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-libsoxr --enable-libspeex --enable-libssh --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. 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
Input #0, dhav, from 'ch1_principal_28122020030156_28122020030600.dav':
 Duration: N/A, start: 1609124514.000000, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 960x480, 30 fps, 30 tbr, 1k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x556ce99e7100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x556ce99e7100] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x556ce99e7100] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 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=1 keyint=250 keyint_min=20 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=30.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '_test1.mp4':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 960x480, q=-1--1, 20 fps, 10240 tbn, 20 tbc
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[dhav @ 0x556ce99b8400] Packet corrupt (stream = 0, dts = NOPTS).te= 127.1kbits/s speed=10.9x 
ch1_principal_28122020030156_28122020030600.dav: corrupt input packet in stream 0
frame= 805 fps=226 q=-1.0 Lsize= 682kB time=00:00:40.10 bitrate= 139.4kbits/s speed=11.2x 
video:672kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.521397%
[libx264 @ 0x556ce99e7100] frame I:4 Avg QP:27.76 size: 31382
[libx264 @ 0x556ce99e7100] frame P:205 Avg QP:30.62 size: 2110
[libx264 @ 0x556ce99e7100] frame B:596 Avg QP:33.91 size: 217
[libx264 @ 0x556ce99e7100] consecutive B-frames: 1.1% 0.2% 0.7% 97.9%
[libx264 @ 0x556ce99e7100] mb I I16..4: 8.3% 41.1% 50.6%
[libx264 @ 0x556ce99e7100] mb P I16..4: 0.9% 3.0% 0.4% P16..4: 16.9% 4.1% 1.3% 0.0% 0.0% skip:73.4%
[libx264 @ 0x556ce99e7100] mb B I16..4: 0.1% 0.2% 0.0% B16..8: 1.4% 0.4% 0.0% direct: 0.9% skip:96.9% L0:42.0% L1:48.0% BI: 9.9%
[libx264 @ 0x556ce99e7100] 8x8 transform intra:63.1% inter:40.6%
[libx264 @ 0x556ce99e7100] coded y,uvDC,uvAC intra: 55.6% 40.9% 5.0% inter: 1.4% 2.1% 0.0%
[libx264 @ 0x556ce99e7100] i16 v,h,dc,p: 27% 28% 24% 21%
[libx264 @ 0x556ce99e7100] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 16% 26% 6% 6% 6% 7% 11% 7%
[libx264 @ 0x556ce99e7100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17% 15% 9% 6% 6% 7% 13% 6%
[libx264 @ 0x556ce99e7100] i8c dc,h,v,p: 63% 16% 16% 5%
[libx264 @ 0x556ce99e7100] Weighted P-Frames: Y:8.8% UV:1.0%
[libx264 @ 0x556ce99e7100] kb/s:136.66



-
How to increase the compression ratio of a JPEG2000 file with "avenc_jpeg2000" GStreamer encoder ?
10 juillet 2023, par qfr.bertin.groupI'm using the plugin avenc_jpeg2000, from gst-libav module, combined with videotestsrc and filesink plugins for encoding a raw picture to a JPEG2000 picture :


gst-launch-1.0 videotestsrc num-buffers=1 ! avenc_jpeg2000 ! filesink location=/tmp/picture-ref.jp2



This pipeline works and produce a 31.85 KiB (32,616) file.




Now, I want to divide the size of my output file by two by increasing the compression ratio of the encoder avenc_jpeg2000. To achieve this, I want to minimize the number of bits required to represent the image with an allowable level of distortion. I know JPEG2000 standard support lossless and lossy compression mode. For my use case, the lossy compression mode is acceptable.


How should I proceed to increase the compression of my output file ? What encoder's properties should I play with for doing that ?


My test configuration :


- 

-
i.MX 8M Plus


-
GStreamer 1.18.0


-
libav 1.18.0 (Release date : 2020-09-08)










I tried to play with "bitrate" and "bitrate-tolerance" properties, but it seems to have no effect on the size of the output file :


gst-launch-1.0 videotestsrc num-buffers=1 ! avenc_jpeg2000 bitrate=100000 bitrate-tolerance=10000 ! filesink location=/tmp/picture-test-01.jp2



I compare files by doing a checksum with
sha224sum
command :

d0da9118a9c93a0420d6d62f104e0d99fe6e50cda5e87a46cef126f9 /tmp/picture-ref.jp2

d0da9118a9c93a0420d6d62f104e0d99fe6e50cda5e87a46cef126f9 /tmp/picture-test-01.jp2



-
-
Revision 124667 : Nouvelle option pour la description .yaml d’une saisie : hériter d’une ...
13 mai 2020, par Maïeul Rouquette — LogNouvelle option pour la description .yaml d’une saisie : hériter d’une
autre saisie.
Possibilité d’avoir des héritages en cascade.
Possibilité de régler précisement les options héritées ou pas, via des
entrées dans le .yaml.
Pour la documentation, voir
https://contrib.spip.net/ecrire/?exec=article&id_article=5272
Pour des exemples :dans ce dossier, les tests (tests/saisies + tests/saisies_heriter)
la saisie nombre :
https://git.spip.net/spip-contrib-extensions/saisie_nombrela saisie calcul : https://git.spip.net/spip-contrib-extensions/saisie_calcul
En bonus :Ajout d’une fonction saisies_supprimer_identifiants() qui supprime récursivement les identifiants d’une saisie. À utiliser sur les tests unitaires pour éviter d’avoir un identifiant qui change à chaque test.
saisies_modifier(), une option ’fusion’, suite à la demande de @Rastapopoulos. en https://git.spip.net/spip-contrib-extensions/formidable/issues/25#issuecomment-691