LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

change the aspect ratio

Open lee-ngeap opened this issue 4 years ago • 3 comments

Hi How to change the aspect ratio for the portrait mode instead of using rotation tag?

lee-ngeap avatar Jul 27 '21 13:07 lee-ngeap

I think you should be able to do this by configuring a target video (for example 720 wide, 1280 high , rotation 0) and by using a DefaultVideoFrameRenderFilter with a Transform to correctly rotate and place your source frame inside the target frame.

izzytwosheds avatar Jul 27 '21 14:07 izzytwosheds

Hi izzy;

the sugeestion working good; however the aspect ratio is still the same 16:9. It change only from 1280x720 to 720x1820. what I'd like is changed from 16:9 to 9:16 since the apple HLS doe support only aspect ratio. I'd like to have it played in portraid mode Please see the link below.

http://streaming.snapkyu.com:1935/redirect/snapkyu_stagging/definst/mp4:amazons3_stagging/1627812293-610671c525a9f.mp4?scheme=m3u8

or Can you please suggest me something? we're using exo player.

@izzytwosheds

lee-ngeap avatar Aug 03 '21 00:08 lee-ngeap

I am assuming you guys are doing some sort of processing on a backend to create HLS playlist/segments? LiTr can't transcode into HLS. You should be able to resize (and change bitrate) the video on-device using LiTr and then have your backend create HLS segments compatible with ExoPlayer. I presume, backend uses ffmpeg which is more powerful and flexible than LiTr.

izzytwosheds avatar Aug 09 '21 16:08 izzytwosheds