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

Front camera and portrait->landscape crop #21

Open
BlueMax opened this issue Aug 16, 2015 · 3 comments
Open

Front camera and portrait->landscape crop #21

BlueMax opened this issue Aug 16, 2015 · 3 comments

Comments

@BlueMax
Copy link

BlueMax commented Aug 16, 2015

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?

@sergstetsuk
Copy link
Owner

You think about autorotation or settings in preferenses dialog?

@BlueMax
Copy link
Author

BlueMax commented Aug 19, 2015

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
Copy link
Author

BlueMax commented Aug 26, 2015

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. :-)

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

No branches or pull requests

2 participants