
Recherche avancée
Autres articles (12)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4618)
-
Piping input AND output of ffmpeg in python
5 mars 2019, par bluesummersI’m using
ffmpeg
to create a video, from a list of base64 encoded images that I pipe intoffmpeg
.Outputting to a file (using the attached code below) works perfectly, but what I would like to achieve is to get the output to a Python variable instead - meaning piping input and piping output but I can’t seem to get it to work
My current code :
output = os.path.join(screenshots_dir, 'video1.mp4')
cmd_out = ['ffmpeg',
'-y', # (optional) overwrite output file if it exists
'-f', 'image2pipe',
'-vcodec', 'png',
'-r', str(fps), # frames per second
'-i', '-', # The input comes from a pipe
'-vcodec', 'png',
'-qscale', '0',
output]
pipe = sp.Popen(cmd_out, stdin=sp.PIPE)
for screenshot in screenshot_list:
im = Image.open(BytesIO(base64.b64decode(screenshot)))
im.save(pipe.stdin, 'PNG')
pipe.stdin.close()
pipe.wait()This results in a working mp4, but I would like to avoid saving to local.
Running the same code with changing
output
to'-'
or'pipe:1'
and addingstdout=sp.PIPE
results in an error[NULL @ 0x2236000] Unable to find a suitable output format for ’pipe :’
-
How do I resize my video ? in proportion (python)
23 septembre 2022, par ggn0*I am sorry for my poor English. It's a translator.


I used Python moviepy to resize it, but the pixels are broken. I want to make the video 9:16 ratio while maintaining the original image quality. (So that there are black frames on both sides)


from moviepy.editor import *
c = VideoFileClip('test.mp4')
f = c.resize(newsize=(1080,1920))
f.write_videofile('aa.mp4')



This code causes pixels to collapse.


Let me show you an example picture.








It doesn't have to be moviepy, so I'd appreciate it if you could tell me how to use Python. (PIL ? opencv ?)


Thank you so much. Have a nice day 🙏


-
Looping 2 videos simultaneously until audio file ends in FFMPEG
20 septembre 2022, par Fin CottleI'm very new to ffmpeg, learning quickly but struggling to find a solution to the following.


I would like to be able to loop 2 videos until the end of an extra audio file.
One of the videos will be a base & the other will be an overlay of 50% opacity on top of the base.


I've got the gist of how to execute these within other operations (e.g. the 50% opacity, or the looping of a single video until the end of an audio file, these don't need to be answered here), but the looping of both videos until the end of the separate audio is proving challenging.


Here's where I've got so far :


ffmpeg -stream_loop -1 -i base.mp4 -i overlay.mp4 -i audio.mp3 -filter_complex "[0:v]setpts=PTS-STARTPTS[top]; [1:v]setpts=PTS-STARTPTS, format=yuva420p,colorchannelmixer=aa=0.5[bottom]; [top][bottom]overlay=shortest=1[v1]" -map "[v1]" -map 2:a -vcodec libx264 -y out.mp4



This loops the base until the end of the overlay, but then freezes the base & overlay until the end of the audio (as the audio is longer).


One solution may be to loop
v1
until the end of the audio ? How would I go about this ?

Either way, no matter the length of either video, the final output should be the length of the audio.


My implementation could be pretty messy as my attempts are all amalgamations of internet answers & research without knowing the full meaning of each param, so please let me know if anything is wrong.


Thanks in advance.