question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mediafile video properties

See original GitHub issue

Hi, does exist a way to get video width/height properties from a url stream? I’m using this library in my Xamarin Forms project, and when i set in VideoView horizontal/vertical options to “FillAndExpand” (AspectMode=“AspectFill”), video get stretched to max width/height of my Android device in portrait mode. Video is this streaming url: http://fms.105.net:1935/live/rmc1/playlist.m3u8 Thank you & sorry if this feature is already implemented.

UPDATE: I noticed same xaml (Xamarin Forms) in UWP app works correctly: aspect ratio video is ok even if screen height is greater than screen width (“portrait mode” in UWP).

My code is: Xaml Page

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:CocoTV"
             xmlns:forms="clr-namespace:Plugin.MediaManager.Forms;assembly=Plugin.MediaManager.Forms"
             x:Class="CocoTV.MainPage">
    <ContentPage.Content>
        <forms:VideoView x:Name="videoView"
        HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                     AspectMode="AspectFill"/>
    </ContentPage.Content>
</ContentPage>

.cs page

namespace CocoTV
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();

            videoView.Source = "http://fms.105.net:1935/live/rmc1/playlist.m3u8";
            CrossMediaManager.Current.PlaybackController.Play();
        }
    }
}

Lewix

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mike-rowleycommented, Nov 15, 2017

Yes, it is a known issue on Android.

0reactions
adrianknight89commented, May 20, 2018

Looks like SimpleExoPlayerView has a method called setResizeMode that we could possibly leverage?

Read more comments on GitHub >

github_iconTop Results From Across the Web

See detailed properties and tags/metadata info about ...
Right click any media file(s) whose details you want to see and click Properties. Alternatively, you can also select one or more files...
Read more >
Metadata Properties for Media Files - Win32 apps
PROPERTYKEY Shell Name Data Type MFPKEY_Content_DLNA_Profile_ID None VT_LPWSTR PKEY_Audio_ChannelCount System.Audio.ChannelCount VT_UI4 PKEY_Audio_EncodingBitrate System.Audio.EncodingBitrate VT_UI4
Read more >
mediafile: Media File Metadata Utilities
The mediafile package provides utilities for dealing with collections of media files (still image, audio, video) and the metadata properties of those files....
Read more >
MediaInfo
MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files.
Read more >
To Set Media File Properties
To Set Media File Properties ; Press On-Air Properties > Base. ; In the Video area, press Unshaped or Shaped to set how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found