Jump to content
merkin stare

Buffer overflow on 4k hevc

Recommended Posts

Griga    359
Griga
10 hours ago, merkin stare said:

I think we should not overlook the fact that buffer overflows only occur if there is Audio and Video streams present.

 

Nothing special. Have a look at the DVB PTS (Presentation Time Stamps) displayed on the DVBSource property page, and it becomes self-explanatory. Audio is broadcasted two seconds behind (or video two seconds ahead), which means, due to syncing two seconds of video (approx. 17 MB undecoded) have to be buffered before it can be displayed. Of course the exaggerated video bit rate mainly strains input buffering. So basically craig_s is right: The total amount of buffering is not sufficient in this case. However, there is evidence that it should be solved by increasing the buffer size, not the number of buffers.

 

14 minutes ago, merkin stare said:

This screams bug with DVBViewer Source filter and all I here are unfounded excuses.

 

You are screaming bug. Actually you are lucky to share a very profound expert problem analysis. Try to learn from it.

Share this post


Link to post
merkin stare    0
merkin stare
6 minutes ago, Griga said:

However, there is evidence that it should be solved by increasing the buffer size, not the number of buffers.

tried to increase already..didnt work..prolly another bug tho.

 

experts are not on boards..they are designing encoders, etc. that allow us to watch tv.

good thing there is free software out there that can actually play content and developers capable of overcoming inconsistencies.  how long do I have to request a refund?

Share this post


Link to post
craig_s    22
craig_s

Hey @merkin stare I've been working about 15 Years in broadcast and I did not find 1 engineer who was exactly knowing what he did on deeper investigation. So please do not trust in broadcasters too much, they're all only humans. Sometimes they are trying things, with pleasure on new formats like 4k. Profiling teams.. Why not?

 

So trying to force Griga now to stop everything only to investigate thoroughly an experiment is what? I think you know. Also not wise was to tell that you are able to watch your new favourite by using other software. 1 reason more to take it one step at a time.. :) Anyway I would be the second to donate to Grigas new hardware fund! Since 10? years he cultivates some philosophy - not first but only try to solve the things on old hardware. If it works there it will work everywhere..? Hmmm...

 

From Griga I would wish to transport the increasable buffer size to LAV or, my favourite, a maximum of 'Allocated Buffers' = 1500 , possible?

Share this post


Link to post
nuts    51
nuts

What Griga is doing for his tests needs additional code in DVBSource (and DVBViewer). I am sure there will be a solution. ;) 

Share this post


Link to post
craig_s    22
craig_s

..hopefully a solution that works using hardware acceleration. I like to use my graphics card and the CPU heated by other usage..

Share this post


Link to post
Griga    359
Griga

We'll see... I've uploaded a DVBSource 3.9.4.1 test version to the members area -> beta section. It allows to set the buffer size for HEVC playback independently from the host application (and the Lentoid Decoder) by tweaking the file DVBSource.ini:

  1. Replace PushSource.ax in \Program Files\DVBViewer\Filters by the new version.
  2. Open the file DVBSource.ini (see configuration folder) with a text editor. Add a line with the section header [Params] if it is not yet present. Add a line containing HEVCBufferSize=1024 to the section. It specifies the size per buffer in kb (1024 = 1 MB).
  3. Save and perform Playback -> Rebuild Playback in DVBViewer to let the change take effect.

You may vary the buffer size and try how different values work. Please note that this is no bugfix release, but just a test for investigating what's going on. I can't check it out it with the LAV Decoder and DXVA, as already mentioned.

  • Thanks 1

Share this post


Link to post
merkin stare    0
merkin stare
4 hours ago, Griga said:

We'll see... I've uploaded a DVBSource 3.9.4.1 test version to the members area -> beta section. It allows to set the buffer size for HEVC playback independently from the host application (and the Lentoid Decoder) by tweaking the file DVBSource.ini:

  1. Replace PushSource.ax in \Program Files\DVBViewer\Filters by the new version.
  2. Open the file DVBSource.ini (see configuration folder) with a text editor. Add a line with the section header [Params] if it is not yet present. Add a line containing HEVCBufferSize=1024 to the section. It specifies the size per buffer in kb (1024 = 1 MB).
  3. Save and perform Playback -> Rebuild Playback in DVBViewer to let the change take effect.

You may vary the buffer size and try how different values work. Please note that this is no bugfix release, but just a test for investigating what's going on. I can't check it out it with the LAV Decoder and DXVA, as already mentioned.

hi

this fix works!

screenshot:

https://drive.google.com/file/d/0B_1SqviRl7imSGkyaVJzUDcteTA/view?usp=sharing

 

my only question is..DVBSource says PTS are in sync now, but if I go back to "stable" filter PTS is out of sync.

so is this bad encoder or bug?

 

still waiting for bitcoin donation address. ;)

Share this post


Link to post
merkin stare    0
merkin stare
10 hours ago, craig_s said:

So trying to force Griga now to stop everything only to investigate thoroughly an experiment is what?

we will have to agree to disagree that these broadcasts are still in "experiment" stage. this provider has been sending these 4k feeds to end user paying customers for over a year.  albeit this is the c band backhaul which is transcoded to a much lower bitrate for the end user on the ka band.

 

 

Share this post


Link to post
Griga    359
Griga
1 hour ago, merkin stare said:

DVBSource says PTS are in sync now, but if I go back to "stable" filter PTS is out of sync.

 

Filtergraph or DVB PTS? The DVBSource property page allows to toggle between the two display modes. The DVB PTS are the original broadcasted time stamps. Usually video is broadcasted a bit earlier than the corresponding audio data because it may take more time to process the video data, particularly if video frames are not broadcasted in displayed order for achieving a better compression, thus requiring frame reordering in the video renderer. The Filtergraph PTS depend on how the data is buffered and processed by the decoder and renderer filters.

 

The PTS don't indicate whether video and audio are in sync or not. It's up to the video and audio renderer to take care of sync and output the data according to the time stamps (by using a buffering and scheduling mechanism).

 

The timing and coordination of different components is quite sophisticated. Read more about it here:

 

https://msdn.microsoft.com/en-us/library/windows/desktop/dd407202(v=vs.85).aspx

Share this post


Link to post
craig_s    22
craig_s

DVBSource 3.9.4.1 - also here perfect hi bitrate HEVC now. Even merkin stare's sample running flawlessly - hardware LAV at usual 2% CPU.

 

Low buffers in DVBSource (german: sieht jetzt alles viel entspannter aus :)), before -> after:

 

merkin stare's sample - 72,7 Mb/s:
Allocated Buffers = explosive -> 180
Queued Video Buffers = explosive -> ~ 158

 

Samsung: 7 Wonders Of The World Brazil - 51,6 Mb/s (the one with my above DVBSource screenshot):
Allocated Buffers = 1000 -> 120
Queued Video Buffers ~ 999 -> 92
 
'Normal' Astra UHD HEVC recording ~ 24 Mb/s:
Allocated Buffers ~ 730 -> 99
Queued Video Buffers ~ 430 -> 53

 

Sorry merkin stare, english is too stressing for me and this is not so important:

Einige Quälerei auf die hoch-bittigen HEVC Demos losgelassen mit Timeline Sprüngen - volle Audio Synchronität blieb erhalten - sehr gut.

SES Astra live kam mir sogar etwas flüssiger vor obwohl DVBSource 3.9.4.1 dafür nicht wirklich zuständig, könnte aber Wunschdenken sein..?

Also kann man so einbauen ohne Katastrophen befürchten zu müssen..;)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×