Issue in streaming 360 videos in Unity for VR while using OzoPlayerSdk - unity3d

I am facing problem in streaming videos on Ozo player sdk.
As per the documentation given I tried keeping http url in .playlist file
and in AppStateManager kept link for youtube in place for Server Url field.
The player on runtime indicates to download a video instead of streaming it and does nothing from the point.
Also it indicates of creating a .json file for Url provided in server url field.
Error i get is:
Starting download: https://www.youtube.com/videos.jsonUnityEngine.Debug:Log(Object)OZO.DownloadCache:DownloadFile(Uri, Boolean) (at Assets/Scripts/Data/DownloadCache.cs:93)OZO.VideoDownloadManager:GetVideosAsync(Uri, Action`1) (at Assets/Scripts/Data/VideoDownloadManager.cs:387)OZO.AppStateManager:Start() (at Assets/Scripts/App/AppStateManager.cs:127)
Failed to download: https://www.youtube.com/videos.jsonUnityEngine.Debug:LogWarning(Object)OZO.c__AnonStoreyA:<>m__D(String) (at Assets/Scripts/Data/DownloadCache.cs:189)OZO.Download:ReportComplete(String) (at Assets/Scripts/Data/Download.cs:183)OZO.Download:Cancel() (at Assets/Scripts/Data/Download.cs:243)OZO.Download:handleDownloadResponse(UnityWebRequest, Download) (at Assets/Scripts/Data/Download.cs:330)OZO.c__Iterator0:MoveNext() (at Assets/Scripts/Data/Download.cs:315)UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Failed loading video entriesUnityEngine.Debug:Log(Object)OZO.AppStateManager:onVideoListDownloaded(Dictionary`2) (at Assets/Scripts/App/AppStateManager.cs:134)OZO.c__AnonStoreyC:<>m__10(String) (at Assets/Scripts/Data/VideoDownloadManager.cs:363)OZO.Download:ReportComplete(String) (at Assets/Scripts/Data/Download.cs:183)OZO.Download:Cancel() (at Assets/Scripts/Data/Download.cs:243)OZO.Download:handleDownloadResponse(UnityWebRequest, Download) (at Assets/Scripts/Data/Download.cs:330)OZO.c__Iterator0:MoveNext() (at Assets/Scripts/Data/Download.cs:315)UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Please help on the same. Step by step procedure for the same would be helpful.
Also need to know what features we get to use in paid version of sdk.

For the record the HTTP stream has to respect the MPEG-DASH format with AVC1 or AVC3 codec (this is what the SDK supports). That means the format of the URL has to end with a .mpd
example: http://vm2.dashif.org/livesim-dev/periods_60/xlink_30/insertad_1/testpic_2s/Manifest.mpd
I don't know what format you used but if it tries to download, you probably don't have the right format.
If you want to deliver youtube videos as DASH, I advise you to read this: https://developers.google.com/youtube/v3/live/guides/encoding-with-dash
BUT I have been talking to the dev team of the SDK as I also cannot read my stream (though it does not try to download it) and have been told that there is currently a problem which makes the whole streaming part unsuable. They should release a fix ASAP (though they did not give me a date).

Related

Flutter camera plugin, get path before recoding stopped

I'm using camera plugin to record video. However, I need this video to be transferred to API. I want to do that in chunks, lets say 4MB. I would usually do this with a loop reading file size to check when we have new chunk. The problem is that from version 0.6.0 and above startVideoRecording() no longer accepts path where to store it and I don't know where the file is to keep reading its size. It only gives the path after the recording is stopped. That means I have to start transferring after that and this would be annoying for the user.
I know I can downgrade my version below 0.6.0 but I really don't want to do that if there is another way.
So, is there a way to get current file being recorded after startVideoRecording() is called?
I posted this on the github refactor open issue, just FYI. Looks like they will look at adding it as an optional parameter.
i think you use this lib for help to pickup and capture video or image and get full path and file Object
https://pub.dev/packages/image_picker

is there a way to convert a scratch 3.0 file into a .swf file?

I tried scratch 2.0 but I use Sinhala language because l am Sri Lankan. So I can't use Sinhala in scratch 2.0 So I can't convert using scratch 2.0
Is there any other way we can convert an Sb3 file to a Swf file?
I hope I understood correctly. You want to convert a Scratch project to SWF. Scratch 2.0 is not an option due to lack of language support; you feel obliged to create the project in Scratch 3.0.
I guess it should be possible to convert SB3 to SWF in two steps: first convert SB3 to SB2, then convert SB2 to SWF.
This wiki article explains both steps:
https://en.scratch-wiki.info/wiki/Porting_Scratch_Projects
SB3 to SB2
Scratch user -Rex- made a .sb3 to .sb2 converter here.
Run sb3tosb2.py (requires Python) to run the converter.
After the .sb2 is saved, the guides below can be followed (.mp3 files will not be converted to .wav to be used in the .sb2).
Note: it wasn't clear to me what 'guides' the last sentence refers to.
SB2 to SWF
You can download an SB2 to SWF converter or use an online converter at this site.
Note: the link above now redirects to: https://asentientbot.github.io/converter/
I've been struggling with this as well but only because when I go to the converter on asentienbot.github.io it tells me this "Quite a few years ago, I wrote a tool to port Scratch projects to SWF files and standalone applications. It is now obsolete and unsupported." And doesn't let me press any buttons just tells me I can download the source code. Does this happen to you?
As #Ruud Helderman said, you can convert SB3 to SB2 using this converter made by -Rex-.
For the SB2 to SWF part, you can use the Wayback Machine to access older versions of the website.
Here, I linked the latest available version of the page.
EDIT: You have to download the converter since the online version redirects you to: https://asentientbot.github.io/converter/

