mp3

Retrieve and play mp3 files from mySQL using Javascript/PHP

▼魔方 西西 提交于 2019-12-25 02:57:52
问题 I am building a site that stores a few mp3 audio files in mySQL. At the moment only 5, so efficiency is not an issue at all. CUrrently, I am still trying to make a cross browser/platform solution that will not require other file formats. I have a PHP script that retrieves the mp3 binary data and sends the appropriate header to the browser. The files can then be retrieved by specifying the src of the audio element (whether it be audio or embed, or other) as follows: src="retrieve_audio.php

VLC encountered an error with this media Android

一笑奈何 提交于 2019-12-25 02:43:08
问题 I have been trying to play an mp3 audio file in the default media player. Copying the code from here I write my code like this AlertDialog.Builder dialog = new AlertDialog.Builder(this); dialog .setCancelable(true) .setMessage("File Path: " + path + "\n" + "Duration: " + duration + "\n" + "File Format: " + format + "\n" + "File Status: " + status) .setTitle("File Information") .setPositiveButton("Play", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface

C# - Play audio in program, on any computer? [closed]

99封情书 提交于 2019-12-25 02:40:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to have a checkbox that can enable/disable background music in my winforms application. I found out how to load a specific file from a directory with openfiledialog and such but that was bad, so I did this (worked on my pc): if (checkBox7.Checked == true) { System.Media.SoundPlayer player = new System

Reading a File with PHP gives 500 error

♀尐吖头ヾ 提交于 2019-12-25 02:39:11
问题 I have a script which reads a mp3 file with readfile() (I have also tried fread() with a loop). And on one particular file I am getting a 500 error. All other files seem to read just fine. When I review the error log on my server I notice I am getting a PHP memory error when ever this particular file is attempted to be read. Can anyone give me some pointers as to what might be going on? 回答1: You already pointed out the problem - PHP is running out of memory. Maximum memory usage in PHP is

Search block of text, return MP3 links using PHP

自作多情 提交于 2019-12-25 01:50:46
问题 I've just run into a little bit of trouble with some PHP on my latest project. Basically I have a block of text ( $text ) and I would like to search through that text and return all of the MP3 links. I know it has something to do with regular expressions but I just cannot get it working. Here's my current code: if(preg_match_all(".mp3", $text, $matches, PREG_SET_ORDER)) { foreach($matches as $match) { echo $match[2]; echo $text; } } 回答1: Once again, regex is extremely poor at parsing HTML.

How to change audio playback speed using Pydub?

若如初见. 提交于 2019-12-25 00:43:18
问题 I am new learner of audio editing libs - Pydub. I want to change some audio files' playback speed using Pydub(say .wav/mp3 format files), but I don't know how to make it. The only module I saw that could possibly deal with this problem is speedup module in effect.py. However, there is no explanation about how I am supposed to call it. Could anyone kindly explain how to do this task in Pydub? Many thanks! (A related question: Pydub - How to change frame rate without changing playback speed,

reduce bandwidth streaming mp3s php

会有一股神秘感。 提交于 2019-12-24 22:37:46
问题 Hey guys, quick question for any experts out there. I am allowing users to upload and post mp3s so other users can listen to/stream. I was wondering if anyone had any tips for reducing bandwidth, or any tips or methods for streaming mp3s. I currently just reference the location of the file with my flash mp3 player after the file has been uploaded. I would ask about images as well, but I am pretty sure they can be compressed using gzip or mod_deflate 回答1: You could downsample the MP3 to a

How to relate audio data to time

断了今生、忘了曾经 提交于 2019-12-24 22:24:15
问题 Lets say I would like to read 1 millisecond of sound data from an Mp3 file and present it. Something like this: var stream = NAudio.WaveStream.Mp3FileReader(filename); int intervalInMilliseconds = someInterval; int bytesPerInterval = ???; for(int i = 0; i < bytesPerInterval;i++) { Console.WriteLine(stream.GetByte()); } What do I need to do to solve for bytesPerInterval? Is this even possible to do accurately? (Note:NAudio is not a requirement here, just what I am currently using.) Or if I

mp4, 3gp, mpeg, mp3 streamed inside or outside of webview

*爱你&永不变心* 提交于 2019-12-24 21:42:22
问题 Is there any confirmed solution to running mp4, 3gp or mp3 files via webView? I finally have my code working public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.endsWith(".mp3")) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url), "audio/*"); view.getContext().startActivity(intent); return true; } else if (url.endsWith(".mp4") || url.endsWith(".3gp")) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse

Download last 30 seconds of an mp3

喜夏-厌秋 提交于 2019-12-24 16:27:23
问题 Is it possible to download only the last 30 seconds of an mp3? Or is it necessary to download the whole thing and crop it after the fact? I would be downloading via http, i.e. I have the URL of the file but that's it. 回答1: No, it is not possible... at least not without knowing some more information first. The real problem here is determining at what byte offset the last 30 seconds is. This is a product of knowing: Sample Rate Bit Depth (per sample) # of Channels CBR or VBR Bit Rate Even then,