
Recherche avancée
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (8970)
-
FFMPEG scaling video disable viewing it while process is not ended, for video transcoding on the fly
5 juillet 2022, par Lucas FGood day all,


I'm working on a video player with 1080p original video files, and I would like to change their resolution on the fly :


Actually I host all my original video files under a web mp4 1080p format, and I would like to be able to offer 720p, 480p, etc ... qualities.


So I started to look for tutorials about video transcoding on the fly and I found the FFMPEG tool.


I'm actually using the following command to scale videos - to 720p for e.g. :


ffmpeg -i input.mp4 -vf scale=-1:720 output.mp4



The problem is, once FFMPEG starts scaling it, I have to wait the end of the process before being able to play the video. Do you know if there is any parameter for this command to allow playing the video while it's under scaling ?


Or any workaround that can help me doing this ?


Thank you in advance for your help !


EDIT


Now I found how to access readable content while transcoding (by transcoding to fragmented MP4) :


ffmpeg -i input.mp4 -vf scale=-2:720 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov output.mp4



But my problem is when opening the video it comes as an "ended" video of the current transcoded data.


So if video lasts 1min and is half transcoded, I'll see only 30s, it will not load more data, once the rest is transcoded.


-
pyav / ffmpeg / libav select number of P-frames and B-frames
27 mai 2021, par user1315621I am streaming from an rtsp source. It looks like half of the frames received are key frames. Is there a way to reduce this percentage and have an higher number of P-frames and B-frames ? If possible, I would like to increase the number of P-frames (not the one of B-frames).
I am using
pyav
which is a Python wrapper forlibav
(ffmpeg
)

Code :


container = av.open(
 url, 'r',
 options={
 'rtsp_transport': 'tcp',
 'stimeout': '5000000',
 'max_delay': '5000000',
 }
)
stream = container.streams.video[0]
codec_context = stream.codec_context
codec_context.export_mvs = True
codec_context.gop_size = 25 

for packet in self.container.demux(video=0):
 for video_frame in packet.decode():
 print(video_frame.is_key_frame)



Output :


True
False
True
False
...



Note 1 : I can't edit the source. I can just edit the code used to stream the video.


Note 2 : same solution should apply to
pyav
,libavi
andffmpeg
.

Edit : it seems that B-frames are disabled :
codec_context.has_b_frames
isFalse


-
Converting variable bitrate on the fly with ffmpeg
4 septembre 2016, par Łukasz Bezwerchnyi do cut some video files with either avidemux or virtualdub using directstream copy, some of the files comes with variable bitrate, the problem is that after such cutting my default video cataloging software shows those files lenght as 0:0, i managed to fix this problem with ffmpeg using "-vcodec copy -acodec copy". The output seem to be fine now but i have another problem, these new files have sound problem, on pot player everything is working fine but on mpc and my cataloging software which also plays media sound gets cut off at the half of the movie, for example 2h movie has only 30min of sound. I did look at the using mediainfo software and it shows me something like : video lenght 1:55, audio lenght 32min. I think the problem is the vbr, i did manage to solve this problem by extracting mp3 file from the troublesome video and convert it to 128kb constant bitrate and again merge the video and new audio file and it seems fine. Video and audio match at the whole video lenght. It’s just a bit of tedious to get things done for a big amount of files to fix, is there a parameter that i could use in one command line to do the job in one process, i mean like :
ffmpeg -i test.avi -vcodec copy -"convert vbr to 128kb" "save to test2.avi" ?