
Recherche avancée
Autres articles (60)
-
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 -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (9821)
-
Normalizing audio of several wav snippets with ffmpeg
17 mai 2023, par dick_kickemI searched the site and I figured that maybe
ffmpeg-normalize
could be part of my solution but I'm really not sure.

In my free time me and my friends create quizzes for people to solve. One of these is a music quiz, where you hear audio snippets and have to guess the artist and song title. A few years back I did most of them using Audacity, which means recording snippets from existing videos, inserting fade in and fade out to every snippet, putting announcements like "Number x" before the x-th song and also making sure that all songs are fairly of equal loudeness (-6.0 dB).


The result in Audacity looked like this.




Lazy as I am, I learned about
ffmpeg
and wrote a script, which does all these steps for me. The script is mostly written in bash. I use some audio files where I extract the audio in wav-format, add a fade in and fade out and then I try to set the volume to -6.0 dB as with Audacity. The part where this happens looks like this :

...[some code before]...

# write the audio details of temmp.wav into the "info" file
ffmpeg -i temp.wav -filter:a volumedetect -f null - 2> info

#check out the max volume of temp.wav
max_vol=$(grep "max_volume" info | cut -d ' ' -f5)

# determine the difference between the max volume and -6
vol_diff=$(expr "-6-($max_vol)" | bc -l)

# change temp.wav loudness by the determined difference
ffmpeg -y -i temp.wav -filter:a "volume=$vol_diff$db" $count.wav

...[some code after]...



I do this with all snippets, leaving me with usually ten snippets in the format
1.wav
,2.wav
and so on. Lastly, I concatenate them all with announcements in the formnr1.wav
,1.wav
,nr2.wav
,2.wav
and so on. Overall this works really great for me. Yet, the loudness is not quite as equal as in Audacity. Here is a screenshot of a generated music quiz using the described script (not the same music snippets as the example before) :



You can see some peaks pointing out. It's not bad and in fact, it works for me in most cases, but it's not like what I used to have with Audacity. Does anyone have any idea how to fix that to make it more equal ?


Thank you in advance and kind regards


-
where can one find old patches/curated versions of ffmpeg for qsv (mpeg2_qsv) ?
10 avril 2023, par CodeCalffor the past year or so the mpeg2_qsv encoder in ffmpeg/libmfx has been broken due to a idr interval problem (sends only one idr frame at the start of the video rather than sending idr frames at a certain interval) i have found a solution/workaround by adding the idr-interval option defined in h264_qsv.c to the mpeg2_qsv.c provided in ffmpeg it does work but the quality of the output is subpar even after applying heavy post processing filters and i have been working on this exact platform for the past 4 years so i know for a fact that it used to work way better hence i have been trying to revert the changes made to ffmpeg in the past 1-2 years unsuccessfully as i am not able to find old patches that i could use as reference.


i understand that for this problem a lot of people suggest using ffmpeg 2.8 which apparently is the best for old qsv behaviour but due to mediasdk version mismatches i haven't been able to build it successfully on any new OS after ubuntu 18.04 but i cannot use ubuntu 18.04 or below because of a hardware issue on my platform which messes with the xserver introducing a lot of weird errors if anyone has any suggestions of how i can overcome this then please help as i am all ears


i am new to this website so i apologize in advance if i have made a mistake in asking this question.


thank you for your patience and guidance


-
JavaScript Audio Decoder Library or Way to Decode Browser Unsupported Audio Formats ?
20 mars 2023, par user21338683The issue :


I've spent a week trying to figure out how I can play or decode ALAC files in my Electron application.


Libraries I have tried or looked at :


- 

-
Aurora - Github issues have been stale for years. Last updates were in 2016. It doesn't work when I install it with npm.


-
Audio Decode - Doesn't support ALAC.


-
WASM Audio Decoders - Doesn't support ALAC.


-
Web Audio API from AudioJS - Depends on Aurora. Same issue where it fails to load coffee files.


-
FFmpeg.JS from Kagami - Has a memory leak then crashes.


-
FFmpeg.wasm - I went down a very deep rabbit hole trying to figure out if this was the tool I needed. More on that later.


-
A few backend audio players for NodeJS - I don't remember their names but they're all unmaintained.


-
HowlerJS - I don't know what formats they support, but it looks like it's the same as the browser, which would mean no ALAC. Still unsure.




















Things I've tried :


Web Audio API | MSE


I have tried looking into the Web Audio API and MSE and left disappointed in their lack of support for a variety of audio formats.


FFmpeg.wasm


I got it to convert an ALAC file into a format the Electron browser (which is Chrome) would accept, however, it can take several seconds to convert the whole file which is not acceptable to wait that long after you click play.


I tried reading a file stream and converting chunks, however, I was limited by what I could pass through the IPC as it's not possible to pass functions or things that can't be stringified.


Ultimately I would need to coordinate when to fetch the chunks and then play them, which sounded like a job for MSE until I read the formats it supported were even less than the Web Audio API and HTML audio tag.


I tried to set it up anyway by converting chunks in FFmpeg and reading from its memory, then passing that to an AudioContext originally, but it never played as the source was invalid. I then tried converting to a supported MSE format but that required getting the MIME type and codecs. I now needed a library for that or read the bytes myself... I used Google and the only results I get are for video decoding. Not what I need. Mux.JS is ESM based, won't work on Electron aside from its scope looking more like it's used for videos. Same for MP4Box, I just don't know yet if they will work for audio.


I got something to play using MSE by lying and saying the MIME type would be audio/mpeg. That's not scalable, not to mention MP3 is lossy and the audio tag already plays it. I don't want to convert a FLAC (which MSE doesn't support) to an MP3 just to play it when the audio tag already plays FLAC natively. That would also degrade the quality of the audio.


I also tried writing to a specific decode file and reading it while it was being written to (no idea if that could work). I didn't get the results I was looking for. Basically the file wasn't valid when it was accessed and it never got re-queried once it finished being decoded. And again, I can't pass a callback through the IPC to run once it finishes because that doesn't work. IPC doesn't pass functions.


My Next Steps


I'm reaching out here on StackOverflow to see if there is anything I can do, or try, or think of, or use. Something tells me there is a way to get this to work.


If you need extra info I can provide it. If I asked my question wrong I apologize, I'm new here. I have done some searching for existing issues, which is how I found the libraries I listed as well as browser support for different audio formats. However, the ones I found didn't dive deeper into the issue. They issues simply ended with links to browser support specs or giving the author libraries to check out. FFmpeg.wasm seems to be the most promising one, I still have it installed and trying to use it.


-