
Recherche avancée
Autres articles (111)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (7315)
-
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`
 );



-
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 ?








-
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 ?