media

How to execute command line ffmpeg commands programatically in android?

人盡茶涼 提交于 2019-12-10 09:26:22
问题 I have successfully built ffmpeg for android using the bambuser . Now I have to build a sample converter application like mp4 to 3gp. I know there are command line commands ffmpeg -i video_origine.avi video_finale.mpg . But I don't know how to execute these commands programatically. I have sample code like jint Java_com_example_ndklearning1_MainActivity_logFileInfo(JNIEnv * env, jobject this, jstring filename) { av_register_all(); AVFormatContext *pFormatCtx; const jbyte *str; str = (*env)-

Media Foundation MFTransform to convert MFSample from 'MJPG' to 'YUY2' or 'RGB24'

走远了吗. 提交于 2019-12-10 00:12:25
问题 Do anyone know what MFTransform should I use to convert a 'MJPG' MFSample to 'YUY2' or 'RGB24'? Any tip will be very appreciated. Thanks 回答1: Since the number of visits to this post was noticeable I'm going to answer my own question. The trick is to enum all the transformations between MJPG and YUY2 since it seems there isn't direct transformation between MJPG and RGB32. To transform the image between YUY2 and RBG32 use the color converter DSP: http://msdn.microsoft.com/en-us/library/windows

Creating Playlist via code

橙三吉。 提交于 2019-12-10 00:05:24
问题 For my latest project i want the user to be able to make playlist and save them to the phone. I want to make so when they make them in the application they will also show up when they look in the built in music app. Whats the best way of doing this? I know i will probably have to use MediaStore but other than that I'm a tad lost. Any information would help, just need a nudge in the right direction - Thanks 回答1: You can use the content URI found in Media.AudioStore.Playlist class to access the

Choose an image from camera or gallery

大憨熊 提交于 2019-12-10 00:05:21
问题 How can I offer the user the option of choosing an image from the camera or gallery and retrieve the Resource id associated? 回答1: Try this as an intent Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(i, ACTIVITY_SELECT_IMAGE); Here is how you retreive the returned image. protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) { super.onActivityResult(requestCode, resultCode,

Phonegap Media API - Record and Play Audio - Android

早过忘川 提交于 2019-12-09 11:05:20
问题 I'm hoping to record some audio and then have the ability to play it back. Its important for me to be able to customize the record interface. In the below example after recording I get a duration of -1 and no audio is played. Step 1. Added Media Plugin cordova plugin add org.apache.cordova.media Step 2. My Code Note src is "amr" as requested from docs. Android devices record audio in Adaptive Multi-Rate format. The specified file should end with a .amr extension. However, "myrecording.amr"

Iphone - How to enable application access to media on the device? - ALAssetsLibraryErrorDomain Code=-3312 “Global denied access”

前提是你 提交于 2019-12-09 10:03:52
问题 OK, so I have had this problem before and solved it unknowingly and now it is reoccurring! "error: Error Domain=ALAssetsLibraryErrorDomain Code=-3312 "Global denied access" UserInfo=0x169aa0 {NSLocalizedFailureReason=The user has denied all applications access to their media., NSLocalizedRecoverySuggestion=This setting can be changed in Preferences., NSLocalizedDescription=Global denied access}" Please NOTE://I do not get this issue in the simulator - my code for iterating assets works

Dropdown contents not overlapping video player

寵の児 提交于 2019-12-09 04:50:30
I have an object tag for playing videos on my page: <object id="Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" data="mms://TAL-BBSR-01/01_Debugging.wmv" width="100%" type="video/x-ms-asf" height="400" wmode="opaque" url="mms://TAL-BBSR-01/01_Debugging.wmv"> <param name="url" value="mms://TAL-BBSR-01/01_Debugging.wmv"> <param name="filename" value="Video"> <param name="autostart" value="1"> <param name="uiMode" value="full"> <param name="autosize" value="1"> <param name="playcount" value="1"> <param name="wmode" value="opaque"> <embed height="100%" type="application/x-mplayer2"

Android MediaMetadataRetriever returns null values from most keys

北城余情 提交于 2019-12-09 02:28:11
问题 I want to get information out of my media files (mp3 mostly) and I get only null from those values I want. I have tried all keys for extractMetadata(key) . Am I skipping/missing something? Code basis: MediaMetadataRetriever f = new MediaMetadataRetriever(); f.setDataSource(item.getFilePath()); String title = f.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE); I do get correct values with the duration key (MediaMetadataRetriever.METADATA_KEY_DURATION) and mimetype key

Orientation media query not working on iPad mini

心已入冬 提交于 2019-12-09 01:38:11
问题 This small HTML code represents my HTML5 page very clearly. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Pebble Go</title> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" /> </head> <body> <style> @media only screen and (orientation: portrait) { html, body { background: #222; } } @media only screen and (orientation: landscape) { html, body

View print CSS in IE7 or IE8

删除回忆录丶 提交于 2019-12-08 18:01:56
问题 I'm debugging a site that has problems with element positioning when printing (I have a separate print.css file linked by a link element with the media="print" attribute). This problem only occurs in IE7 and IE8. What I'm looking for is a way to view the page using the print media type, but while still having IE8's developer tools available to view element details and edit in real-time, etc. The function I'm looking for would be similar to the "Display CSS by Media Type" feature in Chris