Hls play only audio, but video is black - streaming

I have an application that uses rtmp nginx for streaming. Configure hls_time 1s. Sometimes when I refresh hls player, it only plays audio and video shows black. I used OBS for streaming with keyframe 2s).

I saw that someone said "Segments will be clipped at keyframes, so unless a keyframe exists every second, hls_time will not be accepted.". So I changed the keyframe 1s and it worked fine.

Related

No audio heard unless facing audio source unity

I have a script, to play a sound clip when a footstep is taken. I use events in the animation tab, and when I play the sound, it will only be audible if i am looking at the character, or npc, the audio source is in fact on the character, but i don't know what is causing this.
On your AudioSource, you could play around with the 3D sound settings:

How to repeat video track using AVMutableComposition

I want to repeat 1s video to 10 seconds. I used AVMutableComposition and attached the code below.
When I try with a video recorded by apple default camera app, it works as well.
But I need to have specified video so that I made a customized camera. I made 1s video(frame rate : 5fps, H264 codec).
I am getting black frames with this video.
I am not sure whats the problem. Please help.
I solved it by myself so I did not translate target view's coordinator when apply transform to video track so that it doesn't show up properly.

How to delay video streaming in MPMoviePlayer

I am playing video stream from urls,in MPMoviePlayer.When I click the play button,Json
parsing happens and video is getting played after a buffer. all the videos are 30s. After the
first buffer video plays for 5-6 seconds,and stops.then again buffers and play.It continues
till 30th second.So the viewers get disturbed a lot. Is there any idea to overcome this?
one shortcut idea is you out
sleep(4);
in before playing the player
~thanking You

AirPlay flickering when switching between movies

I have an app that shows list of movies in a table view. When I play them one after another on device it works just great. But when I switch to Apple TV over AirPlay it doesn't work anymore. It play's the first video on ATV ok but after a switch to the next video the screen on ATV start blinking/flickering and after a few seconds it falls back playing on a device. I am using MPMoviePlayerController for playing stream videos.
I also found out that if previous video finished playing over AirPlay it tries to start the next one over AirPlay also. Is this intended behaviour?
Is this kind a related with property allowsAirPlay?
I think I've found a solution. Before you switch playing another video you should stop the previous one:
[self.moviePlayer stop];
This is not needed if you are not playing via AirPlay cos the next video will automatically stop previous one by nature - you can not play two videos at once.
But If you do play video over AirPlay you need to stop previous one first and than play the next one.
This solution works for me.

How to play more than one video in cocoa touch?

I'm trying to play more than one video at the same time in Cocoa Touch.
I can play one video with MPMoviePlayerController, but it does not allow to play more than one: "Note: Although you can create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time can play its movie."
Basically I'm trying to display complex, high resolution animation in a loop with autostart, but using PNGs makes the app size way too big (+500 MB)
I converted one object of the animation to a movie which is about 50x smaller now.
I think its not possible to play two video at the same time. But you can play video in queue refer this article....