Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/rtmp stream screen #79

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
Open

Feature/rtmp stream screen #79

wants to merge 13 commits into from

Conversation

omouren
Copy link
Collaborator

@omouren omouren commented May 31, 2021

WIP
An other approach for the RTMP stream by recording the entire screen.
Previous PR : #75

Advantage of a full screen recording : simpler in code, handled natively by Android (MediaProjection), can continue to stream without the video (during a lipo switch for exemple)
Disadvantage : it records all the screen in background, even when you switch to an other app or receive a notification, it's not a direct video from USB streaming.

Made some refactor with the overlay/buttons/watermark display/hide
+ Some wording update for french translations (#80)

If someone can make an icon for a "start live" and "stop live" button maybe? You're welcome!

Todo :

  • We should find a way to keep a preview of the video stream Not a problem here
  • Add RTMP settings : RTMP URL / Key - Output resolution / Bitrate / FPS
  • Add buttons to start/stop stream
  • Handle RTMP server error (show in Toast)
  • RTMP basic auth settings
  • Audio source? From microphone or internal audio (internal audio option ONLY from API 29)
  • Mute audio button
  • Show some streaming stats (bitrate/fps) ? (Bitrate added)
  • New "start live" and "stop live" icons ?

@omouren omouren self-assigned this May 31, 2021
@jlucidar
Copy link
Member

Actually, I think it can be a better solution than direct stream from the socket, as you mentionned, we don't want the stream to cut on lipo changes, or goggle disconnections, even more if we add mic audio to the stream !

Maybe adding an option to display front cam / back cam in the bottom left corner, would be great (then you have like a real stream app feature !)

I will review the code tomorrow ^^

Copy link
Member

@jlucidar jlucidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if you can review #73 , As we had different approach to the same problems ^^ I'd like to have your input on this.
Great work btw, I will test all of this tonight :)

});
}

private void hideFullOverlay() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to conflict with some of my work on refacto branch. We should discuss how to handle overlay in a better way, having all the logic in the main activity is kind of a pain...

@@ -376,7 +397,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
boolean dataCollectionAccepted = preferences.getBoolean("dataCollectionAccepted", false);

if (requestCode == 1) { // Data Collection agreement Activity
if (requestCode == DATA_COLLECTION_AGREEMENT) { // Data Collection agreement Activity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will also be removed by #73 to follow API30 new guidelines.

app/src/main/java/com/fpvout/digiview/MainActivity.java Outdated Show resolved Hide resolved
app/src/main/res/values-fr/strings.xml Outdated Show resolved Hide resolved
@omouren omouren force-pushed the feature/rtmp-stream-screen branch from 9b1af78 to 3f7d9a5 Compare June 1, 2021 16:54
@omouren
Copy link
Collaborator Author

omouren commented Jun 1, 2021

Actually, I think it can be a better solution than direct stream from the socket, as you mentionned, we don't want the stream to cut on lipo changes, or goggle disconnections, even more if we add mic audio to the stream !

Maybe adding an option to display front cam / back cam in the bottom left corner, would be great (then you have like a real stream app feature !)

I will review the code tomorrow ^^

I had the same idea for the camera, I think it would be a nice to have!

@jlucidar
Copy link
Member

jlucidar commented Jun 1, 2021 via email

@omouren
Copy link
Collaborator Author

omouren commented Jun 1, 2021

Screenshot_20210601-214921
Screenshot_20210601-214727

@jlucidar
Copy link
Member

jlucidar commented Jun 1, 2021

Cool ! Would be neat to add the stat as requested by #44 . will work for now, but I think it will look better :)

@omouren omouren force-pushed the feature/rtmp-stream-screen branch from ea0656e to c87fce6 Compare June 2, 2021 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants