
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (27)
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (3614)
-
streaming data with ffmpeg using pipe - freeze after few seconds
13 octobre 2022, par tamirgIm fetching some video data, and trying to stream it using ffmpeg.
what i do is create an ffmpeg process, set it to get info from '-', and then when i fetch the video data i write it to the process STDIN.


My problem is that its working, but only working for around 3 seconds, then the stream stops, and there are no longer any logs from ffmpeg.


Im running ffmpeg with log level debug, and it seems to parse the data ok, which i guess thats why it works for 3 seconds, but then the ffmpeg stops printing any more logs.


I dont want to attach all the logs because its too much, but ill write the main parts.
Maybe the ffmpeg process is missing some arguments ?


It starts with :


Clipping frame in rate conversion by 0.000008
2022-10-13T09:16:53.535546194Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.535987546Z Last message repeated 2 times
2022-10-13T09:16:53.536012520Z [hevc @ 0x55f4e8798100] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.537017901Z [hevc @ 0x55f4e86eeb80] Decoded frame with POC 0.
2022-10-13T09:16:53.538652961Z [hevc @ 0x55f4e8798100] Output frame with POC 8.
2022-10-13T09:16:53.538782714Z [hevc @ 0x55f4e8789c00] Decoded frame with POC 1.
2022-10-13T09:16:53.540362322Z [hevc @ 0x55f4e8773500] Decoded frame with POC 2.
2022-10-13T09:16:53.540989229Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.541118680Z Last message repeated 1 times
2022-10-13T09:16:53.541161109Z [hevc @ 0x55f4e86eeb80] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.542663730Z [hevc @ 0x55f4e86eeb80] Output frame with POC 9.
2022-10-13T09:16:53.544954074Z [hevc @ 0x55f4e8783e80] Decoded frame with POC 3.
2022-10-13T09:16:53.545102776Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.545165406Z Last message repeated 2 times
2022-10-13T09:16:53.545175969Z [hevc @ 0x55f4e8789c00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.546742754Z [hevc @ 0x55f4e8789c00] Output frame with POC 10.
2022-10-13T09:16:53.547695241Z [hevc @ 0x55f4e8877c40] Decoded frame with POC 4.
2022-10-13T09:16:53.549347290Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)



then :


2022-10-13T09:16:53.828180084Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)

