
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (70)
-
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 (...) -
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" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (9402)
-
Can't process RTP video stream from Firefox browser or Python based scripts by FFMPEG
3 avril 2023, par Gentelam.SAny time I want to process (forward, analyze, copy, ...) RTP video stream from FF browser or python based scripts by FFMPEG, it "chucks" and can't work with it. Seems to be stream encoding issue.
I have a Janus server where clients join from browsers or anothers services, like Python, then I forward the stream to the URL, where FFMPEG is listening on. There is no issue when I try to process any forwarded stream coming from Chrome based browsers, but the problem occurs when I join from FF or Python.


I run ffmpeg in Ubuntu container.
The command I use :

-loglevel trace -analyzeduration 300M -probesize 300M -protocol_whitelist file,udp,rtp -i port4000.sdp -vf scale=1280:720 -vcodec libx264 -profile:v baseline -preset:v ultrafast -acodec aac -f flv -flvflags no_duration_filesize {{rtmpUrl}}


I used also very simple commands like the following but the result is the same :

ffmpeg -protocol_whitelist file,udp,rtp -i ./SDP/port4000.sdp -c copy -t 10 -y test.mkv


The SDP file I use :


SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 4000 RTP/AVP 96
b=AS:200
a=rtpmap:96 VP8/90000



The screens below depicts how FFMPEG behaves in case of FF and Chrome (loglevel of ffmpeg set to trace).


Firefox :
enter image description here


Chrome :
enter image description here








It looks like it brokes after the following log :
Before avformat_find_stream_info() pos: xxx


(Same problem is if I try to run ffprobe)
Thank you for any suggestion.


As described above, I tried quite a lot of of arguments running ffmpeg, different SDP files but seems to be not enough. I want the stream to be procced properly by FFMEPG.


-
how to add subtitles in video with ffmpeg filter ?
31 mars 2023, par Mr.SlowI am having hard time adding .srt subtitles to the newly creating video. I am using Python.


subtitles :


f"{PROJECT_PATH}/data/subtitles/final_subtitle_srt/all_slides.srt"



I have checked they are correct.


pieces of my code that does not work :


audio = f'{PROJECT_PATH}/data/ppt-elements/audio_{file_id}.txt'
 images = f'{PROJECT_PATH}/data/ppt-elements/images_{file_id}.txt'

 image_input = ffmpeg.input(images, f='concat', safe=0, t=seconds).video
 audio_input = ffmpeg.input(audio, f='concat', safe=0, t=seconds).audio

inputs = [image_input, audio_input]
 
command = (
 ffmpeg.filter('subtitles', f"{PROJECT_PATH}/data/subtitles/final_subtitle_srt/all_slides.srt")
 .output(*inputs,f"{PROJECT_PATH}/data/subtitles/final_subtitle_srt_all_slides.srt", 
 f"{PROJECT_PATH}/data/final-{file_id}.mp4", 
 vf="fps=10,format=yuv420p",
 preset="veryfast", 
 shortest=None, 
 r=10, 
 max_muxing_queue_size=4000,
 **additional_parameters,
 )
)



Am I using subtitles filter well ?


-
ffmpeg hwo to choose the best bit rate for HLS streaming ?
7 février 2023, par Josef KranzI'm building a video streaming white label product, but I've run into the following scenario where I'm not sure what might be the optimal way to get the best video quality in return. At the moment I'm using crf based encoding, which is from a streaming based point of view a very bad idea. From a quality point of view, it will definitely give me the best quality and also the best efficiency. Why is crf based encoding bad for streaming ? First you have a non-fixed file size, meaning your bit rate might vary between 20 kbps and 20 Mbit/s depending on the codec and picture motion of the current frames ...
When you have such heavily varying stream according to the bit rate, automatic quality selection at the player might not function correctly, and the player automatically switches from 1080p to 480p for no reason (using VideoJS here).


To fix this issue, it's fine if I set minrate, maxrate with ffmpeg but this will also come at the cost that some frames might look pixelated, which I absolutely do not want.


Currently, my encoding command looks something like this :


/usr/bin/ffmpeg -i "/tmp/VODProcessing/Tester 2160p UHD-HDR.mp4" -map 0:0 -c:v libsvtav1 -crf 19 -vf zscale=width=3840:height=2160 -svtav1-params "profile=0:enable-force-key-frames=1:superres-mode=1:enable-tf=0:tune=0:enable-overlays=1:scd=1:scm=2:enable-mfmv=1:enable-cdef=1:enable-dlf=1:fast-decode=1:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:input-depth=10:mastering-display=G(0.265,0.69)B(0.15,0.06)R(0.68,0.32)WP(0.3127,0.329)L(4000.0,0.005):content-light=368,226:enable-hdr=1:color-range=1" -pix_fmt yuv420p10le -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc -chroma_sample_location:v topleft -color_range:v pc -max_muxing_queue_size 1024 -preset 7 -bf 0 -force_key_frames "expr:gte(t,n_forced*4.004)" -keyint_min 48 -sc_threshold 0 -use_timeline 1 -use_template 1 -map_metadata -1 -map_chapters -1 -f hls -seg_duration 4.004 -hls_time 4.004 -streaming 1 -hls_list_size 0 -hls_segment_filename "/tmp/VODProcessing/output/Tester 2160p UHD-HDR/v-av01-2160p-av01.0.12M.10_PQ/f-%04d.m4s" -hls_fmp4_init_filename "init-v-av01-2160p-av01.0.12M.10_PQ.m4s" -hls_segment_type fmp4 -hls_playlist_type vod -movflags frag_keyframe+frag_every_frame+write_colr+prefer_icc+skip_trailer+faststart -hls_flags independent_segments -strict experimental "/tmp/VODProcessing/output/Tester 2160p UHD-HDR/v-av01-2160p-av01.0.12M.10_PQ/master.m3u8"



Which will form a stream made out of independent m4s segments. As you can see, I'm using libsvtav1 in crf mode to output the result in AV1.


Now my question is, how can I have the same nice quality output as with the crf mode while having a static/fixed bit rate ? Will 2 pass encoding solve this problem by distributing the pixels or data rate differently ?


Thanks in advance