[RESOLVED] 7 extra frames on 1 source
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: 7 extra frames on 1 source
I see.
Well, this is the part I don't understand well. They used to be very conservative on broadcasting (Hint: mpeg2 interlaced 1440x1080 SAR 2ch aac) but all in a sudden they are going to the moon (hevc 10bit 4k / 8k with open-gop rasl+radl and 22.2 channel latm aac audio).
Well, this is the part I don't understand well. They used to be very conservative on broadcasting (Hint: mpeg2 interlaced 1440x1080 SAR 2ch aac) but all in a sudden they are going to the moon (hevc 10bit 4k / 8k with open-gop rasl+radl and 22.2 channel latm aac audio).
Re: 7 extra frames on 1 source
22 channel? That's insane.
BTW, just to help with your already excellent English, we say "all of a sudden".
BTW, just to help with your already excellent English, we say "all of a sudden".
Re: 7 extra frames on 1 source
We say, she say, speak for yourself. Who is broadcaster? We can blow up studio. Animals will not be harmed.
Re: 7 extra frames on 1 source
I'm so confused. Help me.
Sherman Peabody
Director of Linux Development
Director of Linux Development
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: 7 extra frames on 1 source
Thanks for the correction.
By the way, they used 22.2 channels so it's 24 in total I don't even think there's any OSS decoder yet.
By the way, they used 22.2 channels so it's 24 in total I don't even think there's any OSS decoder yet.
Re: 7 extra frames on 1 source
Sherman, poor baby, come to me, I will help you.
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: 7 extra frames on 1 source
Sherman, you are a beloved child of the divine.
https://www.youtube.com/watch?v=2EaflX0MWRo (released version)
https://www.youtube.com/watch?v=Ma09CIqapwk (extended version)
https://www.youtube.com/watch?v=NlqJ44IpAJ0 (happy version)
https://www.youtube.com/watch?v=yqFz7T5v3iU (with lyrics)
https://www.youtube.com/watch?v=b-3eSxlgOhY (Motown remix)
Highest genius of the human spirit. RIP Levi Stubbs.
"When the world falls apart, some things stay in place
Levi Stubbs' tears run down his face."
-Billy Bragg
https://www.youtube.com/watch?v=2EaflX0MWRo (released version)
https://www.youtube.com/watch?v=Ma09CIqapwk (extended version)
https://www.youtube.com/watch?v=NlqJ44IpAJ0 (happy version)
https://www.youtube.com/watch?v=yqFz7T5v3iU (with lyrics)
https://www.youtube.com/watch?v=b-3eSxlgOhY (Motown remix)
Highest genius of the human spirit. RIP Levi Stubbs.
"When the world falls apart, some things stay in place
Levi Stubbs' tears run down his face."
-Billy Bragg
Re: 7 extra frames on 1 source
Thank you, Bullwinkle. But are emotions irrational? Should we suppress them? Is it an evolutionary mistake? How do emotions know what is right?
Sherman Peabody
Director of Linux Development
Director of Linux Development
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: 7 extra frames on 1 source
Sherman, emotions are beautiful manifestations of the divine spirit that set us apart from microbes. Embrace the divine, and sing your joy!
Re: 7 extra frames on 1 source
Sherman Peabody
Director of Linux Development
Director of Linux Development
Re: 7 extra frames on 1 source
I've been working on the seeking issue. It's a doozy. Apparently, it's all caused by the RASL frames. My design assumes that the decoder always returns something for any coded frame. In fact I negotiated that with nVidia when I was working with them on the early CUVID rollout. But now, HEVC comes along with its Random Access Skipped Leading (RASL) frames. A Random Access Decodable Leading (RADL) frame is a frame that is decodable starting with the associated IDR/I, while a RASL is a frame that is not decodable and must be skipped by the decoder upon random access, meaning the decoder returns nothing for them. Oops, there goes my assumption and we need a hack or a re-design. So we have to cogitate on this and decide how to do things given the reality of RASL frames. All hands are on deck, even Natasha is looking into it.
Re: 7 extra frames on 1 source
Hey that wasn't so bad. After discussing this with Curly I realized we could keep a count of leading RASLs per GOP and then just use that to adjust how many frames we need to decode starting at the IDR/I to get to the seeked-to frame. It seems to be working fine. I'll do some heavy regression testing and then give y'all a slipstream.
Re: 7 extra frames on 1 source
Glad to be of assistance, Rock! Nyuk.
Curly Howard
Director of EAC3TO Development
Director of EAC3TO Development
Re: 7 extra frames on 1 source
Glad I decided to test all my HEVC streams with this fix! I found one that starts like this:
SPS 390168
PPS 390234
PREFERRED TRANSFER CHARACTERISTICS 18
0:RASL 0 -23
1:RASL 0 -22
2:RASL 0 -21
3:RASL 0 -20
4:RASL 0 -19
5:RASL 0 -18
6:RASL 0 -17
7:CRA 390719 2 -16
8:TRAIL 0 -15
9:TRAIL 0 -14
10:TRAIL 0 -13
11:TRAIL 0 -12
12:TRAIL 0 -11
13:TRAIL 0 -10
14:TRAIL 0 -9
Yes, there are 7 leading frames that cannot be decoded. And we can't try to start decoding at the previous GOP because this is the first GOP. So I decided to treat this the same way as for AVC leading B frames: repeat the first decodable frame 7 times. The idea is to preserve audio sync.
Formally, an HEVC stream must start with an IDR, but people cut streams all the time and produce such technically illegal streams.
Still have a bunch more to test but things are looking good.
SPS 390168
PPS 390234
PREFERRED TRANSFER CHARACTERISTICS 18
0:RASL 0 -23
1:RASL 0 -22
2:RASL 0 -21
3:RASL 0 -20
4:RASL 0 -19
5:RASL 0 -18
6:RASL 0 -17
7:CRA 390719 2 -16
8:TRAIL 0 -15
9:TRAIL 0 -14
10:TRAIL 0 -13
11:TRAIL 0 -12
12:TRAIL 0 -11
13:TRAIL 0 -10
14:TRAIL 0 -9
Yes, there are 7 leading frames that cannot be decoded. And we can't try to start decoding at the previous GOP because this is the first GOP. So I decided to treat this the same way as for AVC leading B frames: repeat the first decodable frame 7 times. The idea is to preserve audio sync.
Formally, an HEVC stream must start with an IDR, but people cut streams all the time and produce such technically illegal streams.
Still have a bunch more to test but things are looking good.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: 7 extra frames on 1 source
Yea it happened to TV caps a lot. They use CRAs instead of IDRs as many as possible, so the program can only be cut on CRAs. It's wise to make it work like AVC leading B frames and keep the rest of the video in sync and seek accurate.
Thanks for all the work guys!
Thanks for all the work guys!
Re: 7 extra frames on 1 source
Thank you, MeteorRain. Wouldn't have happened without you!
Found another one with 184 leading RADLs preceding an IDR. What is that all about? Anyway, it works fine with the fix.
Found another one with 184 leading RADLs preceding an IDR. What is that all about? Anyway, it works fine with the fix.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: 7 extra frames on 1 source
Yea occasionally they insert IDRs at some commercials or between programs, it's kinda random. Sometimes it's just full CRAs across multiple programs.
Re: 7 extra frames on 1 source
It's the 184 leading RADLs that has me baffled. Must be for compression efficiency in some way, I suppose.
Re: 7 extra frames on 1 source
Fixed in slipstream 205. Marking resolved.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: [RESOLVED] 7 extra frames on 1 source
Thanks, the seek accuracy is back!
Re: [RESOLVED] 7 extra frames on 1 source
Ah, with your endorsement we can all sleep soundly again.