
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (47)
-
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 -
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 (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (6816)
-
Cross Fade Arbitrary Number of Videos ffmpeg Efficiently
15 avril 2022, par jippyjoe4I have a series of videos named 'cut_xxx.mp4' where xxx represents a number 000 through 999. I want to do a cross fade on an arbitrary number of them to create a compilation, and each fade should last 4 seconds long. Currently, I'm doing this with Python, but I suspect this is not the most efficient way :


import subprocess 
def get_length(filename):
 result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
 "format=duration", "-of",
 "default=noprint_wrappers=1:nokey=1", filename],
 stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT)
 return float(result.stdout)

CROSS_FADE_DURATION = 4

basevideo = 'cut_000.mp4'
for ii in range(total_videos - 1):
 fade_start = math.floor(get_length(basevideo) - CROSS_FADE_DURATION) # new one
 outfile = f'cross_fade_{ii}.mp4'
 append_video = f'cut_{str(ii+1).zfill(3)}.mp4'
 cfcmd = f'ffmpeg -y -i {basevideo} -i {append_video} -filter_complex "xfade=offset={fade_start}:duration={CROSS_FADE_DURATION}" -an {outfile}'
 basevideo = outfile
 subprocess.call(cfcmd)
 print(fade_start)



I specifically remove the audio with
-an
because I'll add an audio track later. The issue I see here is that I'm compressing the video over and over again with each individual video file I add to the compilation because I'm only adding one video at a time and then re-encoding.

There should be a way to cross fade multiple videos together into a compilation, but I'm not sure what this would look like or how I would get it to work for an arbitrary number of video files of different durations. Any idea on what that monolithic ffmppeg command would look like or how I could automatically generate it given a list of videos and their durations ?


-
Concatenate two files while keeping the duration the same as the two files separately
21 septembre 2020, par John PollardWhen I calculate the duration of each individual file I want to concatenate I get 10.24 for both. So I figured when I concatenate the two files I would get a duration of file A plus file B or 10.24 + 10.24 giving me a total duration of 20.48 for the combined file. But no matter what command I use to concentrate I cannot get the same duration. Am I doing something wrong ?


ffprobe -i "audioA.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24 



ffprobe -i "audioB.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24 



Which makes a total of 10.24 + 10.24 = 20.48 seconds


But when I concatenate the files I get a different duration. Here are my different tries.


Try 1


FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' -map 0:a -codec:a copy -map_metadata -1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.610612



Try 2


FFMPEG -y -i audioA.mp3 -i audioB.mp3 -filter_complex [0:a][1:a]concat=n=2:v=0:a=1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0
20.453878



Try 3


FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.506122



- 

- Is there a command to use to concatenate that will output a file with
the same duration ?
- Is there a way to do that without reencoding ?
- What makes the durations different in the combined files above ?








-
FFMPEG.wasm Cannot Add Album Cover To MP3 File
5 juillet 2022, par Shaan Khanfor a project I'm working on I'm trying to split a video into multiple audio clips whilst adding metadata for each individual track. Whilst doing this, whilst I've added most of the metadata including title & artist, I'm unable to add an album cover via FFMPEG.wasm. Whilst my command works fine with regular FFMPEG.wasm, I'm unable to get it to work via the webassembly version.


I'm aware that my album cover is correctly being assigned via FS.readfile and that my command in theory should work, but I'm unable to figure out why it isn't working. Is this a FFMPEG.wasm limitation and if so, is there any workaround for this ?


- 

- Normal FFMPEG Command




ffmpeg -i "song.mp3" -i albumCover.jpg -map 0:0 -map 1:0 -y -codec:a libmp3lame -ac 2 -ar 48000 -ab 320k -ss 00:00:00 -t 00:00:20 -id3v2_version 3 -metadata title="SongOne" -metadata album_artist="Artist Name" -metadata album="Youtube Name" -metadata track="1" "output.mp3"



- 

- FFMPEG WASM Implementation




let commandArray = [
 "-i",
 "song.mp3",
 "-i",
 "albumCover.jpg",
 "-map",
 "0:0",
 "-map",
 "1:0",
 "-y",
 "-codec:a",
 "libmp3lame",
 "-ac",
 "2",
 "-ar",
 "48000",
 "-ab",
 "320k",
 "-ss",
 startTime.toString(),
 ];

 if (duration != "-1") {
 commandArray.push("-t", duration.toString());
 }

 commandArray.push(
 "-id3v2_version",
 "3",
 "-metadata",
 `title="${title}"`,
 "-metadata",
 `album_artist="${artist}`,
 "-metadata",
 `album="${albumInfo.name}"`,
 "-metadata",
 `track="1"`,
 `${timestamp.songName} - ${timestamp.artistName}.mp3`
 );