
Recherche avancée
Autres articles (71)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
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 (14865)
-
Laravel ffmpeg hls encode multi-bitrate x264 error
4 octobre 2022, par Osman ŞimşekI wanted to encode mutliple bitrate hls using Laravel protonomedia library. When I give a single bitrate, it performs the encode operation without error, but when I want to work with mutliple bitrate, it gives an error.


FFmpeg Version : 5.1.1


FFmpeg Command :


[2022-10-04 08:42:47] local.INFO: ffmpeg running command '/opt/ffmpeg-amd64-static/ffmpeg' '-version' 
[2022-10-04 08:42:47] local.INFO: ffmpeg executed command successfully 
[2022-10-04 08:42:47] local.INFO: ffmpeg running command '/opt/ffmpeg-amd64-static/ffmpeg' '-y' '-threads' '12' '-i' '/tmp/phpLH0wts' '-map' '0' '-vcodec' 'libx264' '-b:v' '250k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_0_250_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_0.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_0_250.m3u8' '-map' '0' '-vcodec' 'libx264' '-b:v' '500k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_1_500_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_1.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_1_500.m3u8' '-map' '0' '-vcodec' 'libx264' '-b:v' '1000k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_2_1000_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_2.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_2_1000.m3u8' 
[2022-10-04 08:42:47] local.INFO: ffprobe running command '/opt/ffmpeg-amd64-static/ffprobe' '-help' '-loglevel' 'quiet' 
[2022-10-04 08:42:47] local.INFO: ffprobe executed command successfully 
[2022-10-04 08:42:47] local.INFO: ffprobe running command '/opt/ffmpeg-amd64-static/ffprobe' '/tmp/phpLH0wts' '-show_format' '-print_format' 'json' 
[2022-10-04 08:42:47] local.INFO: ffprobe executed command successfully 
[2022-10-04 08:42:47] local.ERROR: ffmpeg failed to execute command '/opt/ffmpeg-amd64-static/ffmpeg' '-y' '-threads' '12' '-i' '/tmp/phpLH0wts' '-map' '0' '-vcodec' 'libx264' '-b:v' '250k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_0_250_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_0.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_0_250.m3u8' '-map' '0' '-vcodec' 'libx264' '-b:v' '500k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_1_500_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_1.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_1_500.m3u8' '-map' '0' '-vcodec' 'libx264' '-b:v' '1000k' '-sc_threshold' '0' '-g' '48' '-hls_playlist_type' 'vod' '-hls_time' '10' '-hls_segment_filename' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_2_1000_%05d.ts' '-master_pl_name' 'temporary_segment_playlist_2.m3u8' '-hls_key_info_file' '/tmp/78627e6a6355dc72/hls_encryption.keyinfo' '-hls_flags' 'periodic_rekey' '-acodec' 'aac' '-b:a' '128k' '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_2_1000.m3u8': ffmpeg version N-63101-gc92edd969a-static https://johnvansickle.com/ffmpeg/ 



FFmpeg Error Message :


Output #2, hls, to '/home/crowiaftp/public_html/yeni/public/uploads/streams/1664862167633bc7d76b09b_2_1000.m3u8':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 encoder : Lavf59.30.101
 Stream #2:0(und): Video: h264, yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 creation_time : 2022-04-19T07:50:11.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 04/19/2022.
 vendor_id : [0][0][0][0]
 encoder : Lavc59.42.104 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: N/A
 Stream #2:1(eng): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2022-04-19T07:50:11.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 04/19/2022.
 vendor_id : [0][0][0][0]
 encoder : Lavc59.42.104 aac
frame= 0 fps=0.0 q=0.0 q=0.0 q=0.0 size=N/A time=00:00:00.41 bitrate=N/A speed=5.41x 
x264 [error]: malloc of size 3325760 failed
Error submitting video frame to the encoder
[libx264 @ 0x5a8cec0] final ratefactor: 40.36
[aac @ 0x5abc000] Qavg: 19883.271
[aac @ 0x5abc000] 2 frames left in the queue on closing
[libx264 @ 0x5b20d80] final ratefactor: 34.36
[aac @ 0x5ab7a40] Qavg: 19883.271
[aac @ 0x5ab7a40] 2 frames left in the queue on closing
[libx264 @ 0x5ab6440] final ratefactor: 28.36
[aac @ 0x5a89580] Qavg: 19883.271
[aac @ 0x5a89580] 2 frames left in the queue on closing
Conversion failed!



Hls encoding code :


$uniqFileName = uniqid(time());

FFMpeg::open($file)->exportForHLS()
 ->withRotatingEncryptionKey(function($fileName, $contents){
 Storage::disk('streams')->put("secrets/$fileName", $contents);
 })
 ->addFormat((new \FFMpeg\Format\Video\X264)->setKiloBitrate(250))
 ->addFormat((new \FFMpeg\Format\Video\X264)->setKiloBitrate(500))
 ->addFormat((new \FFMpeg\Format\Video\X264)->setKiloBitrate(1000))
 ->toDisk('streams')
 ->save($uniqFileName.'.m3u8');

 FFMpeg::cleanupTemporaryFiles();



