CosyDVR icon indicating copy to clipboard operation
CosyDVR copied to clipboard

Front camera and portrait->landscape crop

Open BlueMax opened this issue 9 years ago • 3 comments

Hi, can you add front camera support and (if possible) an option to smart convert portrait recordings (eg. when having phone in breast pocket). The smart convert would convert (crop) a video from 1080x1920 to 1080x608 (16:9) or similar. I think i've seen such a recorder already somewhere that does that in realtime (postprocessing wouldn't make sense as there are enough tools already doing this).

What do you think?

BlueMax avatar Aug 16 '15 12:08 BlueMax

You think about autorotation or settings in preferenses dialog?

sergstetsuk avatar Aug 19 '15 10:08 sergstetsuk

New settings (feature requests).

Autorotation wouldn't help as we want to convert a portrait oriented video (9:16) to landscape orientation (16:9). For this we must crop/delete top and bottom part of the picture. Then we can watch a portrait recorded video on landscape fullscreen without letterboxes (black borders).

Front camera support is probably easy but I'm not sure if that video processing (cropping) is possible. Maybe these links are helpful: http://stackoverflow.com/questions/8601982/is-it-possible-to-crop-camera-preview https://source.android.com/devices/camera/camera3_crop_reprocess.html

Some approaches come into my mind:

  1. Full h/w processing (cropping by api. Camera2 api?)
  2. Partial h/w (h/w decode or direct raw stream -> s/w crop (ffmpeg?) -> h/w encode)

BlueMax avatar Aug 19 '15 12:08 BlueMax

Apps that already use this are:

  • SCR Pro (freely available on XDA). There it's called '1080p horizontal'.
  • Horizon Cam (Playstore free/paid). It allows flexible size and rotation of the view in real-time with gyroscope. We only need simple/fixed 90′ rotation though.

The apps are GPU accelerated that is a good thing. I hope you find it useful as well and consider implementing it. This way you can put your device in the pocket (horizontally) and walk through the streets. :-)

BlueMax avatar Aug 26 '15 10:08 BlueMax