media-player

What type of .avi video jmf plays?

主宰稳场 提交于 2019-12-08 12:42:23
After struggling through exceptions in using jmf, on How do I remove nullpointerexception . I am able to now play my video, but only the .mov file here at this website . But I am creating my video file using ffmpeg using images and .wav audio files. I can create it in any format, .avi , .mov , .mp4 , but what is important is I should be able to play it in my player, which I built using JMF. Currently, I am getting this error, Unable to handle format: FMP4, 1366x768, FrameRate=30.0, Length=3147264 0 extra bytes java.lang.NullPointerException at java.awt.Container.addImpl(Unknown Source) at java

How to pull the artist value from MPMediaItemCollection

喜欢而已 提交于 2019-12-08 12:38:57
问题 Why does the following result in a tableview full of "Artist" instead of a tableview full of actual artist names? Where did I go wrong? How do I pull the artist value from a collection? All help is appreciated... var tableData = MPMediaQuery.artistsQuery() override func viewDidLoad() { super.viewDidLoad() self.artistTableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") tableData.groupingType = MPMediaGrouping.Artist } func numberOfSectionsInTableView(tableView:

Get media player to play first on right speaker and then on left speaker

时光毁灭记忆、已成空白 提交于 2019-12-08 12:15:56
问题 I would like to play an audio file that starts on the left speaker and then switches to the right speaker. I have tried doing something like this: MediaPlayer mp = new MediaPlayer(); // Setup audio file mp.start(); mp.setVolume(1.0F, 0F); // Delay a second or two (I actually use a Handler and the postDelayed method) mp.setVolume(0F, 1.0F); but the sound comes through on both speakers the whole time. How can I play audio in Android with either the left or right speaker muted (or at reduced

Play/Forward video in 2x 3x 4x speed in mobilevlckit didn't work

醉酒当歌 提交于 2019-12-08 11:36:54
问题 In my project, I code trickplay like the following, but the code didn't work.How to solve this problem. If you guys have any ideas, help me . func didTrickPlayValueChanged(_ atRate: Float!){ if( atRate == 1.0){ vlcMediaPlayer.fastForward(atRate: 1.00) } else if(atRate == 2.0){ vlcMediaPlayer.fastForward(atRate: 2.00) } else if(atRate == -2.0){ vlcMediaPlayer.fastForward(atRate: -2.00) } else if(atRate == -1.0){ vlcMediaPlayer.fastForward(atRate: -1.00) }else{ vlcMediaPlayer.fastForward(atRate

Android default media player “start” after “stop” error (com.android.music.musicservicecommand)

依然范特西╮ 提交于 2019-12-08 10:46:45
问题 When I send to the default player Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "play"); ACTIVITY.sendBroadcast(i); it starts to play. When I send Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "stop"); ACTIVITY.sendBroadcast(i); It stops. But when I try to play again then it doesn't play. It just plays for a second and then stops again. I saw on the log I get two intents. The intent.getBooleanExtra("playing",

Playing sound in firemonkey

依然范特西╮ 提交于 2019-12-08 10:40:11
问题 I use Firemonkey to deploy an android apps, with audio files on that. I have about 30 animal button, and each of button will heard animals sound when user select it. Here is my code for the first button: procedure TFMain.buttonLionClick(Sender: TObject); begin MediaPlayer1.FileName := 'D:\lion.mp3'; MediaPlayer1.Play; end; But it is failed. How can I deploying that sounds in to my apps? 回答1: First of all, if you want to build your app for android you need to convert the .mp3 to .3gp to be

How to play an mp3 file between a range of milliseconds using android MediaPlayer?

岁酱吖の 提交于 2019-12-08 10:15:31
问题 I am able to play an mp3 file using android's MediaPlayer object. But I would like to play between a range of milliseconds for example between 30000 ms to 40000 ms ( 10 seconds only ). How can I achieve this? Currently the following code is what I have, private MediaPlayer mPlayer; public void play() { try { mPlayer = MediaPlayer.create(getApplicationContext(), R.raw.mp3_file); if (mPlayer != null) { int currentPosition = mPlayer.getCurrentPosition(); if (currentPosition + 30000 <= mPlayer

support srt/vtt subtitle and syncing in video player flutter

浪子不回头ぞ 提交于 2019-12-08 09:50:46
问题 I want to play srt subtitles in my app. I have integrated srt_parser so far. Also, I am able to get the current position of the player by this code inMilliseconds = _videoPlayerController.value.position.inMilliseconds; Here is srt parse code. String data = '''1 00:00:01,600 --> 00:00:04,200 English (US) 2 00:00:05,900 --> 00:00:07,999 This is a subtitle in American English 3 00:00:10,000 --> 00:00:14,000 Adding subtitles is very easy to do'''; srtParser() { List<Subtitle> subtitles = parseSrt

How do I remove nullpointerexception

风流意气都作罢 提交于 2019-12-08 07:53:17
问题 I am trying to play a video using jmf. After working hard for hours literally removing all errors and exceptions, Here I am getting a null pointer exception. Here I figured out after looking on NullPointerException, this should be due to incorrect declaration of Player mediaPlayer where it is not initialised to anything. Another problem with directly initialising it to what values I am giving it later is, I have to catch the exceptions too, then it says player might not be declared. How do I

What type of .avi video jmf plays?

此生再无相见时 提交于 2019-12-08 07:51:07
问题 After struggling through exceptions in using jmf, on How do I remove nullpointerexception. I am able to now play my video, but only the .mov file here at this website. But I am creating my video file using ffmpeg using images and .wav audio files. I can create it in any format, .avi , .mov , .mp4 , but what is important is I should be able to play it in my player, which I built using JMF. Currently, I am getting this error, Unable to handle format: FMP4, 1366x768, FrameRate=30.0, Length