-
9 Ways to Customise Your Matomo Like a Pro
5 octobre 2022, par Erin -
FFMPEG & ytdl-core | Muxing highestaudio and highestvideo results in mp4 with incorrect time
17 mars 2023, par Niek PetersI want to combine a file with only video and a file with only audio from the ytdl-core package into a mp4 and stream it in the response. I get the files using the
highestvideo
andhighestaudio
quality settings. I tried to modify a part of the ytdl-core-muxer module to change the output format to mp4, for which I also needed to add-movflags frag_keyframe+empty_moov
, to allow the output mp4 to be seekable. This all seems to work and it produces a mp4 file without errors. When I open it with the Windows Photos app however, I noticed that even though video plays normally in perfect quality, the time is completely wrong.



I have tried adding a fixed framerate with
-r 60
and regenerating the timestamps with-fflags +genpts
, but to no avail. I have also tried encoding the video and audio formats toh264
(usinglibx264
) andacc
, but that didn't solve it either.



// create the ffmpeg process for muxing
const ffmpegProcess = cp.spawn(
 ffmpeg,
 [
 // input audio by pipe
 "-thread_queue_size", "4096",
 "-i", "pipe:3",

 // input video by pipe
 "-thread_queue_size", "4096",
 "-r", "60",
 "-i", "pipe:4",

 // map audio and video correspondingly
 "-map", "0:a",
 "-map", "1:v",

 // change the codec
 "-c:v", "libx264", 
 "-c:a", "aac",
 
 "-preset", "ultrafast",

 // Allow output to be seekable, which is needed for mp4 output
 "-movflags", "frag_keyframe+empty_moov",

 // output mp4 and pipe
 "-r", "60",
 "-fflags", "+genpts",
 "-f", "mp4", "pipe:5",
 ],
 {
 // no popup window for Windows users
 windowsHide: true,
 stdio: [
 // silence stdin/out, forward stderr,
 "inherit", "inherit", "inherit",
 // and pipe audio, video, output
 "pipe", "pipe", "pipe",
 ],
 }
);
audioStream.pipe(ffmpegProcess.stdio[3]);
videoStream.pipe(ffmpegProcess.stdio[4]);
ffmpegProcess.stdio[5].pipe(result);







Full console output :


ffmpeg version 5.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers 
 built with gcc 11.2.0 (Rev7, 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-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx 
--enable-libass --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-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 57. 17.100 / 57. 17.100
 libavcodec 59. 18.100 / 59. 18.100
 libavformat 59. 16.100 / 59. 16.100
 libavdevice 59. 4.100 / 59. 4.100
 libavfilter 8. 24.100 / 8. 24.100
 libswscale 6. 4.100 / 6. 4.100
 libswresample 4. 3.100 / 4. 3.100
 libpostproc 56. 3.100 / 56. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:3':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2022-08-21T19:56:49.000000Z
 Duration: 00:01:32.11, start: 0.000000, bitrate: N/A
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 1892 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 creation_time : 2022-08-21T19:56:49.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 08/21/2022.
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata:
 creation_time : 2022-08-21T19:56:49.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 08/21/2022.
 vendor_id : [0][0][0][0]
Input #1, matroska,webm, from 'pipe:4':
 Metadata:
 encoder : google/video-file
 Duration: 00:01:32.12, start: 0.000000, bitrate: N/A
 Stream #1:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 3840x2160, SAR 1:1 DAR 16:9, 60 fps, 60 
tbr, 1k tbn (default)
Stream mapping:
 Stream #0:1 -> #0:0 (aac (native) -> aac (native))
 Stream #1:0 -> #0:1 (vp9 (native) -> h264 (libx264))
[libx264 @ 0000022aa059be80] using SAR=1/1
[libx264 @ 0000022aa059be80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 
[libx264 @ 0000022aa059be80] profile Constrained Baseline, level 5.2, 4:2:0, 8-bit
[libx264 @ 0000022aa059be80] 264 - core 164 r3094 bfc87b7 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 
- http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'pipe:5':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 encoder : Lavf59.16.100
 Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) 
 Metadata:
 creation_time : 2022-08-21T19:56:49.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 08/21/2022.
 vendor_id : [0][0][0][0]
 encoder : Lavc59.18.100 aac
 Stream #0:1(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 15360 tbn (default)
 Metadata:
 encoder : Lavc59.18.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[matroska,webm @ 0000022aa056cd00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 4096)
frame= 5527 fps= 77 q=-1.0 Lsize= 424599kB time=00:01:32.11 bitrate=37761.2kbits/s speed=1.29x 
video:423226kB audio:1329kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.010570%[aac @ 0000022aa05ca240] Qavg: 17828.035
[libx264 @ 0000022aa059be80] frame I:23 Avg QP:19.83 size:292044
[libx264 @ 0000022aa059be80] frame P:5504 Avg QP:22.92 size: 77519
[libx264 @ 0000022aa059be80] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0000022aa059be80] mb P I16..4: 26.5% 0.0% 0.0% P16..4: 14.1% 0.0% 0.0% 0.0% 0.0% skip:59.3%
[libx264 @ 0000022aa059be80] coded y,uvDC,uvAC intra: 10.6% 27.6% 7.0% inter: 6.5% 12.8% 1.4%
[libx264 @ 0000022aa059be80] i16 v,h,dc,p: 57% 26% 8% 9%
[libx264 @ 0000022aa059be80] i8c dc,h,v,p: 43% 24% 25% 7%
[libx264 @ 0000022aa059be80] kb/s:37637.70