Android cast playing a video with custom encryptionIs there a way to run Python on Android?How do save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?What is 'Context' on Android?Android: Play video from file bufferProper use cases for Android UserManager.isUserAGoat()?Play video from ByteArrayOutputStream on androidPlaying Encrypted audiobook mp3 android and ios
Any examples of liquids volatile at room temp but non-flammable?
When an imagined world resembles or has similarities with a famous world
Why am I receiving the identity insert error even after explicitly setting IDENTITY_INSERT ON and using a column list?
When does tabularx decide to break the cell entry instead of reducing the columns separation?
Will 700 more planes a day fly because of the Heathrow expansion?
ListPointPlot3D filling between two lists
What is the closest airport to the center of the city it serves?
Which US defense organization would respond to an invasion like this?
Python 3 - simple temperature program
What to use instead of cling film to wrap pastry
How long would it take for people to notice a mass disappearance?
What was the first story to feature the plot "the monsters were human all along"?
Would a small hole in a Faraday cage drastically reduce its effectiveness at blocking interference?
Which sphere is fastest?
Why didn't this character get a funeral at the end of Avengers: Endgame?
Is Soreness in Middle Knuckle of Fretting Hand Index Finger Normal for Beginners?
Why symmetry transformations have to commute with Hamiltonian?
Is disk brake effectiveness mitigated by tyres losing traction under strong braking?
Has the United States ever had a non-Christian President?
How can Internet speed be 10 times slower without a router than when using the same connection with a router?
Is an HNN extension of a virtually torsion-free group virtually torsion-free?
Checking if two expressions are related
Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?
As a GM, is it bad form to ask for a moment to think when improvising?
Android cast playing a video with custom encryption
Is there a way to run Python on Android?How do save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?What is 'Context' on Android?Android: Play video from file bufferProper use cases for Android UserManager.isUserAGoat()?Play video from ByteArrayOutputStream on androidPlaying Encrypted audiobook mp3 android and ios
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have an android app that plays some video content. The video is mp4 with some simple custom encryption.
In android the player (ExoPlayer) decrypts the video in real time while playing.
It uses a code like this:
// overriding the function that reads the video file to insert the decryption
public int read(byte[] buffer, int offset, int readLength) throws FileDataSourceException
// ...
// buffer[] holds the video bits, decrypt them here
buffer[offset] = (byte)(buffer[offset] ^ 1234);
// ...
}
I now want to add support for Chrome cast - to be able to stream the video from a mobile phone to tv.
However looking at the api I cannot see a way to implement my decryption algorithm.
From what I see it supports either unencrypted videos or videos with some standard DRM.
Is it possible to implement a custom encryption, similar to the code above?
android chromecast drm
|
show 3 more comments
I have an android app that plays some video content. The video is mp4 with some simple custom encryption.
In android the player (ExoPlayer) decrypts the video in real time while playing.
It uses a code like this:
// overriding the function that reads the video file to insert the decryption
public int read(byte[] buffer, int offset, int readLength) throws FileDataSourceException
// ...
// buffer[] holds the video bits, decrypt them here
buffer[offset] = (byte)(buffer[offset] ^ 1234);
// ...
}
I now want to add support for Chrome cast - to be able to stream the video from a mobile phone to tv.
However looking at the api I cannot see a way to implement my decryption algorithm.
From what I see it supports either unencrypted videos or videos with some standard DRM.
Is it possible to implement a custom encryption, similar to the code above?
android chromecast drm
1
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07
|
show 3 more comments
I have an android app that plays some video content. The video is mp4 with some simple custom encryption.
In android the player (ExoPlayer) decrypts the video in real time while playing.
It uses a code like this:
// overriding the function that reads the video file to insert the decryption
public int read(byte[] buffer, int offset, int readLength) throws FileDataSourceException
// ...
// buffer[] holds the video bits, decrypt them here
buffer[offset] = (byte)(buffer[offset] ^ 1234);
// ...
}
I now want to add support for Chrome cast - to be able to stream the video from a mobile phone to tv.
However looking at the api I cannot see a way to implement my decryption algorithm.
From what I see it supports either unencrypted videos or videos with some standard DRM.
Is it possible to implement a custom encryption, similar to the code above?
android chromecast drm
I have an android app that plays some video content. The video is mp4 with some simple custom encryption.
In android the player (ExoPlayer) decrypts the video in real time while playing.
It uses a code like this:
// overriding the function that reads the video file to insert the decryption
public int read(byte[] buffer, int offset, int readLength) throws FileDataSourceException
// ...
// buffer[] holds the video bits, decrypt them here
buffer[offset] = (byte)(buffer[offset] ^ 1234);
// ...
}
I now want to add support for Chrome cast - to be able to stream the video from a mobile phone to tv.
However looking at the api I cannot see a way to implement my decryption algorithm.
From what I see it supports either unencrypted videos or videos with some standard DRM.
Is it possible to implement a custom encryption, similar to the code above?
android chromecast drm
android chromecast drm
edited Mar 22 at 9:30
Lacho Tomov
asked Mar 21 at 8:01
Lacho TomovLacho Tomov
1,2261524
1,2261524
1
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07
|
show 3 more comments
1
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07
1
1
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07
|
show 3 more comments
1 Answer
1
active
oldest
votes
The new CAF framework provides three different options:
- Styled Media Receiver
- Custom Receiver
- Default Media Receiver
The only one which supports DRM is the custom receiver and as you say it is designed for the standard DRM's.
However it should support CENC clear key which may be enough protection for your needs and will allow you avoid using a DRM service.
CENC clear key has the key in the clear as the name suggests. It is not very secure but it may be enough of a 'hurdle' (which is essentially what most security systems are) for you anyway.
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55275971%2fandroid-cast-playing-a-video-with-custom-encryption%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The new CAF framework provides three different options:
- Styled Media Receiver
- Custom Receiver
- Default Media Receiver
The only one which supports DRM is the custom receiver and as you say it is designed for the standard DRM's.
However it should support CENC clear key which may be enough protection for your needs and will allow you avoid using a DRM service.
CENC clear key has the key in the clear as the name suggests. It is not very secure but it may be enough of a 'hurdle' (which is essentially what most security systems are) for you anyway.
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
add a comment |
The new CAF framework provides three different options:
- Styled Media Receiver
- Custom Receiver
- Default Media Receiver
The only one which supports DRM is the custom receiver and as you say it is designed for the standard DRM's.
However it should support CENC clear key which may be enough protection for your needs and will allow you avoid using a DRM service.
CENC clear key has the key in the clear as the name suggests. It is not very secure but it may be enough of a 'hurdle' (which is essentially what most security systems are) for you anyway.
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
add a comment |
The new CAF framework provides three different options:
- Styled Media Receiver
- Custom Receiver
- Default Media Receiver
The only one which supports DRM is the custom receiver and as you say it is designed for the standard DRM's.
However it should support CENC clear key which may be enough protection for your needs and will allow you avoid using a DRM service.
CENC clear key has the key in the clear as the name suggests. It is not very secure but it may be enough of a 'hurdle' (which is essentially what most security systems are) for you anyway.
The new CAF framework provides three different options:
- Styled Media Receiver
- Custom Receiver
- Default Media Receiver
The only one which supports DRM is the custom receiver and as you say it is designed for the standard DRM's.
However it should support CENC clear key which may be enough protection for your needs and will allow you avoid using a DRM service.
CENC clear key has the key in the clear as the name suggests. It is not very secure but it may be enough of a 'hurdle' (which is essentially what most security systems are) for you anyway.
edited Mar 25 at 10:42
answered Mar 22 at 10:58
MickMick
12.7k12464
12.7k12464
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
add a comment |
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
CENC sounds like a good option, I'll investigate it deeper. Thanks!
– Lacho Tomov
Mar 22 at 11:34
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55275971%2fandroid-cast-playing-a-video-with-custom-encryption%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
If your looking for DRM of Chromecast support, there is an available blogpost about the support of DRM encryption on the ChocoTv. This will let Chromecast support HLS AES-128 encryption for Android Platform. Check this site for more details.
– jess
Mar 22 at 9:23
@jess thanks, I'll take a look. I was hoping to avoid using the standard encryption/drm algorithms and go with something simple as shown in the code above (i just added it). But it looks like I may need to go this way.
– Lacho Tomov
Mar 22 at 9:34
If you're looking for actual security, unless you have a PHD in math, give up on the idea of writing anything yourself. The difficulty in writing an effective encryption mechanism is immense.
– Gabe Sechan
Mar 23 at 0:50
@GabeSechan actually implementing something simple like XOR encryption is quite easy and it will guard against 99% of the attackers. The remaining 1% will break it, but they will break your DRM encryption as well, so in many cases it's not worth the time and effort.
– Lacho Tomov
Mar 23 at 15:12
No, it isn't. While a otp is unbreakable if not reused, you will be reusing it constantly, and you aren't even thinking about key exchange. You aren't actually giving it any real security, just the veneer of it. And if you think anyone is breaking aes outside the NSA, you're insane. Just use an existing algorithm and a library for it (to minimize your chance of worrying a side channel attack)
– Gabe Sechan
Mar 23 at 16:07