I have some videos coming from an API's response. I need a button to start recording the audio from the selected video for 30 seconds and get the file version of that audio to use it further.
I am already using this.audio.startRecord(); from Media Plugin but that records outside audio from phone's mic. It also stops the video that is playing on its own.
Related
I have an HLS live stream (from an external source, not one I created or can edit) with video and several audio options. I can successfully change the audio to one of the alternatives, but the alternative audio the stream provides doesn't match up perfectly with with video (it's about 1.5 seconds ahead of the video).
Is there a way to have the AVPlayer delay the audio portion of the stream by some specified amount to correct for this? Or is that not possible?
I want to play the video simultaneously while it is downloading via unitywebrequest. Will AVPro video support this? If so please provide me some guidance, as i am new to unity and avpro video. I can able to play the video which is downloaded fully through FullscreenVideo.prefab in AVPro demo. Any help will be much appreciated.
There are two main options you could use for displaying the video while it is still downloading.
Through livestream
You can stream a video to AVPro video using the "absolute path or URL" option on the media player component, then linking this to a stream in rtsp, MPEG-DASH, HLS, or HTTP progressive streaming format. Depending on what platforms you will be targeting some of these options will work better than others
A table of which file format supports what platform can be found in the AVProVideo Usermanual that is included with AVProVideo from page 12 and onwards.
If you want to use streaming you also need to set the "internet access" option to "required" in the player settings, as a video cannot stream without internet access.
A video that is being streamed will automatically start/resume playing when enough video is buffered.
This does however require a constant internet connection which may not be ideal if you're targeting mobile devices, or unnecessary if you're planning to play videos in a loop.
HLS m3u8
HTTP Live Streaming (HLS) works by cutting the overall stream into shorter, manageable hunks of data. These chunks will then get downloaded in sequence regardless of how long the stream is. m3u8 is a file format that works with playlists that keeps information on the location of multiple media files instead of an entire video, this can then be fed into a HLS player that will play the small media files in sequence as dictated in the m3u8 file.
using this method is usefull if you're planning to play smaller videos on repeat as the user will only have to download each chunk of the video once, which you can then store for later use.
You can also make these chunks of video as long or short as you want, and set a buffer of how many chunks you want to have pre-loaded. if for example you set the chunk size to 5 seconds, with a buffer of 5 videos the only loading time you'll have is when loading the first 25 seconds of the video. once these first 5 chunks are loaded it will start playing the video and load the rest of the chunks in the background, without interrupting the video (given your internet speed can handle it)
a con to this would be that you have to convert all your videos to m3u8 yourself. a tool such as FFMPEG can help with this though.
references
HLS
m3u8
AVPro documentation
I am using Ionic 3 to build a hybrid app.
I have both video and audio file saved in phone local storage.
The video is played in html5 video element.
The audio can be played either in html5 audio element or Ionic Native Media plugin.
I want to:
mute the video (works)
play video and audio at the same time (not working).
It seems that the system does not allow two media resources to run at the same time.
Any suggestions?
Thanks,
D
I am developing an app module in which i am doing audio recording with also video recording.
but i want to record only device intrnal playing sound , not the device external voice.
If any advise or suggestion to got it..!!
I'm not sure but maybe you can use buffers to write them into a file Audio units or Audio Queues without using mic
I have just created and iPhone web app, which has some x264 (mp4) video files on it. When I link directly to the file on the iPhone and the user taps the link, the video player is loaded and the video starts playing.
Using the app on an Android phone causes the browser to download the video instead of just playing it. Is there a way to force a video player to just boot up and play the video not download it?
Thanks in advance.
You should know that Android is quite strict regarding the video streams that you can stream. To be able to watch a stream a video (progressively watch and download) the video container must be correctly formatted.
There are many ways to create a container suitable for progressive streaming. You can look it up here: http://groups.google.com/group/android-beginners/browse_thread/thread/2a801ce5f71b5aaf?pli=1
I have successfully created a streamable video. Try to open it from your browser: http://students.mimuw.edu.pl/~nh209484/Video000.3gp