
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (16)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (2845)
-
ffmpeg replace central channel with ffmpeg
24 mai 2020, par Rafal BI'm trying to replace central channel in the movie (Movie-A) with another audio stream from another movie (Movie-B).
I was able to extract stereo stream from Movie-B :



ffmpeg.exe" -i "Movie-B.mkv"

Stream #0:1(pol): Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s (default)




and convert it to mono stream :



ffmpeg.exe" -i "Movie-B.mkv" -vn -ab 320k -ac 1 "Movie-B-Audio.ac3"
Output #0, ac3, to 'Movie-B-Audio.ac3':
Stream #0:0(pol): Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s (default)




For Movie-A :



ffmpeg.exe" -i "Movie-B.mkv"
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)




so Layout is
5.1
(FL+FR+FC+LFE+BL+BR
), not5.1(side)
(FL+FR+FC+SL+SR
)


Media Info shows :



Audio
ID: 2
Format: AAC
Format info: Advanced Audio Codec Low Complexity
Commercial name: AAC
Codec ID: A_AAC-2
Bit rate: 426 kb/s
Channel(s): 6 channels
Channel positions: Front: L C R, Side: L R, LFE
Channel layout: C L R Ls Rs LFE




I have extracted all 6 channels into one stream with containing 6 channels :



ffmpeg.exe" -i "Movie-A.mkv" -vn -ab 320k -ac 6 "Movie-A-Audio.ac3"
Output #0, ac3, to 'Movie-A-Audio.ac3':
Stream #0:0(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 320 kb/s (default)




But at this stage I'm getting different Layout in Movie-A-Audio.ac3 :



Audio
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Duration : 2 h 16 min
Bit rate mode : Constant
Bit rate : 320 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs




In source Movie-A.mkv it is :
Channel layout : C L R Ls Rs LFE



In output Movie-A-Audio.ac3 it is :
Channel layout : L R C LFE Ls Rs



Then I tried to extract those 6 channels into separate mono-stream files :



ffmpeg.exe" -i "Movie-A-Audio.ac3" -filter_complex "channelsplit=channel_layout=5.1[FL][FR][FC][LFE][BL][BR]" -ab 320k -ac 1 -map "[FL]" extr_front_left.ac3 -ab 320k -ac 1 -map "[FR]" extr_front_right.ac3 -ab 320k -ac 1 -map "[FC]" extr_front_center.ac3 -ab 320k -ac 1 -map "[LFE]" extr_subwoofer.ac3 -ab 320k -ac 1 -map "[BL]" extr_back_left.ac3 -ab 320k -ac 1 -map "[BR]" extr_back_right.ac3




With result :



Stream mapping:
 Stream #0:0 (ac3) -> channelsplit
 channelsplit:FL -> Stream #0:0 (ac3)
 channelsplit:FR -> Stream #1:0 (ac3)
 channelsplit:FC -> Stream #2:0 (ac3)
 channelsplit:LFE -> Stream #3:0 (ac3)
 channelsplit:BL -> Stream #4:0 (ac3)
 channelsplit:BR -> Stream #5:0 (ac3)
Press [q] to stop, [?] for help
Output #0, ac3, to 'extr_front_left.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3
Output #1, ac3, to 'extr_front_right.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #1:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3
Output #2, ac3, to 'extr_front_center.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #2:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3
Output #3, ac3, to 'extr_subwoofer.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #3:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3
Output #4, ac3, to 'extr_back_left.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #4:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3
Output #5, ac3, to 'extr_back_right.ac3':
 Metadata:
 encoder : Lavf58.29.100
 Stream #5:0: Audio: ac3, 48000 Hz, mono, fltp, 320 kb/s
 Metadata:
 encoder : Lavc58.54.100 ac3




When I'm checking channels layouts of those files extracted I see each of them is having Channel Layout marked with Central, for instant front_left.ac3 :



Audio
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Duration : 2 h 16 min
Bit rate mode : Constant
Bit rate : 320 kb/s
Channel(s) : 1 channel
Channel layout : C
Sampling rate : 48.0 kHz




Then I try to join needed channels :



ffmpeg.exe" -i extr_front_left.ac3 -i extr_front_right.ac3 -i Movie-B-Audio.ac3 -i extr_back_left.ac3 -i extr_back_right.ac3 -i extr_subwoofer.ac3 -filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a]join=inputs=6:channel_layout=5.1[a]" -map "[a]" "final-output.ac3




But it is completely messed up : central channel (voice) is heard in front right speaker, in back right speaker is silence (or maybe it is subwoofer ?)



Target is easy :



- 

- convert source stereo central audio channel in Movie-B.mkv to mono channel
and
- insert it as central channel into Movie-A.mkv that have 5.1 Audio stream with layout
C L R Ls Rs LFE







So far I was able to complete 1. but I have a problem with mappings.
Can someone try to guide me how to do that ?


-
avcodec/h2645_parse : add support for H266/VVC
21 mars 2023, par Nuo Mi -
FFMPEG with Rails 4.2 in production
12 février 2016, par VincentI’m using FFMPEG to convert an uploaded wav file in a mp3.
My code works in development mode but not in production and I can’t find where the error is. As far as I can tell, I think it’s a path problem with the tmp file. FFMPEG works in production (Digital Ocean) when I run a command on the terminal.
My mp3 job :
class Mp3UploadJob < Struct.new(:audiofile_id)
def perform
path = audiofile.wav_file.url.to_s
mp3_file = File.join(Rails.root, "tmp", "uploads", "#{audiofile.filename}.mp3")
%x[ffmpeg -i "#{path}" -b:a 192k -ar 44100 -metadata title="#{audiofile.title}" -metadata artist="#{audiofile.mp3_artist_name}" -metadata album="#{audiofile.mp3_album}" -metadata date="#{audiofile.release_date}" -metadata genre="#{audiofile.genre}" "#{mp3_file}"]
audiofile.mp3_file = open(mp3_file)
audiofile.save!
File.delete(mp3_file)
end
endNote : the wav file comes from a dropbox chooser box.
My wav job (ran before the mp3 job) :
class WavUploadJob < Struct.new(:audiofile_id)
def perform
audiofile.remote_wav_file_url = audiofile.dropbox_wav
audiofile.save!
end
end