
Recherche avancée
Autres articles (47)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8244)
-
Video - ffmpeg wrong frame number when merging mkv files
9 juin 2014, par communicationsim trying to join several mkv files together with ffmpeg.
they all have the same encoding settings.
i think ffmpeg joins the files, because the filesize of the resulting file has the size of all others combined
BUT when i open the file, only the number of frames of the last part are shown, so i guess its a problem in the header, where is says how long the video is...
How can i fix that ?
Heres the command i use :
ffmpeg -i "concat:100frames_part0.mkv|100frames_part1.mkv|100frames_part3.mkv" -c copy 100frames.mkv
-
Kivy does not load ff_mpeg
25 mai 2016, par Edv BeqI have been trying to use a simple code to play videos with Kivy and Python. The shortest code I found is the one shown below.
-
At first, Kivy was showing an error on
Pyglet
andff_mpeg
. Therefore, I installed Pyglet - which consequently requireAVbin
, - none of which would load automatically. -
I found the following solution on another post - which fixed the sound :
import pyglet
pyglet.lib.load_library('avbin')
pyglet.have_avbin=True -
Can I do the same with
ff_mpeg
? Can it be loaded manually ? -
I have already installed
ffmpeg
:- When I type
ffmpeg -version
on cmd - it displays ffmpeg version N-.... built with gcc 4.9.2(GCC). Also, I have added all the paths in WIndows.
- When I type
-
Also my
pip list
:Cython (0.21.2)
docutils (0.12)
ffmpegwrapper (0.1.dev0)
Kivy (1.8.0)
Kivy-Garden (0.1.1)
Pillow (2.1.0)
pip (6.0.8)
pygame (1.9.2a0)
pyglet (1.2.1)
requests (2.5.1)
setuptools (12.0.5) -
Error on Kivy :
[DEBUG ] [Video ] Ignored <ffmpeg> (import error)
[INFO ] [Video ] Provider: pyglet(['video_ffmpeg'] ignored)
</ffmpeg>and
File "C:\Python33\lib\site-packages\kivy\core\video\video_pyglet.py", line 67, in _update
self._player.dispatch_events(dt)
AttributeError: 'Player' object has no attribute 'dispatch_events' -
And, finally here is the code - I am working with :
import kivy
import pyglet
pyglet.lib.load_library('avbin')
pyglet.have_avbin=True
kivy.require('1.8.0')
from sys import argv
from os.path import dirname, join
from kivy.app import App
from kivy.uix.videoplayer import VideoPlayer
class VideoPlayerApp(App):
def build(self):
if len(argv) > 1:
filename = argv[1]
else:
curdir = dirname(__file__)
filename = join(curdir, 'project.mp4')
return VideoPlayer(source=filename, state='play')
if __name__ == '__main__':
VideoPlayerApp().run()
I have searched a lot of other threads, and installed ffmpeg several times with no luck. Any help would be greatly appreciated. Thank you !
-
-
I want to use my AMD GPU in Python FFMPEG [duplicate]
1er août 2023, par Filipe BragaI'm using this code to take videos that range from 15 to 30 seconds long, and looping them to a target duration of 1:05 :


import os
import glob
import torch
from moviepy.editor import VideoFileClip, concatenate_videoclips

def estender_duracao_gpu(video_path, duracao_desejada):
 video = VideoFileClip(video_path)
 duracao_atual = video.duration

 if duracao_atual < duracao_desejada:
 repeticoes = int(duracao_desejada / duracao_atual)
 video_clips = [video] * repeticoes
 video_clips.append(video.subclip(0, duracao_desejada % duracao_atual))

 # Concatena os clips utilizando a GPU
 video_final = concatenate_videoclips(video_clips, method="compose")

 return video_final
 else:
 return None

def estender_videos_em_massa(pasta_origem, pasta_destino, duracao_desejada):
 if not os.path.exists(pasta_destino):
 os.makedirs(pasta_destino)

 videos = glob.glob(os.path.join(pasta_origem, "*.mp4"))

 for video_path in videos:
 nome_video_sem_extensao = os.path.splitext(os.path.basename(video_path))[0]
 
 try:
 video_estendido = estender_duracao_gpu(video_path, duracao_desejada)

 if video_estendido is not None:
 nome_video_final = os.path.join(pasta_destino, f"{nome_video_sem_extensao}_estendido.mp4")
 video_estendido.write_videofile(nome_video_final, codec="libx264", write_logfile=False, threads=torch.cuda.device_count())
 print(f"Duração do vídeo {nome_video_sem_extensao} estendida com sucesso.")
 else:
 print(f"O vídeo {nome_video_sem_extensao} já possui a duração desejada ou é mais longo.")
 
 except Exception as e:
 print(f"Ocorreu um erro ao estender o vídeo {nome_video_sem_extensao}: {str(e)}")
 continue

# Example of use:
pasta_origem = "pasta_com_os_videos" # Replace with the path of the folder containing the input videos
pasta_destino = "pasta_com_videos_estendidos" # Replace with the path of the folder to save the extended videos
duracao_desejada = 65 # 65 seconds (1 minute and 5 seconds)

estender_videos_em_massa(pasta_origem, pasta_destino, duracao_desejada)



The code is working, but it does not use my AMD GPU (RX 5700XT). How can I make it do so ?