More than one Audio object in a Jupyter (IPython) Notebook cell

The IPython.display.Audio(…) command only creates a “display” object (in that particular case, an object of the subclass Audio of the class DisplayObject). Afterwards, you may do basic actions with such an object, tied to the class DisplayObject (and specific stuff tied to the class Audio). One of those actions consists of displaying it, by using … Read more

What algorithms could I use for audio volume level? [closed]

human perception in general is logarithmic, also when it comes to things as luminosity, etc. … this enables us to register small changes to small “input signals” of our environement, or to put it another way: to always percieve a change of a perceivable physical quantity in relation to its value … thus, you should … Read more

Find if video file has audio present in it [duplicate]

I would use FFprobe (it comes along with FFMPEG): ffprobe -i INPUT -show_streams -select_streams a -loglevel error In case there’s no audio it ouputs nothing. If there is an audio stream then you get something like: [STREAM] index=0 codec_name=mp3 codec_long_name=MP3 (MPEG audio layer 3) profile=unknown codec_type=audio codec_time_base=1/44100 etc etc… [/STREAM] That should be easy enough … Read more

Python convert wav to mp3

I wrote a python library, pydub, that essentially does what Corey’s Answer suggests, though it uses ffmpeg in to do the conversions in order to support more formats. from pydub import AudioSegment AudioSegment.from_wav(“/input/file.wav”).export(“/output/file.mp3″, format=”mp3”)

Mute specified sections of an audio file using ffmpeg

The following command will mute two sections: between 5-10s and 15-20s: ffmpeg -i video.mp4 -af “volume=enable=”between(t,5,10)”:volume=0, volume=enable=”between(t,15,20)”:volume=0″ … Description: -af is the audio filter. It works by specifying multiple volume filters that are enabled/disabled at the specified time. volume=enable=”between(t,5,10)”:volume=0 means use a volume filter that gets enabled between 5 and 10 seconds and sets the … Read more

HTML audio tag volume

Theres no volume attribute supported by browsers so you must set the volume property in JavaScript <audio autoplay id=”myaudio”> <source src=”http://lel.com/link/to/stream.m3u”> </audio> <script> var audio = document.getElementById(“myaudio”); audio.volume = 0.2; </script> See http://jsfiddle.net/sjmcpherso/6r1emoxq/

Disable noise cancellation for microphone in Android (1.5)?

Noise filters in audio recording sources on Android vary greatly from device to device. It isn’t until Ice Cream Sandwich that any sort of definition was put into the device compatibility document defining a method for not having filtering. That method id to use the MediaRecorder.AudioSource.VOICE_RECOGNITION audio source. Before that it’s just choose a setting … Read more

Python: what are the nearest Linux and OS X [edit: macOS] equivalents of winsound.Beep?

winsound is only for windows and I could not find any cross platform way to do this, other than print “/a”. However, you cannot set the frequency and duration with this. However, you can try the os.system command to do the same with the system command beep. Here is a snippet, which defines the function … Read more

Merge video and audio with ffmpeg. Loop the video while audio is not over

If you want to merge new Audio with video repeat video until the audio finishes, you can try this: ffmpeg -stream_loop -1 -i input.mp4 -i input.mp3 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 Using -stream_loop -1 means infinite loop input.mp4, -shortest means finish encoding when the shortest input stream ends. Here the shortest input stream … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)