Mediafile video properties
See original GitHub issueHi, 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:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it is a known issue on Android.
Looks like SimpleExoPlayerView has a method called setResizeMode that we could possibly leverage?