FAQ  •  Register  •  Login

Xbox 360, Aspect ratio and MPG files

<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Wed Oct 05, 2011 12:17 pm

Xbox 360, Aspect ratio and MPG files

First off - thank you for the great program! I, like many others have mentioned, have played around with other upnp and dlna compliant server software and none come close to serviio.

I currently have ripped many of my DVD collection to straight mpeg2 encoded mpg files (mpeg-ps). When I use my Xbox 360, it sees serviio just fine and decodes the video, but the aspect ratio is not correct - it looks like 4x3 anamorphic. I've search here and other forums but have not heard anyone else talking about the same issue with Xbox 360. If I change the aspect ratio on the TV, it "sort of" works - the video gets cut off on the sides (which makes me think the video being output by ffmpeg is not truely 4x3) I have a Sony BDP-370 which plays back wonderfully.

Is there anything I can look at or send you to help out? I've not touched profiles.xml, and I see that the video are being converted to wmv for the Xbox 360

Thanks again!

-M
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Oct 05, 2011 12:27 pm

Re: Xbox 360, Aspect ratio and MPG files

What is your TV models?

Could you post "ffmpeg -i" of your DVD-rip?

Could you enable detailed logging (see signature links), clean the log file, restart serviio service, start to stream the file to the Xboc, then look at the ffmpeg command line used by serviio (post result here)?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Wed Oct 05, 2011 2:14 pm

Re: Xbox 360, Aspect ratio and MPG files

The TV is a Sony LCD, all other video from the Xbox, cable box, or Sony BDP is output OK. I will post a follow up with the info you are looking for this evening (at work currently). Thank you in advance for the help!
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Wed Oct 05, 2011 11:12 pm

Re: Xbox 360, Aspect ratio and MPG files

OK - here's the info you requested. Let me know anything else you need to know. Thank you!

FFMPEG -i

ffmpeg version N-33195-gedf1a8e, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 1 2011 16:36:00 with gcc 4.6.1
configuration: --disable-static --enable-shared --enable-gpl --enable-version3
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --e
nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable
-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libsc
hroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-l
ibvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxa
vs --enable-libxvid --enable-zlib
libavutil 51. 18. 0 / 51. 18. 0
libavcodec 53. 19. 0 / 53. 19. 0
libavformat 53. 13. 0 / 53. 13. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpeg @ 00000000003AF950] max_analyze_duration 5000000 reached at 5021356

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/
1001) -> 59.94 (60000/1001)
Input #0, mpeg, from 'e:\_movies\2012\2012.mpg':
Duration: 02:37:48.83, start: 0.200000, bitrate: 2305 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DA
R 16:9], 9800 kb/s, 24.10 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s


LOG FILE SECTION

2011-10-05 18:00:26,776 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: E:\_movies\2012\2012.mpg
2011-10-05 18:00:26,777 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i E:\_movies\2012\2012.mpg -y -vcodec wmv2 -b 30000k -maxrate 30000k -bufsize 5097k -r 24000/1001 -g 15 -copyts -acodec wmav2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf D:\_temp\Serviio\transcoding-temp-435-ASF.stf
2011-10-05 18:00:27,277 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 2012.mpg: WMVMED_FULL
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Thu Oct 06, 2011 12:02 am

Re: Xbox 360, Aspect ratio and MPG files

A couple of screen shots. I ran the ffmpeg command the serviio runs and captured the output of both the original and converted files.
Attachments
2.jpg
Converted
2.jpg (61.86 KiB) Viewed 12689 times
1.jpg
Original
1.jpg (65.17 KiB) Viewed 12689 times
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Thu Oct 06, 2011 9:28 am

Re: Xbox 360, Aspect ratio and MPG files

Thanks, could you try locally the following command line in windows terminal (please provide the ffmpeg logging)
1-serviio original transcoding command line:
C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i "E:\_movies\2012\2012.mpg" -y -vcodec wmv2 -b 30000k -maxrate 30000k -bufsize 5097k -r 24000/1001 -g 15 -copyts -acodec wmav2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf "D:\_temp\Serviio\TEST-ASF.stf"

