Herewith we are facing the data stalling in 360 video in youtube application and also observed in more content for example videoID of 'HemwKBjQ0Uc'(【VR】Elemental Demo - 60fps 4k 8k Stereo 360 with Ambisonic audio). In problematic case, buffer is removing from the RangeList using next range(DeleteAndRemoveRange(&next_range_itr)) and also problem observed within 30-60 secs for above mentioned content. And also we are using Cobalt 13.11 version, MergeWithAdjacentRangeIfNecessary() API has been problematic from our analysis. And also for our internal validation, we have increased the non video budget and 1080p resolution upto 50 MB, Data stallation has not been observed in 360 video and content was playing contionously for that content. For your information, We have checked with latest cobalt application and observed the same behaviour.
Please advise us to conclude this issue.
Data Stalling- Video frame didn’t recieve to ffmpeg_video_decoder even after giving kneedbuffer but audio data receiving as usual continuously. Can you please try to play a above mentioned video. And also we already have ensured in latest cobalt 19+ also having this issue.
Thanks in advance
Have you try to increase the video buffer budget set by variables like COBALT_MEDIA_BUFFER_VIDEO_BUDGET_4K and COBALT_MEDIA_BUFFER_MAX_CAPACITY_4K?
Yes xiaoming. We have already tried this and working fine but we need to know the reason of appndbuffer not happening while after this call happens (DeleteAndRemoveRange(&next_range_itr))
Related
Hello Friends,
I am working on OTT platform app, I need to play video very smoothly without any delay like Snapchat and instagram as reference. I am using Cloudinary for uploading videos and everything is working good but at first time, AVPlayer takes time of 1-2 second to start video, which is bad thing for Me. Once video play, next time I come on same video it plays smoothly with less delay of max Half second.
As far as I tried to learn through different blogs and stack over flow answers, I get rid this is default AVPlayer Buffering time and it depends of video durations and its fetching video information like title, metadata etc. But I don't have to use these information anywhere.
I tried to set false this property of AVPlayer .automaticallyWaitsToMinimizeStalling = false, but still no luck.
I tried few solutions from StackOverflow posts, but didn't get success
How to reduce iOS AVPlayer start delay
This is demo video Link Which you can try http://res.cloudinary.com/dtzhnffrp/video/upload/v1621013678/1on1/bgasthklqvixukocv6xy.mov
If you can suggest, what I can use for OTT platforms to play video smoothly really grateful to everyone...
Thanks In Advance
Most streaming services use ABR, which creates multiple resolution copies of the video and beaks each into 2-10 second, typicaLLY, chunks.
One benefit of ABR is that to speed up playback start up, the video can start on a lower resolution bit rate and then 'step up' to higher bit rates as it proceeds.
You can often see this on popular streaming services where you will see the video quality is lower when the video starts and improves after a short time.
See here for more on ABRs: https://stackoverflow.com/a/42365034/334402
This requires you to do work on the server side to prepare the video for HLS and DASH streaming, the two most common ABR streaming protocols.
Typically dedicated streaming servers, or a combination of encoders and packagers, are use to prepare and serve the ABR streams. There are also cloud services, for example AWS Media Services or Azure Media Services, which allow on demand streaming models.
You can make the videos smaller either by reducing the dimensions or by compressing it more. Both of these have the effect of lowering startup time - but will sacrifice quality in exchange.
Cloudinary will create ABR versions for you, but the last I checked, you pay for each version created.
My iOS app uses AVPlayer to decode H.264 videos with AAC audio tracks out of local device storage. Content with bit rate spikes cause audio to drop shortly (less than a second) after the spike is played, yet video playback continues normally. Playing the videos through Safari seems to work fine, and this behavior is repeatable on several models of iPhones ranging from 6s through 8 plus.
I've been looking for any messages generated, delegates called with error information, or interesting KVOs, but there's been no helpful information so far. What might I do to get some sort of more detailed information that can point me in the right direction?
Turned out that the AVPlayer was configured to utilize methods for loading data in a custom way. The implementation of these methods failed to follow the pattern of satisfying the requests completely. (Apple docs are a vague about this.) The video portion of the AVPlayer asked for more data repeatedly, so eventually all its data got pulled. However, the audio portion patiently waited for the data to come in because there were neither an error state reported nor was all the data provided -- the presumption being that it was pending.
So, in short, sounds like there's provisions in the video handling code to treat missing data as a stall of some form and to plow onward, whereas audio doesn't have that feature. Not a bad design -- if audio cuts out it's very noticeable, and it's also by far the smaller stream so it's much less likely.
Despite spending quite a few days on the problem before posting, the lack of any useful signals made it hard to chase down the problem. I eventually reasoned that if there's no error in producing output from the stream, the problem must be in the delivery of the stream, and the problem revealed itself once I started tweaking the data loading code.
I'm developing an iOS app using Swift and my problem is, trying to adjust the playback speed during audio streaming.
I am using AVPlayer for this project:
streamingPlayer = AVPlayer(playerItem: audioItem)
To adjust playback speed:
streamingPlayer.rate = slider.value
I tested it using a test server, and it works fine for normal links which help access audio files. There is no problem with the adjustment of playback speed and it works fine.
The problem occurs when the links involve more security. I can access the audio with a request through .ashx. The speed can be made slower (AVPlayer rate < 1) but the problem occurs when it has to be made faster. (Normal rate is 1, so problem is rate cannot be greater than 1)
I tried to use the function below, but it didn't help:
audioItem.canPlayFastForward
Another weird problem is that when testers tested it on high speed internet, it worked fine. I tested it on speeds between 15-30 mbps, and the problem still persists. I am assuming it is a problem with the connection to the server. I don't want users to use high speed internet to use the app. So can someone please help me optimize or solve this problem?
I have looked through the AVPlayer documentation and tried almost every functions provided.
Here is a sample link. Would appreciate if someone can help me out!
I realize that this is coming in 9 months later but I had a similar problem to yours and figured it out so I thought I'd post for anybody looking at this in the future. You have to set: AVAudioPlayerName.enableRate = true.
You can increase or decrease the rate by this single line code:
Avplayer.playImmediately(atRate: 1.25)// change the rate
We have a problem with HLS h.264 mp4 on IPad devices using HLS streaming on IOS 7 and 8:
The first 9-15 seconds (the length of the first TS segment) only shows the first key frame (IDR) of the second TS segment, while the sound plays normally. When the second segment begins to play, the video continues as it should.
HLS segmenter is a wowza with 10 seconds segment length. The encoding software we use is TMPG, latest version (uses x264). The funny thing is, that handbrake, xmedia recode, adobe me deliver videos which work. I am aware of the fact, that this hints to a bug within our encoding software, but if someone already had that problem with another software / segmenter combination and fixed it, I would like to know what the source of the problem was.
What we already tried:
changing almost every setting so that it sticks as close as possible to apple's recommendations
changing GOP structure, GOP length, encoding parameters which influence efficiency of encoding
analysis of the TS segments created by wowza, they are fine and begin all with keyframes
contact TMPG/Apple/Wowza support
So, did anyone stumble upon this problem before? Has anyone solved it?
EDIT:
It seems that TMPGEnc uses a defective x264 implementation. The mediastreamvalidator tool from Apple returned an error stating that our TS segment "does not contain any IDR access unit with a SPS and a PPS" - which it does actually, but obviously in the wrong places if that somehow matters.
Whatever tool you use for segmenting is not ensuring that the segment begins with an SPS+PPS+IDR. this could be an issue with your encoder or your segmenter. Basically, decoding can nor begin until all three of these thing are encountered in the player. Try using mediafilessegmenter and mediastreamvarifier from apple to analyze the problem.
I'm using DirectX.Capture library to save to an AVI fomr Webcam. I need video to be saved to have 50fps or more, but when i use this:
capture.FrameRate = 59.994;
FrameRate doesn't change at all. It had 30 before that line and passing that line it keeps its 30. I tried other values, even 20 and 10, and nothing changes.
What else should i do so i can be able to change that value? or it is something regarding my hardware and i can hope it works in other machine?
Please help me, i don't know what to do.
Thanx
The source material (video, app/etc), is probably only being updated at 30fps, either because that is the way the video codec or app behaves, or because you have vsync turned on in the target app (check vsync settings, it might be getting forced by the video card drivers if there is hardware acceleration). The behaviour of DirectX.Capture is probably to clamp to the highest available framerate from the source.
If you really want to make the video 50fps, capture it at its native rate (30/29.97) and just resample the video using some other software (note that this would be a destructive operation since 50 is not a clean multiple of 30). This will be no different from what DX capture would do if you could force it at 50fps (even if its nonsensical due to the source material being at a lower framerate). FYI most video files are between 25 and 30 FPS.