
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (41)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
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 (...)
Sur d’autres sites (7462)
-
Bash process substitution in Python with Popen
7 septembre 2022, par moorejI'm attempting to create a looped video file by calling ffmpeg from the python subprocess library. Here's the part that's giving me problems :


import subprocess as sp
sp.Popen(['ffmpeg', '-f', 'concat', '-i', "<(for f in ~/Desktop/*.mp4; do echo \"file \'$f\'\"; done)", "-c", "copy", "~/Desktop/sample3.mp4"])



With the above code I'm getting the following error :


<(for f in /home/delta/Desktop/*.mp4; do echo "file '$f'"; done): No such file or directory



I did find a similarly phrased question here. But I'm not sure how the solution might apply to solving my issue.


-
Trying to fetch all audio streams with FFmpeg Python
27 juillet 2022, par ApolloI'm using ffmpeg-python to fetch streams from a video and write some parameters (codec_name, resolution, etc.) for each stream into csv.


video = 'test.mkv'
probe = ffmpeg.probe(video)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
print(video_stream['codec_long_name'])
audio_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'audio'), None)
...



My problem is that it works well for a video stream, but not for multiple audio (or subtitles) streams. If the video has several audio streams it returns only one audio stream.


I've tried another approach, but it returns some streams 2-3 times and I get duplicates. So if the video sample has 4 audio tracks, I end up with 9 audio streams instread of 4.


audio_streams = []
for audio in (probe['streams']):
 if (audio['codec_type'] == 'audio'):
 audio_streams.append(audio)
 pprint(audio_streams)



All other ideas I tried don't work, I'm new to programming and I'm stuck with it.
How can I get all audio streams from a file without duplicates ?


-
How do I connect two GIFs to play one after another in Python ?
9 novembre 2022, par AndrewIf I have two GIFs, GIF 1 being 10 seconds long and GIF 2 being 5 seconds long, is there a way to connect them so the final GIF is a total of 15 seconds long ?


Would I have to loop through each frame of both the GIFs with
imageio.mimread()
and output, once all the frames are read in memory ?

Or is there another way by knowing the start and end times and shifting it ?


Edit :
The solution presented by FirefoxMetzger is extremely Pythonic, ideal if you do not wish to install other software / packages like gifsicle.


import imageio.v3 as iio
import numpy as np

frames = np.vstack([
 iio.imread("imageio1.gif"),
 iio.imread("imageio2.gif"),
])

# get duration each frame is displayed
iio.imwrite("imageio_combined.gif", frames)



This completes in 15.6 seconds for two GIFs, each containing 100 frames.


However, if runtime is important, I recommend gifsicle :


gifsicle(
 sources=["imageio1.gif", "imageio2.gif"], # or just omit it and will use the first source provided.
 destination="imageio3.gif",
 options=["--optimize=2", "--threads=2", "--no-conserve-memory"]
)



This completes in 4.8 seconds, which is three times as fast.