media

How to record an FM audio in android?

流过昼夜 提交于 2019-11-30 10:06:45
i need to record the songs being played by a FM app. I checked the MediaRecorder.AudioSource but could not find what to use for setAudioSource can anyone please help me? thanks, Ramachandran.R There is no FM radio support in the Android SDK. Various device manufacturers may have hacked in their own FM radio support, but you would have to contact those manufacturers to learn what APIs, if any, they have for them. try this code int audioSource = MediaRecorder.AudioSource.VOICE_DOWNLINK; int sampleRateInHz = 8000; int channelConfig = AudioFormat.CHANNEL_CONFIGURATION_MONO; int audioFormat =

CakePHP 3 : Define global contant variable

时光怂恿深爱的人放手 提交于 2019-11-30 09:52:26
问题 I am working on CakePHP 3 project which is a little big. I want to keep my application as much clean as possible by separating all media files from core application and that's why I have to store all media files on a separate subdomain as media.myproject.com and the project is accessible from www.myproject.com . Also in media.myproject.com there could be many directories as /root |- users |- avatar |- cover |- services |- logo |- banner |- slides |- clients |- logo |- avatar |- etc |- etc |-

How to resolve iOS 11 Safari getUserMedia “Invalid constraint” issue

北城余情 提交于 2019-11-30 08:36:54
I'm attempting to run the following code in Safari in iOS 11. It should prompt the user to give access to their devices camera and then display it in my <video autoplay id="video"></video> element. However, when running in iOS 11, it results in an OverconstrainedError to be thrown: {message: "Invalid constraint", constraint: ""} The code runs fine in Android and successfully opens the camera. I've attempted multiple valid configurations with no luck. I know iOS 11 just came out so it may be a bug, but any thoughts? Has anyone else run into this? Code: var video = document.getElementById('video

How to record video on Android into Stream

我与影子孤独终老i 提交于 2019-11-30 02:10:17
Android MediaRecorder allows to save video to file (file or socket): setOutputFile(FileDescriptor fd); setOutputFile(String path) How to save videodata to OutputStream? It will be used for streaming video recording. You can do it using ParcelFileDescriptor.fromSocket() : String hostname = "example.com"; int port = 1234; Socket socket = new Socket(InetAddress.getByName(hostname), port); ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket); MediaRecorder recorder = new MediaRecorder(); recorder.setOutputFile(pfd.getFileDescriptor()); recorder.prepare(); recorder.start(); If you

How do you Require Login for Media Files in Django

邮差的信 提交于 2019-11-30 01:33:17
I'm serving "sensitive" information in downloadable PDF's and Spreadsheets within a user registration section of a site. Is there a way to allow the django authentication to secure this media without serving it (and not have to manually login using basic auth)? I'm guessing theres (fingers crossed) not a way to do it with the psuedo code below, but it helps better illustrate the end goal. #urls.py (r'^protected_media/(?P<filename>.*)$', 'protected_media') #views.py from django.contrib.auth.decorators import login_required @login_required def protected_media(request, filename): # @login

How can I access playlist created by android default music app and call the music app to play it?

爷,独闯天下 提交于 2019-11-30 00:30:14
I am writing an android app, and I want to access the playlist created by android default music app. In my app, the user should be able to browse the playlist and select any playlist to play. So basically I want to know how to access it and when user selects any playlist, how to pass it to default music app to play it in background. Is it something to do with ContentProvider or mediastore?? I really don't know how to access data on other apps. Thank you so much! To play the songs from above playlists, I m calling the function PlaySongsFromAPlaylist( PlayListID ); // 0 < PlayListID < count from

How to split video or audio by silent parts

落爺英雄遲暮 提交于 2019-11-30 00:18:41
I need to automatically split video of a speech by words, so every word is a separate video file. Do you know any ways to do this? My plan was to detect silent parts and use them as words separators. But i didn't find any tool to do this and looks like ffmpeg is not the right tool for that. Gyan You could first use ffmpeg to detect intervals of silence, like this ffmpeg -i "input.mov" -af silencedetect=noise=-30dB:d=0.5 -f null - 2> vol.txt This will produce console output with readings that look like this: [silencedetect @ 00000000004b02c0] silence_start: -0.0306667 [silencedetect @

ffmpeg images-to-video script anyone? [duplicate]

情到浓时终转凉″ 提交于 2019-11-29 22:40:05
This question already has an answer here: How to create a video from images with FFmpeg? 4 answers I'm wanting to take a bunch of images and make a video slideshow out of them. There'll be an app for that, right? Yup, quite a few it seems. The problem is I want the slides synced to a piece of music, and all the apps I've seen only allow you to show each slide for a multiple of a whole second. I want them to show for multiples of 1.714285714 seconds to fit with 140 bpm. The tools I've seen generally seem to have ffmpeg under the hood, so presumably this kind of thing could be done with a script

Binding to Media keys on Apple keyboards under OSX 10.5 [closed]

喜你入骨 提交于 2019-11-29 22:30:42
问题 I am fairly new to OSX development, so this may be easy but google has not been helpful. I am trying to bind an action to the media keys you find on newer Apple keyboards (Play, Pause , etc). It appears that you cannot bind to these keys using the regular hotkey API but it must be possible since iTunes clearly manages. Is there some tricky undocumented API that achieves this? Any help would be much appreciated. 回答1: After more extensive googling, this http://www.rogueamoeba.com/utm/2007/09/29

How to shut off the sound MediaRecorder plays when the state changes

白昼怎懂夜的黑 提交于 2019-11-29 21:58:13
My Android application uses MediaRecorder on a SurfaceHolder to show a live preview of what the camera is capturing. Every time the user presses the REC button on the app, the app starts to record. Every time the state of the MediaRecorder switches to/from 'start', Android automatically (?) fires off a beep. This beep sounds different from phone to phone, which makes me think that this beep is natively attached to the state change of MediaRecorder. The beep is not played if the volume of the phone is set to silent. I google it and did some research but I couldn't find a way to turn this beep