zaboron 0 Posted April 20, 2020 Share Posted April 20, 2020 Hi lately I have been using emby to watch downloaded instagram videos. They're all filmed in portrait orientation and I'd like to play them back that same way. Unfortunately emby always automatically flips to landscape mode during playback, making them super tiny. Can you make this a bit smarter please? Link to comment Share on other sites More sharing options...
rbjtech 4357 Posted April 20, 2020 Share Posted April 20, 2020 (edited) The issue is the original recordings are incorrect - emby is simply reading the media header and doing what it does with all the other media and orientating it correctly. ie Emby IS being smart You can edit the header in the source file and trick it to become portrait, but I doubt you'll want to do that for every video you download. ffmpeg.exe" -i landscape.mp4 -map_metadata 0 -metadata:s:v rotate="90" -codec copy portrait.mp4 .. will rotate the video 90 degrees without re-encoding it. Edited April 20, 2020 by rbjtech Link to comment Share on other sites More sharing options...
zaboron 0 Posted April 20, 2020 Author Share Posted April 20, 2020 (edited) The issue is the original recordings are incorrect - emby is simply reading the media header and doing what it does with all the other media and orientating it correctly. ie Emby IS being smart You can edit the header in the source file and trick it to become portrait, but I doubt you'll want to do that for every video you download. ffmpeg.exe" -i landscape.mp4 -map_metadata 0 -metadata:s:v rotate="90" -codec copy portrait.mp4 .. will rotate the video 90 degrees without re-encoding it. are you sure? here is the media info: info +----[ Stream 0 ] | | Codec: H264 - MPEG-4 AVC (part 10) (avc1) | Type: Video | Video resolution: 504x896 | Buffer dimensions: 512x896 | Frame rate: 30 | Decoded format: | Orientation: Top left | Chroma location: Left | +----[ Stream 1 ] | | Codec: MPEG AAC Audio (mp4a) | Type: Audio | Channels: Stereo | Sample rate: 44100 Hz | Bits per sample: 32 | AAC extension: SBR | +----[ end of stream info ] it seems the media header is correct and emby is being dumb. Edited April 20, 2020 by zaboron Link to comment Share on other sites More sharing options...
rbjtech 4357 Posted April 20, 2020 Share Posted April 20, 2020 hmm ok - perhaps the Android app is ignoring the orientation flag - we need @@ebr to comment here as I only tested the above in a web browser. What is the orientation for standard landscape media use in comparison ? Link to comment Share on other sites More sharing options...
zaboron 0 Posted April 20, 2020 Author Share Posted April 20, 2020 hmm ok - perhaps the Android app is ignoring the orientation flag - we need @@ebr to comment here as I only tested the above in a web browser. What is the orientation for standard landscape media use in comparison ? landscape media is played correctly in landscape orientation Link to comment Share on other sites More sharing options...
rbjtech 4357 Posted April 20, 2020 Share Posted April 20, 2020 landscape media is played correctly in landscape orientation "Orientation: Top left" Is this the same for landscape media ? Link to comment Share on other sites More sharing options...
zaboron 0 Posted April 20, 2020 Author Share Posted April 20, 2020 yeah | Codec: H264 - MPEG-4 AVC (part 10) (avc1) | Type: Video | Video resolution: 1920x960 | Buffer dimensions: 1920x960 | Frame rate: 23.976216 | Decoded format: | Orientation: Top left | Color primaries: ITU-R BT.709 | Color transfer function: ITU-R BT.709 | Color space: ITU-R BT.709 Range | Chroma location: Left Link to comment Share on other sites More sharing options...
zaboron 0 Posted April 20, 2020 Author Share Posted April 20, 2020 the emby android mobile app simply always uses landscape orientation and tries to fit the video as good as it can into that. of course a portrait oriented video fits much better into a portrait orientation. Unfortunately there is no way to switch between the orientation mode in emby's video playback. Link to comment Share on other sites More sharing options...
rbjtech 4357 Posted April 20, 2020 Share Posted April 20, 2020 yeah | Codec: H264 - MPEG-4 AVC (part 10) (avc1) | Type: Video | Video resolution: 1920x960 | Buffer dimensions: 1920x960 | Frame rate: 23.976216 | Decoded format: | Orientation: Top left | Color primaries: ITU-R BT.709 | Color transfer function: ITU-R BT.709 | Color space: ITU-R BT.709 Range | Chroma location: Left ok - so this is exactly my point. How do you expect emby to magically know that this particular video is an 'instagram' video and should be played portrait - when it has been 'told' to play landscape ? I can get a video to play in emby web in any orientation I choose using the ffmpeg rotate function - I'm going to try it in the android player to see if it works via that player as I'm now curious .. Link to comment Share on other sites More sharing options...
zaboron 0 Posted April 20, 2020 Author Share Posted April 20, 2020 ok - so this is exactly my point. How do you expect emby to magically know that this particular video is an 'instagram' video and should be played portrait - when it has been 'told' to play landscape ? I can get a video to play in emby web in any orientation I choose using the ffmpeg rotate function - I'm going to try it in the android player to see if it works via that player as I'm now curious .. I don't want emby to magically know how to play the video, I want myself to be able to tell emby in what orientation to play a video. Link to comment Share on other sites More sharing options...
rbjtech 4357 Posted April 20, 2020 Share Posted April 20, 2020 (edited) ok - so this is exactly my point. How do you expect emby to magically know that this particular video is an 'instagram' video and should be played portrait - when it has been 'told' to play landscape ? I can get a video to play in emby web in any orientation I choose using the ffmpeg rotate function - I'm going to try it in the android player to see if it works via that player as I'm now curious .. This works perfectly well - I just tried it on my android phone .. ? I just added another version of the same file - phone held in portrait. original copy - as expected, emby flips the video to play in landscape, meaning I need to now hold the phone in landscape. modified version - as expected, emby flips the video to play in landscape, but as it is now already the correct orientation, I do not need to hold the phone in landscape. Yes, this is a workaround but it works. Maybe suggest this as an option in the suggestion thread - possibly a 'per library' option but it would only work for transcoded (ffmpeg'd) streams I think. Edited April 20, 2020 by rbjtech Link to comment Share on other sites More sharing options...
Luke 37335 Posted April 24, 2023 Share Posted April 24, 2023 Hi, this will be in the next update to Emby for Android. Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now