
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (40)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
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 (...)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (6828)
-
How to Write the Numpy array video to Disk While adding Audio from File using the python ffmpegio
31 décembre 2023, par soham tilekarI Have an A NumPy array Representing the Video in the memory how Can I Use the
ffmpegio
python module to save it on the File on the disk While adding the audio.

I Try Many things. I Also Ask answer on the python-ffmpegio github page.
Discussinnon link


The Whole module Code is on the vidiopy


I Get an Error : -


Traceback (most recent call last):
 File "d:\soham_code\video_py\test.py", line 5, in <module>
 clip.write_videofile(r'D:\soham_code\video_py\test\test_video.mp4')
 File "d:\soham_code\video_py\vidiopy\video\VideoClips.py", line 190, in write_videofile
 with ffmpegio.open(
 File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 137, in __enter__
 return next(self.gen)
 ^^^^^^^^^^^^^^
 File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\__init__.py", line 324, in open
 stream = StreamClass(*args, **kwds)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\streams\SimpleStreams.py", line 489, in __init__
 super().__init__(
 File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-packages\ffmpegio\streams\SimpleStreams.py", line 365, in __init__
 configure.add_url(ffmpeg_args, "input", *input)
TypeError: add_url() takes from 3 to 5 positional arguments but 765 were given
</module>


Modified Code : -


def write_videofile(self, filename, fps=None, codec=None, 
 bitrate=None, audio=True, audio_fps=44100,
 preset="medium", pixel_format=None,
 audio_codec=None, audio_bitrate=None,
 write_logfile=False, verbose=True,
 threads=None, ffmpeg_params: dict[str, str] | None = None,
 logger='bar', over_write_output=True):
 
 # video_np = np.asarray(tuple(self.iterate_frames_array_t(fps if fps else self.fps if self.fps else (_ for _ in ()
 # ).throw(Exception('Make Frame is Not Set.')))))

 audio_name, _ = os.path.splitext(filename)


 ffmpeg_options = {
 'preset': preset,
 
 **(ffmpeg_params if ffmpeg_params is not None else {}),
 **({'c:v': codec} if codec else {}),
 **({'b:v': bitrate} if bitrate else {}),
 **({'pix_fmt': pixel_format} if pixel_format else {}),
 **({'c:a': audio_codec} if audio_codec else {}),
 **({'ar': audio_fps} if audio_fps else {}),
 **({'b:a': audio_bitrate} if audio_bitrate else {}),
 **({'threads': threads} if threads else {}),
 }

 with tempfile.NamedTemporaryFile(
 suffix=".wav", prefix=audio_name + "_temp_audio_"
 ) as temp_audio_file:
 if self.audio and audio:
 self.audio.write_audio_file(temp_audio_file)
 # audio_file_name = temp_audio_file.name

 ffmpeg_options.update(
 {"extra_inputs": [temp_audio_file.name], "acodec": "copy", "map": ["0:v", "1:a"]}
 )

 with ffmpegio.open(
 filename,
 "wv",
 fps,
 **ffmpeg_options,
 overwrite=over_write_output,
 show_log=True,) as f:
 
 for I in self.iterate_frames_array_t(fps): # if fps else self.fps if self.fps else (_ for _ in ()
 # ).throw(Exception('Make Frame is Not Set.'))):
 f.write(I)



I Tried Many things : -
using transcode, providing the
-i
flag with audio name While using theffmpegio.write
, etc.

-
Convert to webm format with CFR
6 novembre 2013, par user1910483I use the webm format in my program and for normal work I need Constant frame rate(CFR), but all of the programs that I convert the video from .ogv set Variable Frame Rate (VFR). Set -qcomp 0 option to ffmpeg has no effect, although the documentation states that should be set CBR. Encoder vpxenc takes yuv420 format, so it fits poorly. Is there a program that will correctly set the CBR mode ?
-
Python : Error Combining Audio and Video Files using ffmpeg concat
4 juillet 2022, par AmanI have a function that downloads videos using pytube. I have to download both the audio and the video files separately and then combine them using ffmpeg. This is what I have :


def DownloadVideo(video_link,folder,maxres=None):
 if maxres==None: 
 print("Video Started") 
 video_file = YouTube(video_link).streams.order_by('resolution').desc().first().download()
 print("Video Done")
 
 else:
 print("Video Started") 
 video_file = YouTube(video_link).streams.filter(res=maxres).order_by('resolution').desc().first().download(output_path=folder) 
 print("Video Done", video_file)
 
 
 video_name = slugify(video_file.replace(".webm","").split("/")[-1]) 
 print("Audio Started")

 audio_file = YouTube(video_link).streams.filter(only_audio=True).order_by('abr').desc().first().download(filename_prefix="audio_", output_path=folder)

 print("Audio Done")
 
 source_audio = ffmpeg.input(audio_file)
 source_video = ffmpeg.input(video_file)

 print("source audio: ", source_audio)
 print("source video: ", source_video)

 print("Concatenation Started")

 ffmpeg.concat(source_video, source_audio, v=1, a=1).output(f"{folder}/{video_name}.mp4").run()

 # Combine the video and audio
 
 print("Concatenation Done")
 return None



However, this gives me the following error :


...
Video Started
Video Done D:/Data Projects/downloads/videos\The media.webm
Audio Started
Audio Done
source audio: input(filename='D:/Data Projects/downloads/videos\\audio_The media.webm')[None] <1792faaa507b>
source video: input(filename='D:/Data Projects/downloads/videos\\The media.webm')[None] <1f47beb69b93>
Concatenation Started
Traceback (most recent call last):
 File "<stdin>", line 4, in <module>
 File "<stdin>", line 20, in DownloadVideo
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 313, in run
 process = run_async(
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 284, in run_async
 return subprocess.Popen(
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
</stdin></module></stdin>


But both
The media.webm
andaudio_The media.webm
exist in the folder.

What am I doing wrong and how can I fix this ?