
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (63)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (4377)
-
FFmpeg : Batch convert all audio (mp3) in folder to video (mp4) with album artwork
4 novembre 2024, par coden00bI'm looking to batch convert all audio (mp3) in folder to video (mp4) with album artwork. This for uploading audios to youtube. I have pretty much a working code but I want to automate the whole thing.





Here's the code from .bat file I'm using.





(source :FFMpeg Batch Image + Multiple Audio to video)



echo off
for %%a in ("*.mp3") do "C:\ffmpeg\bin\ffmpeg" -loop 1 -i "C:\ffmpeg\bin\input.jpg.jpg" -i "%%a" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -c:a aac -shortest -strict experimental -b:a 192k -shortest "C:\mp4\%%~na.mp4"
pause




- 

- "C :\ffmpeg\bin\ffmpeg" the folder of codec
- "C :\ffmpeg\bin\input.jpg" image path
- "C :\mp4\%% na.mp4" output folder
- -vf scale=854:480 you can specify the resolution of your video 16:9 for youtube video
- -c:a aac -shortest use aac codec, by specify -shortest the video length will match the audio length













This works great except I have to manually put the album art each time. I want ffmpeg to automatically extract the album art from each audio file and then convert it to video in batch.





This is the code for extracting album art from .mp3 files





ffmpeg -i input.mp3 -an -vcodec copy cover.jpg




Thanks.


-
PyQt-thread. Get dynamically output
1er janvier 2020, par ZProI use PyQt-thread for parallel conversion of mp3 files to aac via ffmpeg.
Here is my code :class SubprocessThread(QThread):
signal = pyqtSignal('PyQt_PyObject')
def __init__(self, command, args):
QThread.__init__(self)
self.command = command
self.args = args
def __del__(self):
self.wait()
def run(self):
output = subprocess.check_output('{0} {1}'.format(self.command, self.args), shell=True).split()
self.signal.emit(output)And here is example of usage :
threads = []
for part in parts.keys():
args = "-i \'{0}.mp3\' -c:a aac -b:a {1}k \'{2}.m4a\'".format(
os.path.join(tmp_dir, str(part)),
int(self.bitrate_cbx.currentText()),
os.path.join(tmp_dir, str(part)))
print(args) # debug
ffmpeg_thread = SubprocessThread('ffmpeg', args)
ffmpeg_thread.signal.connect(self.on_data_ready)
threads.append(ffmpeg_thread)
ffmpeg_thread.start()
self.threads_count += 1I want to make progress bar, based on conversion, but ffmpeg always updates last string in his output (when conversion in progress).
Here is an example of ffmpeg output while files are converting :user@host$ ffmpeg -i '/home/user/001.mp3' -c:a aac -b:a 128k -vn '/home/user/test.m4a'
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mp3, from '/home/user/001.mp3':
Metadata:
encoder : Lavf57.41.100
title : test
artist : test
album_artist : test
album : test
composer : test
genre : test
date : 2018
Duration: 00:12:38.02, start: 0.025056, bitrate: 192 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
Metadata:
encoder : Lavc57.48
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Cover (front)
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to '/home/user/test.m4a':
Metadata:
date : test
title : test
artist : test
album_artist : test
album : test
composer : test
genre : test
encoder : Lavf58.29.100
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc58.54.100 aac
size= 12107kB time=00:12:38.01 bitrate= 130.8kbits/s speed=79.2xHow can I receive this data (string, that begins from "size=...") from my parallel QThreads to calculate overall progress ?
-
PyQt-thread. Get dynamicly output
1er janvier 2020, par ZProI use PyQt-thread for parallel conversion of mp3 files to aac via ffmpeg.
Here is my code :class SubprocessThread(QThread):
signal = pyqtSignal('PyQt_PyObject')
def __init__(self, command, args):
QThread.__init__(self)
self.command = command
self.args = args
def __del__(self):
self.wait()
def run(self):
output = subprocess.check_output('{0} {1}'.format(self.command, self.args), shell=True).split()
self.signal.emit(output)And here is example of usage :
threads = []
for part in parts.keys():
args = "-i \'{0}.mp3\' -c:a aac -b:a {1}k \'{2}.m4a\'".format(
os.path.join(tmp_dir, str(part)),
int(self.bitrate_cbx.currentText()),
os.path.join(tmp_dir, str(part)))
print(args) # debug
ffmpeg_thread = SubprocessThread('ffmpeg', args)
ffmpeg_thread.signal.connect(self.on_data_ready)
threads.append(ffmpeg_thread)
ffmpeg_thread.start()
self.threads_count += 1I want to make progress bar, based on conversion, but ffmpeg always updates last string in his output (when conversion in progress).
Here is an example of ffmpeg output while files are converting :user@host$ ffmpeg -i '/home/user/001.mp3' -c:a aac -b:a 128k -vn '/home/user/test.m4a'
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mp3, from '/home/user/001.mp3':
Metadata:
encoder : Lavf57.41.100
title : test
artist : test
album_artist : test
album : test
composer : test
genre : test
date : 2018
Duration: 00:12:38.02, start: 0.025056, bitrate: 192 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
Metadata:
encoder : Lavc57.48
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Cover (front)
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to '/home/user/test.m4a':
Metadata:
date : test
title : test
artist : test
album_artist : test
album : test
composer : test
genre : test
encoder : Lavf58.29.100
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc58.54.100 aac
size= 12107kB time=00:12:38.01 bitrate= 130.8kbits/s speed=79.2xHow can I receive this data (string, that begins from "size=...") from my parallel QThreads to calculate overall progress ?