media

wordpress show only media user has uploaded in wp_editor

大城市里の小女人 提交于 2019-11-29 09:41:41
问题 I'm creating a wordpress site where the registered user has the ability to create his own post via wp_editor() on the frontend, but just one post. Now I want to restrict the user to be able to only see his uploaded media. I use the following script in the functions.php, which works in the backend. So if a user goes to the media section in the backend he will only see his uploaded media. But if the user goes to "insert media" pop-up on the frontend wp_editor he can still see the uploaded media

How to get songs from album/Artist in android,using MediametadataRetriever?

对着背影说爱祢 提交于 2019-11-29 09:33:15
问题 First of all i am a newbie and secondly i know there exists a solution for "How to get songs from album in android?" but that is by using cursor and MediaStore and i have used MediametadataRetriever and its totally different i haven't used hashmaps and all.....so its getting a bit difficult....please any solutions for this???without using hashmaps and mediastore??? here is the code i have used to display all songs and its artists .......... import java.io.File; import java.io.FileFilter;

Android - MediaStore.Video.query() is returning null

只谈情不闲聊 提交于 2019-11-29 07:14:52
I'm trying to retrieve the metadata from a video file (title, language, artist) using the method MediaStore.Video.query(). However, the method is always returning null. The code is bellow: String[] columns = { MediaStore.Video.VideoColumns._ID, MediaStore.Video.VideoColumns.TITLE, MediaStore.Video.VideoColumns.ARTIST }; Cursor cursor = MediaStore.Video.query(getApplicationContext().getContentResolver(), videoUri,columns); if (cursor != null) { cursor.moveToNext(); } String title = cursor.getString(cursor.getColumnIndex(MediaStore.Video.VideoColumns.TITLE)); Any suggestion about how to return

How do I make JavaFX MediaView stretch media to fill parent container?

喜欢而已 提交于 2019-11-29 06:46:11
I'm trying to make my video's dimensions stretch automatically and fill the MediaView and maintain the original aspect ratio of the video. Basically, I want my MediaPlayer to fit the parent container on resize etc. like pretty much all video players do. If anyone could shed some light on how to achieve this that would be much appreciated, thanks. Here's an example of stretching to the containing Scene and the scene is set by the Dimension "size": final MediaPlayer videoPlayer = new MediaPlayer( new Media(new File(videoPath).toURI().toString())); MediaView mv = new MediaView(videoPlayer);

Reverse video playback in iOS

心已入冬 提交于 2019-11-29 03:51:30
I want to play video backward in AVPlayer. I have tried with changing rates property to -1.0, and although it did work it was not smooth. Is there any way through which I can smoothly play videos backward? As stated in the comments, the problem is with keyframes and the fact that most codecs are not designed to play backwards. There are 2 options for re-encoding the video that doesn't require you to actually reverse the video in editing. Make every frame a keyframe. I've seen this work well for codecs like H.264 that rely on keyframes. Basically if every frame is a key frame, then each frame

How to record video on Android into Stream

倖福魔咒の 提交于 2019-11-28 23:04:44
问题 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. 回答1: 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

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

拟墨画扇 提交于 2019-11-28 21:26:49
问题 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! 回答1: To play the songs from

How to split video or audio by silent parts

蓝咒 提交于 2019-11-28 21:15:38
问题 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. 回答1: 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

How to create equalizer for android

荒凉一梦 提交于 2019-11-28 20:36:20
I want to create simple equalizer for android. How can I do it? Try to find some methods in MediaPlayer class. But all my attempts failed. Simple answer... you can't do it with the framework or with Java (because there is no JMF support in Android). You have to use the NDK and JNI to compile a native library with equalizer support. If you know C/C++ there are plenty of libraries around that will provide this functionality but if you don't know C/C++ or have the means to pay someone that does I would recommend you move on to something else within your means... There are even some working

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

随声附和 提交于 2019-11-28 19:21:01
问题 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