Flowplayer Secure Streaming (via PHP): MP4 videos not Pseudo-Streaming (FLVs do)

I've ran into a problem with MP4 secure pseudo streaming.
First of all, a couple of FACTS for you to get the idea:
I'm using Flowplayer
I have mod_h264_streaming installed and working.
I have successfully added secure streaming plugin (PHP validation) and it's working with pseudo for FLV videos (thanks to mod_h264_streamin, of course).
I'm testing with an MP4 with the moov-atom at the beginning (and the video starts immediately. No pseudo, though).
Now... when flowplayer loads an MP4, the player makes a request like this:
http://mydomain.com/videos/fa3...[security_hash]...46/video.mp4?start=0
Note the ?start=0
When I seek to another part of the video (not yet loaded), the player makes this request:
http://mydomain.com/videos/fa3...[security_hash]...46/video.mp4?start=33.342
Note the ?start=33.342
This results in the video starting again from the beginning, which is the problem.
ADDITIONAL FACT: for MP4 files start is sent (to the PHP script) as the seconds of the timeline where you click on, and for FLVs start is sent as the seek position in Bytes and I think this difference is the main reason of the issue.
My question is:
How do I handle, in my PHP pseudo streaming script, MP4 videos streaming?
Auto-question: Should I use byte ranges headers?
I'm not posting code, as it's not a coding problem, but a conceptual one: let's focus on the idea by now.
Also, all files I'm testing with are well encoded and they are not the problem.
Thanks

Streaming and playing an MP3 stream. .mp3 URL format

I used the sample code from http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html. it runs OK with default URL. But when I replace with my URL "http://dl.mp3.kapsule.info/fsfsdfdsfdserwrwq3/fc90613208cc3f16ae6d6ba05d21880c/4b5244f0/b/7e/b7e80afa18d06fdd3dd9f9fa44b51fc0.mp3?filename=Every-Day-I-Love-You.mp3", this app shows an message as "Audio not Found". But when I put my URL on Address Bar of Web Browser, I can download this .mp3 file.
really, I can't understand why it is?
pleased tell me!
Thank you very much
My guess would be that the app is designed to play a MP3 encoded audio stream with no limit in length (which is different from your ordinary music file). To set this up, you need a streaming server on the client side.
I think you can find out for sure by trying with a different radio station that transmits in MP3. If that works, it's most likely that your app doesn't like your file.
You should, as Vivek recommends, also try using a simpler download URL for your file, in case the App gets confused by the URL's length and/or structure.
As mentioned, this is due to the URL of the file. The AudioStreamer code specifically checks for the extension of the file and tries to figure out the audio type based on that. If you change that logic to handle your custom URLs, it will start working
So to point you in the right direction: open AudioStreamer.m and look for the references of
hintForFileExtension:
This function returns the type of file based on the extension. If you know the file type won't change (always mp3), the quick and dirty solution is to always assign mp3 type without any logic... like this:
err = AudioFileStreamOpen(self, MyPropertyListenerProc, MyPacketsProc, kAudioFileMP3Type, &audioFileStream);
Note: I've put kAudioFileMP3Type constant instead of calculated value
PS yes, it does work with static mp3 files, even though it's designed for streams and hence misses some of the functionality one would expect from a player that plays a static file on the server (caching, prefetching, proper seeking)
Thats because the default url directly points to a file in the webserver, whereas the the url you've mentioned is a HTTP (POST/GET) operation, which the application may not be designed to handle.
I suspect that your URL is one-time-use. When I try to visit it, I see 408 - Request Timeout.
Many links on mass file sharing websites are like this. If you could download the file directly, you wouldn't sit through a page of ads and premium account offers.
Try again with a file on a normal website, like this one.

List Out all video from url

I am trying to list out all Video from a url. For this i m sending an request to "You Tube"
url as "http://www.youtube.com/" and want to list out all available video . But i didn't get anything from that request ? any idea or any documentation hint ?
There are utilities for downloading youtube videos (for example Linux has youtube-dl), but it's not uncommon for sites with large numbers of downloadable files to prevent attempts to simply download everything - and even though you said you wanted to list rather than download all the videos, that's unfortunately what it would suggest to a website administrator.
Besides, files on youtube are not accessed by simple urls like http://www.youtube.com/filename
Something more is required. I don't think you can treat the (what is it?) 11 character alphabet soup as a filename, it's a parameter passed to the software which streams back the video.
EDIT: youtube-dl is a command-line program in Linux and probably BSD. You need to know the URL of the Youtube video so you can type (for example)
youtube-dl http://www.youtube.com/watch?v=Z1JZ9O15280
If you had a list of these URLs you could put them in a file and make a bulk download script - but that takes us back to your original question.
In Firefox I would right-click on a link to a Youtube video and choose 'copy link location'. Then paste the URLs one at a time into a text file. But this question is drifting away from mere programming...