braice / MuMuDVB

A DVB IPTV streaming software
http://mumudvb.braice.net/
GNU General Public License v2.0
213 stars 133 forks source link

TS scrambled flag not reset after descramble #202

Open scramblep opened 6 years ago

scramblep commented 6 years ago

I love mumudvb and the integration of scam with oscam. It works really good, but I have one problem: When the stream is descrambled it still has the "scrambled flag" set. This way programs handling the stream still think it is encrypted which sometimes creates problems. Is there an easy way to 0 this flag so the stream is seen as not scrambled after descrambling?

anphsw commented 6 years ago

Do you know how exactly we can do it? I see that we cannot know if stream is actually descrambled or not, we just can check if scam is received packet or not. What if we just mark all packets as descrambled around "ScramblingControl = (actual_ts_packet[3] & 0xc0) >> 6;" in mumudvb.c? I think this will confuse receivers too.

scramblep commented 6 years ago

I think that will work - my issue is that stream is flagged as scrambled even when it is not, then it keeps asking for cam even though it is not needed. By removing the flag it will work for me in this case.

braice commented 6 years ago

Hello

Can you give a try on the suggestion above and tell me if that works ?

Brice

2018-02-11 7:56 GMT-05:00 scramblep notifications@github.com:

I think that will work - my issue is that stream is flagged as scrambled even when it is not, then it keeps asking for cam even though it is not needed. By removing the flag it will work for me in this case.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/202#issuecomment-364749727, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUUD1DHV9aBA5PKplxOVv1B4smKUpmaks5tTuNwgaJpZM4Ry_KB .

scramblep commented 6 years ago

So I change this: ScramblingControl = (actual_ts_packet[3] & 0xc0) >> 6; to this: ScramblingControl = (actual_ts_packet[0] & 0xc0) >> 6; and recompile - or do I need to change anything else to mark the stream as unscrambled?

Thanks for the help - highly appreciated

P

anphsw commented 6 years ago

No, you must add right after ScramblingControl string: actual_ts_packet[3] &= ~0xc0;

or similar operation to clear scrambling bits.

braice commented 6 years ago

Hello

Where you able to try the above ? Is it working ?

Brice

2018-02-12 20:09 GMT-05:00 anphsw notifications@github.com:

No, you must add right after ScramblingControl string: actual_ts_packet[3] &= ~0xc0;

or similar operation to clear scrambling bits.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/202#issuecomment-365117535, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUUD6ZDJofqdoipLu1cEyX_8GdtyddXks5tUODUgaJpZM4Ry_KB .

scramblep commented 6 years ago

Hi sorry haven't gotten to it yet. Planning on this week.

P

-------- Original message -------- From: Brice Dubost notifications@github.com Date: 3/3/18 17:16 (GMT+01:00) To: braice/MuMuDVB MuMuDVB@noreply.github.com Cc: Petter Atle Walhovd petter@walhovd.no, Author author@noreply.github.com Subject: Re: [braice/MuMuDVB] TS scrambled flag not reset after descramble (#202)

Hello

Where you able to try the above ? Is it working ?

Brice

2018-02-12 20:09 GMT-05:00 anphsw notifications@github.com:

No, you must add right after ScramblingControl string: actual_ts_packet[3] &= ~0xc0;

or similar operation to clear scrambling bits.

- You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/202#issuecomment-365117535, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUUD6ZDJofqdoipLu1cEyX_8GdtyddXks5tUODUgaJpZM4Ry_KB .

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/braice/MuMuDVB/issues/202#issuecomment-370159365, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AiTwKLHWA43O1IbFYUiZfTTxx4Ho0wRmks5tasHQgaJpZM4Ry_KB.

scramblep commented 6 years ago

I tried some different versions like adding this second line below so the code looks like this:

ScramblingControl = (actual_ts_packet[3] & 0xc0) >> 6; actual_ts_packet[3] &= ~0xc0;

Will this result in zeroing out the two bit scramle identifier bits?

The change made mumudvb not descramble the packets at all, so I dont know if it is now identified as descrambled and therefore not descrambling or if there is something else that makes it not work. Commenting out the line makes mumudvb work like excepected again.

Any other ideas?

P

taojishou commented 5 years ago

when the stream is descrambled it still has "ca_descriptor" in the pmt ...

@braice
auto configuration mode

braice commented 5 years ago

Hello

After your investigation, what do you think is the best course of action here ?

Thank you

Brice

Le mer. 12 déc. 2018 à 00:17, taojishou notifications@github.com a écrit :

when the stream is descrambled it still has "ca_descriptor" in the pmt ...

@braice https://github.com/braice auto configuration mode

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/202#issuecomment-446465201, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUUD_tFyNeCxiYuwFnZKY7oufW9P-1aks5u4JGAgaJpZM4Ry_KB .