playback

is there a clean way to play an mp3 sound in the compact framework 3.5

て烟熏妆下的殇ゞ 提交于 2019-11-29 05:07:24
I use the p/invoke method to play wav sounds. There are ways of calling windows media player to play an mp3 sound, but its slow & cumbersome. Is there an easy way to play a short mp3 file? This is primarily for application prompting and audible cues when you are not looking at the screen and not music. Thanks! CF Framework 3.5 now includes support for playing .WAV files: Namespace System.Media.SoundPlayer Short WAV files for cues and sound-effects might even play faster than MP3s since they're "ready-to-play"... If you are looking for a way to play mp3s: public class Sound { [DllImport(

Youtube iFrame API setPlaybackQuality ignored on mobile device

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 01:29:11
I'm trying to setup YouTube iframe API to play a FullHD video with a lower quality. My goal is to save bandwidth on mobile devices and reduce loading time. My HTML structure is the classical player div, plus a debug div for messages. HTML <div id="debug"></div> <div id="your_video_id"> <div id="player"></div> </div> I've tried to invoke setPlaybackQuality as soon as the player is ready, to avoid mobile users wasting time in buffering (as suggested in this post ). I've also invoked it in both "BUFFERING" and "PLAYING" states. When quality changes, debug content is updated with actual playback

How to play video from NSData

为君一笑 提交于 2019-11-28 23:38:12
HI everyone, I would like to know if it's possible to play a video from an NSData object... with the MPMoviePlayerController. Thanks in advance, Sergio Ben's answer works perfectly on simulator but wont work on the device, You cannot write anywhere on the device. Check code below NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"myMove.mp4"]; [videoData writeToFile:path atomically:YES]; NSURL *moveUrl = [NSURL

Video playback in Java ( JMF, Fobs4JMF, Xuggler, FMJ )

廉价感情. 提交于 2019-11-28 20:13:53
问题 I need simple video playback in Java. Here are my requirements: PRODUCTION QUALITY Open and decode video files whose video and audio codecs can be chosen by me. I.E I can pick well behaving codecs. Be able to play , pause , seekToFrame OR seekToTime and stop playback. Essentially I wish to be able to play segments of a single video file in a non linear fashion. For example I may want to play the segment 20.3sec to 25.6sec, pause for 10 seconds and then play the segment 340.3sec to 350.5sec,

Play simple beep with python without external library

旧巷老猫 提交于 2019-11-28 18:47:15
Using only the modules that come with a standard python 2.6 installation, would it be possible to play a simple beeping noise? If you're on a Unix terminal, you can print "\a" to get a terminal bell: >>> def beep(): ... print "\a" >>> beep() Of course, that will print a newline too… So sys.stdout.write("\a") might be better. But you get the idea. On windows: import winsound # for sound import time # for sleep winsound.Beep(440, 250) # frequency, duration time.sleep(0.25) # in seconds (0.25 is 250ms) winsound.Beep(600, 250) time.sleep(0.25) 34.4. winsound — Sound-playing interface for Windows:

Android video streaming example [closed]

耗尽温柔 提交于 2019-11-28 15:12:53
I want to implement video streaming in my project. So, is there any tutorial that works? Videos are stored at server side. So, to fetch video using URL and play it on Android. I tried some examples, but I got error, "Sorry, this video can not be played". I am trying to use MP4. Amir Dashti I had the same problem but finally I found the way. Here is the walk through: 1- Install VLC on your computer (SERVER) and go to Media->Streaming (Ctrl+S) 2- Select a file to stream or if you want to stream your webcam or... click on "Capture Device" tab and do the configuration and finally click on "Stream"

Sound in batch?

我的梦境 提交于 2019-11-28 12:22:16
I am making a game in batch, and I want to play music while the player is 'battling'. I managed to play the music, but I can't seem to stop the music once the player is done with the battle. @echo off set "file=BattleMusic.mp3" ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^) echo Sound.URL = "%file%" echo Sound.Controls.play echo do while Sound.currentmedia.duration = 0 echo wscript.sleep 100 echo loop echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs start /min sound.vbs' That's my music script. Any ideas on how to stop it once the player is done? You must kill the

How to change the speed of video playback

对着背影说爱祢 提交于 2019-11-28 11:45:19
I'm wondering if it's possible to change the video playback speed in an iphone application. we want users to yell in the microphone to speed up the playback and get to the end. You have to use setCurrentPlaybackRate: Jean Fabre There is a rate property for the AVPlayer . If you take the example from Apple called "avPlayerDemo" in the resource section, you then simply have to set the mplayer.rate . It worked for me, I created a new slider in the xib files, implemented that slider in the AVPlayerDemoPlaybackViewController and simply set mPlayer.rate to the slider value. HiDuEi What about the

Android not playing Video .mp4

血红的双手。 提交于 2019-11-28 11:37:10
hi guys i have prepared a code to just play a simple mp4 file from my res folder... The coding is something like this... public class VideoPlayer extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.video); VideoView video = (VideoView)findViewById(R.id.VideoView); Uri uri = Uri.parse("android.resource://company.software.myapp/" + R.raw.myvideo); MediaController mc = new MediaController(this); video.setMediaController(mc); video.setVideoURI(uri); //video.requestFocus(); video.start(); } } now though there

javascript pitch shift with time stretch

*爱你&永不变心* 提交于 2019-11-28 11:24:45
I'm a beginner learning javascript. I've got various projects in mind with an interactive page on my site related to microtonal frequencies and planetary frequencies. I need to be able to play my audio sample .wav file in a loop but have the audio sample timestretched with a corresponding change in pitch. I tried myAudio.playbackRate = 0.5; which plays the audio 0.5 slower but keeps pitch same. I researched and found something. But how do i set preservesPitch to false or true? And this only works in 'Google Chrome' I think, so other program i found is here : https://github.com/janesconference