2- you could try adding aspect ratio 4/3 option like this:
C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i "E:\_movies\2012\2012.mpg" -y -vcodec wmv2 -b 30000k -maxrate 30000k -bufsize 5097k -r 24000/1001 -g 15 -vf "setdar=4:3" -copyts -acodec wmav2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf "D:\_temp\Serviio\TEST_4-3-ASF.stf"

3- you could try adding aspect ratio 16/9 option like this:
C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i "E:\_movies\2012\2012.mpg" -y -vcodec wmv2 -b 30000k -maxrate 30000k -bufsize 5097k -r 24000/1001 -g 15 -vf "setdar=16:9" -copyts -acodec wmav2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf "D:\_temp\Serviio\TEST_16-9-ASF.stf"

4-you could also add padding option like this
C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i "E:\_movies\2012\2012.mpg" -y -vcodec wmv2 -b 30000k -maxrate 30000k -bufsize 5097k -r 24000/1001 -g 15 -vf "scale=1280:1280/dar/sar","pad=1280:720:(ow-iw)/2:(oh-ih)/2:black","setdar=4:3" -copyts -acodec wmav2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf "D:\_temp\Serviio\TEST_Padding-ASF.stf"

You could then copy the output result files and add them to the serviio library and play them in native format with Serviio/Xbox.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Sat Oct 08, 2011 12:28 pm

Re: Xbox 360, Aspect ratio and MPG files

Thought I'd post back... I tried all the encoding option you listed below, thank you for all the help! - but they all turned out basically the same.

I did find a "sort of" solution though - in the forums under 3rd party tools in this post viewtopic.php?f=17&t=2069
there is a tool that changes the AspectX and AspectY of the header in the asf container. When you run the tool, it reports the header has not been set for those values. If you set it to 4:3 all works out just as it should and the video plays back as expected.

I'm looking into ffmpeg source right now to see why it does not set this, or if there is a way to set it - ffmpeg is pretty big :)

Also check out the discussion of the tool here: http://forum.doom9.org/showthread.php?t=116761

-M
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Sat Oct 08, 2011 1:22 pm

Re: Xbox 360, Aspect ratio and MPG files

A little more info. Seems to be a feature that is not currently being used in ffmpeg for encoding, though I did find the code for decoding (asfdec.c) :(

http://web.archiveorange.com/archive/v/ ... ydtlHh8Gbr

I took a look at the hex for a changed and unchanged file, using the tool in my last post, and it is pretty abusive :shock: though it works and it could be reproduced in serviio or a command line program.

This really sucks... it makes transcoding from mpg to wmv unusable for now. I'm tempted to write a work around hack to watch for WMV files being produced and change their headers :) I don't know enough C or ffmpeg to contribute to asfenc.c the correct code.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Oct 09, 2011 4:23 pm

Re: Xbox 360, Aspect ratio and MPG files

could you possibly create a 10 seconds mpeg2 video with this problem and upload it somewhere so that I can try reproducing it when I work on the PAR ticket?
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Mon Oct 10, 2011 1:15 pm

Re: Xbox 360, Aspect ratio and MPG files

Sure thing! I'll upload it tonight when I get home.

Thanks!
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Mon Oct 10, 2011 11:18 pm

Re: Xbox 360, Aspect ratio and MPG files

zip, here you go:

http://www.mediafire.com/?lt01h1u29fp63cs

I can upload more if needed. Thanks!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Oct 11, 2011 8:53 am

Re: Xbox 360, Aspect ratio and MPG files

thanks
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Oct 15, 2011 2:20 pm

Re: Xbox 360, Aspect ratio and MPG files

I need the original file, not the asf.
<<

retnutz

Serviio newbie

Posts: 9

Joined: Wed Oct 05, 2011 12:00 pm

Post Sun Oct 16, 2011 1:16 pm

Re: Xbox 360, Aspect ratio and MPG files

Shit... my mistake. Here you go:

http://www.mediafire.com/?tt74xpanz3xvc29

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 32 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.