About Hyeseon

Hyeseon's walkthrough

A real-time recording and DVR app for Android


About the Project

The client wanted to see and/or repeat an old highlight which he would frequently miss during a baseball game, and requested the development of a DVR-capable proof-of-concept real-time camcorder app. To satisfy the request, I developed an "instant replay"-like camcorder app for an Android device.

Implementation of Core Functionalities

Since the app should use the device space conservatively while continuously recording, the max recording time should match the max return time (in this case, 1 hour). Also, to prevent the issue in which playback would be interfered by recording, each file should be small enough (in this case, 5-minute-long).

During the process, the frames being recorded must not be dropped. Instead, leftover frames from previous videos must be transiently recorded to the next video. Therefore, I needed to segregate the recording process and the transcoding process. For that, RootEncoder suited my purpose better than methods which other camera apps use. I modified it such that a local file could instead be used for that library.

However, what proved to be a real challenge was showing old recordings real-time. A naive thought on this problem would be exposing a media player and changing the underlying file when playing one file ends. However, doing this on Android's vanilla media player proved to cause stuttering and desync. After multiple attempts, ExoPlayer proved to suit our purpose. Also, for accurate playback, the recording timestamp is fed back to the player not to lose the sub-video granularity of the timestamp.

Problem Solving

For implementing the dual-camera feature, I initially thought of opening two cameras simultaneously, but this caused some problem on the client's device. The client's device did not support recording from two cameras at once, thus I instead decided to change the camera during the recording if the dual recording is unsupported. Although this interferes with the DVR feature, this was an unfortunate limitation coming from low-cost Android devices.

이미지 자료

Fig. 1 - The user interface of the resultant software. At the bottom, the DVR user interface is toggle-button-oriented as the client requested.

Contribution and Information

  • Period of Development: 11/2022 ~ 12/2022
  • Total Participants: alone
  • My Roles: entire design and development
  • Used Tech Stacks: Java for Android

I cannot provide the actual software and/or the entire source code due to the NDA.