2022-10-13T09:16:53.831843061Z Last message repeated 2 times
2022-10-13T09:16:53.831902903Z [hevc @ 0x55f4e88984c0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.831909160Z [hevc @ 0x55f4e88984c0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.831912827Z [hevc @ 0x55f4e88984c0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.832173968Z [hevc @ 0x55f4e88984c0] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.832309139Z [hevc @ 0x55f4e88984c0] Decoding VPS
2022-10-13T09:16:53.832324955Z [hevc @ 0x55f4e88984c0] Main profile bitstream
2022-10-13T09:16:53.832651015Z [hevc @ 0x55f4e88984c0] Decoding SPS
2022-10-13T09:16:53.832730623Z [hevc @ 0x55f4e88984c0] Main profile bitstream
2022-10-13T09:16:53.832785521Z [hevc @ 0x55f4e88984c0] Decoding VUI
2022-10-13T09:16:53.832833202Z [hevc @ 0x55f4e88984c0] Decoding PPS
2022-10-13T09:16:53.833112865Z [hevc @ 0x55f4e88984c0] Output frame with POC 0.
2022-10-13T09:16:53.835713007Z [hevc @ 0x55f4e8888080] Decoded frame with POC 59.
2022-10-13T09:16:53.836572581Z [libx264 @ 0x55f4e8794800] frame= 0 QP=44.23 NAL=3 Slice:I Poc:0 I:14400 P:0 SKIP:0 size=41597 bytes
2022-10-13T09:16:53.836783822Z [rtp @ 0x55f4eaa75fc0] Sending NAL 7 of len 24 M=0
2022-10-13T09:16:53.836805582Z [rtp @ 0x55f4eaa75fc0] Sending NAL 8 of len 4 M=0
2022-10-13T09:16:53.836809885Z [rtp @ 0x55f4eaa75fc0] Sending NAL 6 of len 642 M=0
2022-10-13T09:16:53.836830503Z [rtp @ 0x55f4eaa75fc0] Sending NAL 5 of len 40913 M=1
2022-10-13T09:16:53.836836082Z [rtp @ 0x55f4eaa75fc0] NAL size 40913 > 1460
2022-10-13T09:16:53.837084718Z [hevc @ 0x55f4e88a8900] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.837193504Z [hevc @ 0x55f4e88a8900] Output frame with POC 1.
2022-10-13T09:16:53.844457060Z [libx264 @ 0x55f4e8794800] frame= 1 QP=48.02 NAL=2 Slice:P Poc:2 I:16 P:655 SKIP:13729 size=1459 bytes
2022-10-13T09:16:53.844621824Z [rtp @ 0x55f4eaa75fc0] Sending NAL 1 of len 1455 M=1
2022-10-13T09:16:53.844680058Z [hevc @ 0x55f4e8798100] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.844749212Z [hevc @ 0x55f4e8798100] Output frame with POC 2.
2022-10-13T09:16:53.851913353Z [libx264 @ 0x55f4e8794800] frame= 2 QP=44.00 NAL=2 Slice:P Poc:4 I:0 P:11 SKIP:14389 size=48 bytes



and finally the last logs are those, and afterwards i don't get anymore logs :


2022-10-13T09:16:56.836957083Z [NULL @ 0x55f4e86e7a00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:56.837158270Z [hevc @ 0x55f4e8773500] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:56.837355973Z [hevc @ 0x55f4e8773500] Output frame with POC 59.
2022-10-13T09:16:56.837935475Z [hevc @ 0x55f4e86eeb80] Decoded frame with POC 57.
2022-10-13T09:16:56.840799210Z [hevc @ 0x55f4e8789c00] Decoded frame with POC 58.
2022-10-13T09:16:56.842434529Z [libx264 @ 0x55f4e8794800] frame= 59 QP=33.00 NAL=2 Slice:P Poc:118 I:11 P:952 SKIP:13437 size=5251 bytes
2022-10-13T09:16:56.842472226Z [rtp @ 0x55f4eaa75fc0] Sending NAL 1 of len 5247 M=1
2022-10-13T09:16:56.842478464Z [rtp @ 0x55f4eaa75fc0] NAL size 5247 > 1460
2022-10-13T09:16:56.846625001Z [hevc @ 0x55f4e8773500] Decoded frame with POC 59.



-
Options to re-encode video with new key frames
24 novembre 2022, par muralivI need to add key frames at 2 second intervals in this video.


ffprobe input-video.mp4 
ffprobe version 5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input-video.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2022-11-23T10:04:47.000000Z
 Duration: 00:02:00.15, start: 0.000000, bitrate: 16302 kb/s
 Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 16174 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
 Metadata:
 creation_time : 2022-11-23T10:04:47.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
 Metadata:
 creation_time : 2022-11-23T10:04:47.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]



I used this ffmpeg command for this purpose.


ffmpeg -i input-video.mp4 -codec:v libx264 -r 23.976 -force_key_frames "expr:gte(t,n_forced*2)" -c:a copy -y output.mp4



However, this output.mp4 now has different video bitrate (3692 kb/s) compared to the original video (16302 kb/s). How do I use the ffmpeg command to re-encode the video with key frames and with the same bitrate as original video ?


-
How to cut video into 4M size mp4 video using ffmpeg
13 octobre 2022, par fxsshiwoI have a *.mp4 video file, which is cut to a fixed size using ffmpeg, using the following commands


'/usr/local/ffmpeg/bin/ffmpeg' '-y' '-ss' '00:00:00.00' '-i' '57066524-1.mp4' '-t' '00:00:05.00' '-vcodec' 'libx264' '-acodec' 'libmp3lame' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes6332bdc9814883qh89/pass-6332bdc98160c' '1.mp4'


but I get an error saying -


Unknown encoder 'libx264'


Here is the complete error message:


ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
 configuration: --enable-shared --enable-swscale --enable-gpl --enable-nonfree --enable-pic --prefix=/usr/local/ffmpeg --enable-version3 --enable-postproc --enable-pthreads --enable-static --enable-libx264
 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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '57066524-1.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2022-09-26T02:06:24.000000Z
 Duration: 00:00:26.11, start: 0.000000, bitrate: 6683 kb/s
 Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 720x720 [SAR 1:1 DAR 1:1], 6367 kb/s, 25 fps, 25 tbr, 25k tbn (default)
 Metadata:
 creation_time : 2022-09-26T02:06:24.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
 Metadata:
 creation_time : 2022-09-26T02:06:24.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]
Unknown encoder 'libx264'




I try to install libx264 and recompile, I still get this error


[install libx264]
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --prefix=/usr/local/x264/ --includedir=/usr/local/include --libdir=/usr/local/lib --enable-shared
./configure --prefix=/usr/softinstall/x264/ --includedir=/usr/local/include --libdir=/usr/local/lib --enable-shared

[compile ffmpeg]
wget http://www.ffmpeg.org/releases/ffmpeg-5.1.tar.gz
tar -zxvf ffmpeg-5.1.tar.gz
cd ffmpeg-5.1
./configure --enable-shared --enable-swscale --enable-gpl --enable-nonfree --enable-pic --prefix=/usr/local/ffmpeg --enable-version3 --enable-postproc --enable-pthreads --enable-static --enable-libx264 --enable-libmp3lame



My questions :


- 

- How to install ffmpeg with libx264
- How to cut video into fixed size with ffmpeg