Jump to content

Video Playback - Wrong Aspect Ratio


gcoupe
Go to solution Solved by ScottIsAFool,

Recommended Posts

When I play recorded TV shows via the Windows 8 MediaBrowser client, they play back with the correct 16:9 ratio. However, when I play the same video files on my WP8 phone (Nokia Lumia 1020), the image is squeezed into a narrower ratio.

 

MediaBrowser tells me that the recorded video files are: Video:mpeg2video • 720x576 • 16:9 • 4851 kbps

 

It seems as though on WP8, the aspect ratio flag of 16:9 is being ignored, and the files are being played simply at 720x576 ratio.

 

This looks like a bug to me.

Link to comment
Share on other sites

ScottIsAFool

Ok, thanks, will investigate. Could you email me the logs from the app, and the ffmpeg logs when you've tried playing one of these video files please, thanks.

Link to comment
Share on other sites

Er, sorry, I'm new here. How can I attach log files to a message I send you through this forum? The message editor doesn't seem to offer an option for attaching files...

 

Also, I have the server log ready to send, but on the WP8 client, while there's an "email logs" option in the Settings, it doesn't appear to do anything.

 

Thanks.

Link to comment
Share on other sites

ScottIsAFool

Also, I have the server log ready to send, but on the WP8 client, while there's an "email logs" option in the Settings, it doesn't appear to do anything.

Can you clear the logs, try playing the video again, then try sending them.

Link to comment
Share on other sites

Sorry Scott wrong information from me. The original file is 720x576 (sample aspect 5:4 display aspect 16:9 ) the conversion is to 640 x 480 (4:3)

 

to correct the aspect for files like this the width requested 640 should request a height of 640/(16/9)= 361 (but has to be rounded to 362 for h264)

 

I am not sure if you are requesting width, height or maxwidth, maxheight (or one of them)

Edited by Tikuf
Link to comment
Share on other sites

  • 2 weeks later...
ScottIsAFool

Nothing to report at the moment, been quite busy with work lately and haven't been able to spend as much time on this as I'd like. I will get to it though.

Link to comment
Share on other sites

Nothing to report at the moment, been quite busy with work lately and haven't been able to spend as much time on this as I'd like. I will get to it though.

 

OK. Thanks for keeping it on the list.

Link to comment
Share on other sites

  • 1 month later...
Viktikus

I have developed transcoding using VLC and SD TV broadcast (720x576) needs to be as follows.. I'm resizing resolution to 640x360. This is VLC command line for 16:9

...width=640,height=360,vfilter="canvas{width=640,height=360}"...

The canvas does the trick.

Edited by Viktikus
Link to comment
Share on other sites

  • 1 month later...
Viktikus

Using the latest on both Windows client and Server (2014-04-30) but with 16:9 .ts files (mpeg2) aspect ratio on the windows phone client is wrong. It's 4:3 shrinked. Can there be a button like many other players where to choose what ascpect ratio to use?

Link to comment
Share on other sites

ScottIsAFool

Is this only for recorded tv? Do other types of tv show correctly?

Link to comment
Share on other sites

gcoupe

These are TV shows recorded from my Satellite receiver (SAB Titan 1) on to an attached hard drive, and then transferred, unchanged, onto my WHS 2011 system. The files have the .ts extension, but as I stated in my OP, they have the format and metadata: Video:mpeg2video • 720x576 • 16:9 • 4851 kbps

 

It seems as though on WP8, the aspect ratio flag of 16:9 is being ignored, and the files are being played simply at 720x576 ratio.

 

When played back in a browser, the W8 App, or Windows Media Player, the aspect ratio flag of 16:9 is being respected, but not in the WP8 App. Here's the WMP for example:

 

53615afa4f8fa_MB3WP03.png

Link to comment
Share on other sites

gcoupe

Yep - I've now got version 8.0.60.0 of the App installed - and it is still showing 4:3 aspect ratio instead of 16:9 for my recorded TV media...

Link to comment
Share on other sites

Viktikus

With VLC 1.1.5 I transcode "Video:mpeg2video • 720x576 • 16:9" with

VLC.exe -I dummy --audio-language=en --sub-language=en http://192.168.0.251:8001/1:0:1:11:3:F:FFFF0000:0:0:0: 
--no-sout-transcode-hurry-up --sout-mux-caching=4000 --network-caching=4000 
--sout="#transcode{threads=auto,deinterlace,aenc=ffmpeg{aac-profile=low},
ab=96,samplerate=44100,channels=2,acodec=mp4a,audio-sync,vcodec=h264,width=640,
height=360,vfilter="canvas{width=640,height=360}",fps=25,scale=1,vb=672,
venc=x264{keyint=250,preset=veryfast,level=-1,profile=baseline,cabac,slices=8,
qcomp=0.4,vbv-maxrate=672,vbv-bufsize=336}}:std{access=http{mime=video/mp4},
mux=ffmpeg{mux=flv},dst=:554/video.mp4}"

IF somehow video is 4:3, I use

VLC.exe -I dummy --audio-language=en --sub-language=en
http://192.168.0.251:8001/1:0:1:11:3:F:FFFF0000:0:0:0: --no-sout-transcode-hurry-up 
--sout-mux-caching=4000 --network-caching=4000 --sout="#transcode{threads=auto,
deinterlace,aenc=ffmpeg{aac-profile=low},ab=96,samplerate=44100,channels=2,
acodec=mp4a,audio-sync,vcodec=h264,width=480,height=360,vfilter="canvas{width=640,
height=360}",fps=25,scale=1,vb=672,venc=x264{keyint=250,preset=veryfast,level=-1,
profile=baseline,cabac,slices=8,qcomp=0.4,vbv-maxrate=672,vbv-bufsize=336}}:
std{access=http{mime=video/mp4},mux=ffmpeg{mux=flv},dst=:554/video.mp4}"

With this Calculus, I get the X-resolution for 16:9 or 4:3

$TRANSCODE_VIDEO_WIDTH = 640;
$actualVideoWidth = null;

if ($asrat=="4:3") 
    $actualVideoWidth =  round($TRANSCODE_VIDEO_WIDTH* (pow(1.333, -1))) ; // will result 480
else if ($asrat=="16:9")
     $actualVideoWidth = $TRANSCODE_VIDEO_WIDTH;

so the CANVAS is always the same, video encoding x-reso changes..

 

THIS only a sample how I have resolved this problem with VLC. FFMPEG is not so different?

Subtitle and Audio selection are there aswell, that is missing from current MediaBrowser Windows Phone Client.

Edited by Viktikus
Link to comment
Share on other sites

  • Solution
ScottIsAFool

We've identified the problem and this will be fixed in the next release of the *server* not the WP app.

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...