media

Audio spectrum analysis using FFT algorithm in Java

无人久伴 提交于 2019-11-27 12:15:30
I want to analyze the spectrum of an audio file in Java (ME). I want to draw spectrum as some media players do. But I don't understand some points: Input for FFT algorithm, which I have to get from the audio file. I don't now what it is called, what it is and more important, I don't know how to get it. Output: if input is an array (range?) I obtain other array, and it have range: 0-1, right (or not)? So what I have to do with it? You need a few additional steps in addition to the FFT. This has been covered many times already in previous similar questions here on SO, and you can find additional

show/hide div based on browser size using ONLY css?

≡放荡痞女 提交于 2019-11-27 11:16:43
问题 I am a trying to get some divs to show/hide based on browser size, using only css media queries... but nothing seems to be working... please help if you can and let me know what i'm doing wrong... thanks in advance! heres my css.. @media all and (max-width: 959px) { .content .700{display:block;} .content .490{display:none;} .content .290{display:none;} } @media all and (max-width: 720px) { .content .700{display:none;} .content .490{display:block;} .content .290{display:none;} } @media all and

List all music in MediaStore with the PATHs

↘锁芯ラ 提交于 2019-11-27 11:14:35
Ok so I've been working on this project for a few days now and most of my time has been working out how to list all the music on a device in a LIST VIEW or something else, I have searched for a few days now and this is killing me. I did get so close at one point with all the music in one folder showing, though since most people will have sub folders for things like artiest and albums I need a way to search sub folders for MP3s or music files. Here is what I have so far for Music collection: package com.androidhive.musicplayer; import java.io.File; import java.io.FilenameFilter; import java

How to query Android MediaStore Content Provider, avoiding orphaned images?

血红的双手。 提交于 2019-11-27 10:32:06
I'm trying to provide an in-app Activity which displays thumbnails of photos in the device's media store, and allow the user to select one. After the user makes a selection, the application reads the original full-size image and does things with it. I'm using the following code to create a Cursor over all the images on the external storage: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView( R.layout.image_select ); mGridView = (GridView) findViewById( R.id.image_select_grid ); // Query for all images on external storage String[] projection = {

android.os.FileUriExposedException: file.jpg exposed beyond app through ClipData.Item.getUri()

自古美人都是妖i 提交于 2019-11-27 10:18:18
问题 I try to do a button that open the camera and take picture. my code is here //for imports check on bottom of this code block public class HomeProfileActivity extends AppCompatActivity { //Button camera public static final String TAG = HomeProfileActivity.class.getSimpleName(); public static final int REQUEST_TAKE_PHOTO = 0; public static final int REQUEST_TAKE_VIDEO = 1; public static final int REQUEST_PICK_PHOTO = 2; public static final int REQUEST_PICK_VIDEO = 3; public static final int

Capturing Video with AVFoundation

萝らか妹 提交于 2019-11-27 09:52:46
问题 I've been looking around on Stack and I have found similar questions to this, but none have worked for me. I am a complete novice to Swift 3.0. Essentially what I'm trying to do is record a video using AVFoundation. So far I have managed to capture a still image, and this is the code I have so far func beginSession() { do { let deviceInput = try AVCaptureDeviceInput(device: captureDevice) as AVCaptureDeviceInput if captureSession.inputs.isEmpty { self.captureSession.addInput(deviceInput) }

What is the best way to stream a audio file to website users/listeners [closed]

最后都变了- 提交于 2019-11-27 09:38:42
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 11 months ago . I'm developing a music site which will stream audio files stored in a server to users, audio files will be played through flash player placed in a webpage.. As I heard I need to use a streaming media server for streaming audio files ( like 2mb to 3mb in size).. Do I need to use

Retrieving and Saving media metadata using FFmpeg

 ̄綄美尐妖づ 提交于 2019-11-27 09:23:31
问题 I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg. Also is the same thing possible with MediaInfo?? I know I can get the metadata for individual tracks using MediaInfo, but I would want to automate it; as in whenever a new media file is found, read its metadata and then store it in a txt/xml file. Or, is there any other tool/utility/API that I can use for this? 回答1: You

Given an Android music playlist name, how can one find the songs in the playlist?

纵然是瞬间 提交于 2019-11-27 08:58:13
The playlist names can be found by a query on MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI and then look at the MediaStore.Audio.PlaylistsColumns.NAME column. There is a data column too, MediaStore.Audio.PlaylistsColumns._DATA, but it is returning null. The list of songs ( MediaStore.Audio.Media.EXTERNAL_CONTENT_URI/id ) do not seem to show any playlist affiliation. Here is a bit from my program: The gist is that you need the id for the playlist to grab the songs. Basically you can take my code and change the where statement to .NAME +" = '"+name+"'", private Cursor getPlaylists(String

Unable to show PDF in p:media generated from streamed content in Primefaces

馋奶兔 提交于 2019-11-27 08:08:41
I'm trying to show inline PDF which is opened in new browser window. I have following scenario: In some ActionListen which is called by ajax I generate PDF content, put data in session, and send Javascript to be executed ( window.open to open new page to show PDF) On opened page I just have p:media tag inside h:body with value pointing to StreamedContent : Now, on that page my PDF is not generated. In log I can see these two lines: org.primefaces.application.PrimeResourceHandler handleResourceRequest SEVERE: Error in streaming dynamic resource. Expression cannot be null I started to debug and