tvOS AVPlayerViewController Subtitles - avplayer

I am having an issue displaying subtitles for AVPlayerViewController.
I set
[_player setRequiresFullSubtitles:YES];
in my code where I create the AVPlayerViewController, but it still does not show.

Related

How does one play higher resolution videos (4k and higher) in VLC (desktop app and Unity)?

I'm trying to get a 360 streamed video to play at its full (4k) resolution. I did do previous searching and found the below thread but it didn't answer my question.
How do I adjust the video resolution?
My end goal is to integrate this into vlc unity but I also don't see how to adjust the resolution up to 4k (or higher) for streamed videos even on the desktop app. As a test, I tried a 4k video from youtube in the VLC desktop app and couldn't see how to get it to play in 4k. The end goal is to stream from aws but I want to confirm that my stream can indeed play at 4k before continuing to try to figure out why it's playing at lower resolution within Unity. It resizes down to 1920x1080 instead of the intended 4096x2048 for my aws stream and resizes the youtube video down to 1280x720 from its 3840x2160.
I've tried messing with the advanced settings and looking at input/codecs and the best option for "preferred video resolution" is "best available" (below that is full hd). I've looked through other suggestions online and didn't see a lot to change but did change Settings-->Video-->Output to "DirectX (DirectDraw) video output. This one was just me fumbling through the desktop app, but I tried going through Media-->Open Network Stream, clicking the arrow next to play and selecting stream, choosing RTSP for destination, and then editing the resolution within the profile to be a specified width and height. None of the above changed the resolution of the video.
TL;DR - How can I play a streamed video at higher resolutions (4k and up) in the VLC desktop app and in VLC Unity?
Edit - adding requested code snippets. This just modifies the UseRenderingPlugin file from the VLC unity asset.
Also, similar to what was getting discussed in the comments, when I play the video locally instead of streaming, it plays at the full resolution of the video.
Within Awake() I set the material to the 4096x2048 one mentioned for the skybox
RenderSettings.skybox = material4k;
And then in Update here is the relevant segment
var texptr = _mediaPlayer.GetTexture(out bool updated);
            if (updated && texptr != IntPtr.Zero)
            {
                Debug.Log("Creating texture ");
                tex = Texture2D.CreateExternalTexture((int)width,
                    (int)height,
                    TextureFormat.RGBA32,
                    false,
                    true,
                    texptr);
                RenderSettings.skybox.mainTexture = tex;
                }

JavaFX MediaPlayer playing background music loop with small intro music

I am trying to create a game using JavaFX. I had been trying to insert some background musics to the game. The musics are of compatible .mp3 files. I am currently using MediaPlayer to playback each Media. Each media file consist of the actual loop and a small (optional) intro music to the loop. How can I achieve smooth audio playback using JavaFX.
Methods I have tried:
Using the Media as one file; I try to alter the mediaPlayer.startTime, mediaPlayer.stopTime. It seems that the duration of the music is shortened when I enter the loop. However, the music restarts at the intro and ends at the wrong place. It was as if startTime didn't offset the music at all.
Using the Media as two separate files (intro and loop); I try to immediately playback the loop music as soon as the intro music is finished (using mediaPlayer.setOnEndOfMedia()). However, the transition was too slow and noticable.
After experience with other well-known game engines (e.g. Unity), I found that the files should be in .wav format as opposed to .mp3 format. This will allow the music to be looped seamlessly.

How to play YouTube video in WebView on Google Glass

I have code like this:
setContentView(R.layout.webview);
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://www.youtube.com/watch?v=_Z5-P9v3F8w");
It'll show the youtube video with the Play button, but none of the Glass gesture can make the video play. Any ideas? Thanks!
Finally figured out how to play Youtube video on Glass!
Intent i = new Intent();
i.setAction("com.google.glass.action.VIDEOPLAYER");
i.putExtra("video_url", "https://m.youtube.com/watch?v=5bWSgFnoCOk");
startActivity(i);
Using WebView can't play the video, using VideoView can only play local MP4 or streaming MP4 (there's some way to hack the MP4 link for a Youtube video, but not reliable). Also, using VideoView can only pause/play the video, but not fast forward or backward. Using the com.google.glass.action.VIDEOPLAYER above solves all the problems WebView and VideoView have.

Extract image frame from video in c#

I trying to create media player in window form application us C#. I want to get thumbnails of video file in order to show them in the playing list, Can any body help me to figure out the code or refer me some links. i am really stuck at this point

Does ActionBar Sherlock cause problems with MediaRecorder?

I have a problem using MediaRecorder to record video with ActionBar Sherlock. I have a base app that sets up and records video files without any problem, but as soon as I add ABS, it stops working.
Right now I have a non-ABS app that can record video with no problems at all and the same app (in all other respects) with ABS that doesnt work.
Initialising the video recorder using the CAMCORDER settings gets through the MediaRecorder setup OK, but when I stop recording, I get a '-1' error in the logcat and the resulting .MP4 file has no audio or video track (although the file size looks OK).
If I try setting MediaRecorder with maunaul setups (i.e., format, frame rate, size etc), the setup keeps falling over at 'setVideoSource...CAMERA'.
Does anyone know if there's any reason why ABS would upset MediaRecorder this way?
Added 01/01/13:The application I'm working on is being upgraded from a photo-taking app to a video-recording app. The preview for the camera was previously done with a ImageView frame, which works OK for providing an image preview, but not for use as the video preview on MediaRecorder. For MediaRecorder, I needed to use a SurfaceView. Once I switched to a SurfaceView, all was good!

Resources