
Recherche avancée
Médias (3)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (65)
-
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 (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (6145)
-
Can't get the right formula to set frame pts for a stream using libav
4 avril 2022, par user1365836I'm trying to save a stream of frames as mp4.
Source framerate is not fixed and it stay in the range [15,30]


Encoder params :


...
eCodec.time_base = AVRational(1,3000);
eCodec.framerate = AVRational(30, 1);
...



Stream params :


eStream = avformat_new_stream(eFormat, null); 
eStream.codecpar = codecParams;
eStream.time_base = eCodec.time_base;



Decoder time_base is 0/1 and it marks each frame with a pts like :


480000
528000
576000
...



PTS(f) is always == PTS(f-1)+48000


Encoding (
dFrame
is the received frame,micro
the elapsed time in microseconds) :

av_frame_copy(eFrame, dFrame);
eFrame.pts = micro*3/1000;



This make the video playing too fast.
I can't understand why, but changing
micro*3/1000
tomicro*3*4/1000
make the video play at the correct speed (checked against a clock after many minutes of varying fps)

What am I missing ?


-
issue streaming to instagram with FFmpeg
24 septembre 2021, par 1 K1Trying to stream from OBS using nginx server to Instagram using ffmpeg. There are no problem If I stream with a same settings to facebook. There is only a problem while streaming to Instagram. Also, if I do stream a video file instead of camera from OBS, there are no problem. So there is a problem While streaming from OBS through nginx server with ffmpeg.


command is :
ffmpeg -i rtmp://192.168.12.190:1935/live -filter_complex " [0] transpose=dir=1 [rotated] ; [rotated] scale=480:-2 " -max_muxing_queue_size 9999 -preset superfast -b:v 2000k -minrate 1500k -maxrate 3000k -bufsize 3200k -vcodec libx264 -r 30 -f flv rtmps://live-upload.instagram.com:443/rtmp/!streamKey!


Getting following log from mmpeg :


ffmpeg version N-90636-gc837918f50 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 7.3.0 (GCC)
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 13.100 / 56. 13.100
 libavcodec 58. 17.100 / 58. 17.100
 libavformat 58. 11.101 / 58. 11.101
 libavdevice 58. 2.100 / 58. 2.100
 libavfilter 7. 14.100 / 7. 14.100
 libswscale 5. 0.102 / 5. 0.102
 libswresample 3. 0.101 / 3. 0.101
 libpostproc 55. 0.100 / 55. 0.100
Input #0, flv, from 'rtmp://192.168.12.190:1935/live':
 Metadata:
 Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
 displayWidth : 1280
 displayHeight : 720
 fps : 30
 profile :
 level :
 Duration: 00:00:00.00, start: 836.994000, bitrate: N/A
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 163 kb/s
 Stream #0:1: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 5120 kb/s, 30 fps, 30 tbr, 1k tbn, 60 tbc
Stream mapping:
 Stream #0:1 (h264) -> transpose (graph 0)
 scale (graph 0) -> Stream #0:0 (libx264)
 Stream #0:0 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[libx264 @ 000001a25ad8e6c0] using SAR=1281/1280
[libx264 @ 000001a25ad8e6c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001a25ad8e6c0] profile High, level 3.1
[libx264 @ 000001a25ad8e6c0] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 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=18 lookahead_threads=3 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=25 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=3000 vbv_bufsize=3200 nal_hrd=none filler=0 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, flv, to 'rtmps://live-upload.instagram.com:443/rtmp/___my_key_here':
 Metadata:
 Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
 displayWidth : 1280
 displayHeight : 720
 fps : 30
 profile :
 level :
 encoder : Lavf58.11.101
 Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 480x854 [SAR 1281:1280 DAR 9:16], q=-1--1, 2000 kb/s, 30 fps, 1k tbn, 30 tbc
 Metadata:
 encoder : Lavc58.17.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 3000000/0/2000000 buffer size: 3200000 vbv_delay: -1
 Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 48000 Hz, stereo, fltp
 Metadata:
 encoder : Lavc58.17.100 libmp3lame
[tls @ 000001a25b642e40] Error in the push function.
av_interleaved_write_frame(): I/O error
 Last message repeated 1 times
[flv @ 000001a25bc4db80] Failed to update header with correct duration.
[flv @ 000001a25bc4db80] Failed to update header with correct filesize.
Error writing trailer of rtmps://live-upload.instagram.com:443/rtmp/___my_key_here__: I/O error
frame= 62 fps=0.0 q=11.0 Lsize= 265kB time=00:00:07.05 bitrate= 307.2kbits/s speed=17.1x
video:175kB audio:111kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[tls @ 000001a25b642e40] The specified session has been invalidated for some reason.
 Last message repeated 1 times
[libx264 @ 000001a25ad8e6c0] frame I:1 Avg QP:14.37 size: 12215
[libx264 @ 000001a25ad8e6c0] frame P:16 Avg QP:14.39 size: 13130
[libx264 @ 000001a25ad8e6c0] frame B:45 Avg QP:15.80 size: 4828
[libx264 @ 000001a25ad8e6c0] consecutive B-frames: 3.2% 0.0% 0.0% 96.8%
[libx264 @ 000001a25ad8e6c0] mb I I16..4: 52.2% 22.7% 25.1%
[libx264 @ 000001a25ad8e6c0] mb P I16..4: 0.2% 0.6% 0.7% P16..4: 48.7% 0.0% 0.0% 0.0% 0.0% skip:49.8%
[libx264 @ 000001a25ad8e6c0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 16.1% 0.0% 0.0% direct:21.1% skip:62.7% L0:38.2% L1:50.0% BI:11.8%
[libx264 @ 000001a25ad8e6c0] final ratefactor: 16.75
[libx264 @ 000001a25ad8e6c0] 8x8 transform intra:26.5% inter:48.4%
[libx264 @ 000001a25ad8e6c0] coded y,uvDC,uvAC intra: 58.0% 51.2% 38.8% inter: 22.3% 27.8% 13.6%
[libx264 @ 000001a25ad8e6c0] i16 v,h,dc,p: 95% 2% 2% 1%
[libx264 @ 000001a25ad8e6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 60% 4% 9% 2% 4% 9% 2% 6% 4%
[libx264 @ 000001a25ad8e6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 51% 8% 11% 5% 4% 9% 2% 7% 3%
[libx264 @ 000001a25ad8e6c0] i8c dc,h,v,p: 65% 8% 21% 6%
[libx264 @ 000001a25ad8e6c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001a25ad8e6c0] kb/s:1701.52
Conversion failed!



-
How to save a vvideo from a RTSP server using Ffmpeg in C++ ?
20 septembre 2021, par TolgaI am using Ffmpeg remuxing example code to save a mp4 file into another file. However my actual goal is saving the video from a RTSP server. The example works fine with the normal .mp4 files but when I try to save the video from RTSP Server I get following error on command prompt.


[mp4 @ 02F9A8C0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 3000



The RTSP server is created on my computer for testing using python gstream. I used the script here.


Ffmpeg code in C++ is below where error occurs.


iCamera->stream = iCamera->fmt->streams[iCamera->pkt->stream_index];
 iCamera->pkt->stream_index = map->stream_map[iCamera->pkt->stream_index];
 oCamera->stream = oCamera->fmt->streams[iCamera->pkt->stream_index];

 iCamera->pkt->pts = av_rescale_q_rnd(iCamera->pkt->pts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
 iCamera->pkt->dts = av_rescale_q_rnd(iCamera->pkt->dts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
 iCamera->pkt->duration = av_rescale_q(iCamera->pkt->duration, iCamera->stream->time_base, oCamera->stream->time_base);
 iCamera->pkt->pos = -1;
 
 if (av_interleaved_write_frame(oCamera->fmt, iCamera->pkt)) {
 printf("Error occured while muxing packet.\n"); exit(1);
 }