DigiView-Android icon indicating copy to clipboard operation
DigiView-Android copied to clipboard

DVR

Open shambler123 opened this issue 4 years ago • 4 comments

this is a first version of a dvr recording with button and ambient audio. this will be updated soon

shambler123 avatar May 22 '21 00:05 shambler123

Hey, I'm working on merging this with dev branch. It looks great ! I just need to make a few minor fixes before pushing it :

  • better handling of the "gallery button" (I'd like to see if opening the gallery instead of last video look better)
  • bugfix : record file of more than 2Gb make the app crash. (due to the h264 muxer processing that happen in memory... I will check if I can do it in an other way or if we have to "cut" h264 file before the 2Gb limit)

I will add more to the list if I encounter other things in the way.

jlucidar avatar Dec 01 '21 19:12 jlucidar

@jlucidar Any progress on merging this? I'm interested in using it. There are other apps similarly that have DVR, but this one has the best video latency.

Also, is there a way to not grant microphone privilege and still record? I did a quick pull and rebuild with commenting out the line recorder.setAudioSource(MediaRecorder.AudioSource.MIC);, but it still breaks.

I also am getting an issue where it crashes on stopping the recording. I'm unable to have adb and the goggles connected at the same time to help debug.

robertsmd avatar Oct 08 '22 19:10 robertsmd

Hi @robertsmd, Haven't got the time to work on this project for a long time. Most of the work done of the DVR was not done by myself so I might not be the best to answer your questions but I'll try to help :

  • The main issue I see before finishing the merge is that the video is only encoded when you stop recording. And it does it by loading the whole unencoded h264 file in memory. This is quite annoying on cheap devices with not a lot of memory, causing the app to crash and never start again (because we try to reencode the file if it was not done properly on the last ending). Maybe we can check how other people resolved this problem and find a similar way to achieve it.
  • According to the documentation, you should be able to just comment this line + recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); https://developer.android.com/reference/android/media/MediaRecorder#setAudioSource(int) (I would add this to the option page so it would be configurable)
  • If you want adb, you can use it over your network by opening a remote session. (I usually do this so I can see what happened when playing with usb stuff) : from your command line with usb connected to your device :
adb tcpip TCP_PORT
adb connect DEVICE_IP_ADDRESS:TCP_PORT

jlucidar avatar Oct 09 '22 10:10 jlucidar

I had not had the time to complete the implementation as @jlucidar said it there are some issues that needs to be resolved first.

shambler123 avatar Oct 09 '22 16:10 shambler123