PDA

View Full Version : Fully equipped player for MP4 files?


kypec
23rd June 2009, 09:28
Recently I begun to encode my DVD's to H.264+AAC embedded in MP4 container. The problem is I can't play back those files with all the advanced features I was looking forward to compared to my older AVIs (Xvid+MP3).
Quick summary:
video = H.264, 640x512 (PAR set to 64:45 during x264 encoding process in order to obtain proper DAR 16:9)
audio 1 = LC-AAC, 5.1 ~199kbps, (English langID set)
audio 2 = LC-AAC, 5.1 ~197kbps, (Czech langID set)
chapters = OGG format from DVD Decrypter
Everything is muxed together properly in MP4 with latest Yamb+MP4Box tools.

SMPlayer (Version: 0.6.7+SVN-r3042) results:

Aspect ratio set to AUTO displays the picture correctly :)
Audio tracks are not identified by names, only by their numeric order in the file (1) (2) :(
Changing the audio on-the-fly causes the playback to be restarted from the beginning :(
Navigation by chapters is not available at all :(

MPC-HC (Build: 1.2.1156.0) results:

Aspect ratio is always wrong unless manually set to 'Override Aspect Ratio 16:9' :(
Audio tracks are identified by names :)
Changing the audio on-the-fly is possible :)
Navigation by chapters is accessible via 'Navigate|Jump To...' :)

Can anyone tell me how to force MPC-HC to honor PAR signalling properly in MP4 container?

Kurtnoise
23rd June 2009, 15:15
which mp4 splitter filter did you use w/ mpc-hc ?

kypec
23rd June 2009, 15:33
I didn't specify nor install any external splitters/filters. Just installed MPC-HC and run it with default settings.
Pin Info [IN] Video:Filter : MPC Video Decoder - CLSID : {008BAC12-FBAF-497B-9670-BC6F6FBAE2C4}

- Connected to:

CLSID: {3CCC052E-BDEE-408A-BEA7-90914EF2964B}
Filter: C:\Documents and Settings\pdzugas\My Documents\misc\Disney\HEFFALUMPfullPAR.mp4
Pin: GPAC ISO Video Handler

- Connection media type:

Video: MPEG4 Video (H264) 640x512 25.00fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {31637661-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 171

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 400004

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 640
dwPictAspectRatioY: 512
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 39
dwProfile: 0x00000064
dwLevel: 0x0000001f
dwFlags: 0x00000004

BITMAPINFOHEADER:
biSize: 40
biWidth: 640
biHeight: 512
biPlanes: 1
biBitCount: 24
biCompression: avc1
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020: 00 00 00 00 00 00 00 00 84 1a 06 00 00 00 00 00 ...............
0030: 00 00 00 00 00 00 00 00 80 02 00 00 00 02 00 00 ...............
0040: 00 00 00 00 00 00 00 00 28 00 00 00 80 02 00 00 ........(......
0050: 00 02 00 00 01 00 18 00 61 76 63 31 00 00 00 00 ........avc1....
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070: 00 00 00 00 27 00 00 00 64 00 00 00 1f 00 00 00 ....'...d.......
0080: 04 00 00 00|00 1e 67 64 00 1f ac 34 e2 40 a0 10 ......gd..4@*.
0090: 6f fc 01 00 00 b4 40 00 00 03 00 40 00 00 0c a3 o...@....@...Ł
00a0: c6 0c 42 60 00 05 68 ee 32 c8 b0 Ć.B`..h2Č

Pin Info [OUT] Video:Filter : MPC Video Decoder - CLSID : {008BAC12-FBAF-497B-9670-BC6F6FBAE2C4}

- Connected to:

CLSID: {CD8743A1-3736-11D0-9E69-00C04FD7C15B}
Filter: Overlay Mixer
Pin: Input0

- Connection media type:

Video: DXVA 640x512 (16:9) 25.00fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1B81BE68-A0C7-11D3-B984-00C04F2E73C5}
formattype: FORMAT_VideoInfo2 {F72A76A0-EB0A-11D0-ACE4-0000C0CC16BA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 112

VIDEOINFOHEADER:
rcSource: (0,0)-(640,512)
rcTarget: (0,0)-(640,512)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 400004

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000081
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 16
dwPictAspectRatioY: 9
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

BITMAPINFOHEADER:
biSize: 40
biWidth: 640
biHeight: 512
biPlanes: 1
biBitCount: 12
biCompression: dxva
biSizeImage: 491520
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 80 02 00 00 00 02 00 00 ...............
0010: 00 00 00 00 00 00 00 00 80 02 00 00 00 02 00 00 ...............
0020: 00 00 00 00 00 00 00 00 84 1a 06 00 00 00 00 00 ...............
0030: 81 00 00 00 00 00 00 00 10 00 00 00 09 00 00 00 ...............
0040: 00 00 00 00 00 00 00 00 28 00 00 00 80 02 00 00 ........(......
0050: 00 02 00 00 01 00 0c 00 64 78 76 61 00 80 07 00 ........dxva...
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

- Enumerated media type 0:

Video: DXVA 640x512 25.00fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1B81BE68-A0C7-11D3-B984-00C04F2E73C5}
formattype: FORMAT_VideoInfo2 {F72A76A0-EB0A-11D0-ACE4-0000C0CC16BA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 112

VIDEOINFOHEADER:
rcSource: (0,0)-(640,512)
rcTarget: (0,0)-(640,512)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 400004

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000081
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 5
dwPictAspectRatioY: 4
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

BITMAPINFOHEADER:
biSize: 40
biWidth: 640
biHeight: 512
biPlanes: 1
biBitCount: 12
biCompression: dxva
biSizeImage: 491520
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 80 02 00 00 00 02 00 00 ...............
0010: 00 00 00 00 00 00 00 00 80 02 00 00 00 02 00 00 ...............
0020: 00 00 00 00 00 00 00 00 84 1a 06 00 00 00 00 00 ...............
0030: 81 00 00 00 00 00 00 00 05 00 00 00 04 00 00 00 ...............
0040: 00 00 00 00 00 00 00 00 28 00 00 00 80 02 00 00 ........(......
0050: 00 02 00 00 01 00 0c 00 64 78 76 61 00 80 07 00 ........dxva...
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Reimar
23rd June 2009, 20:34
SMPlayer (Version: 0.6.7+SVN-r3042) results:

Aspect ratio set to AUTO displays the picture correctly :)
Audio tracks are not identified by names, only by their numeric order in the file (1) (2) :(
Changing the audio on-the-fly causes the playback to be restarted from the beginning :(
Navigation by chapters is not available at all :(



Audio tracks should have the correct language identification.
It works for me at least with http://samples.mplayerhq.hu/MPEG-4/embedded_subs/1Video_2Audio_2SUBs_timed_text_streams_.mp4
I admit that beyond that track names are not supported by MPlayer.
About audio restarting from the beginning, I noticed that, it is being worked on...
As for chapters, they seem to be a complete mess with MP4 since there are two formats, one supported by all Apple stuff and the other probably by everything else. I can't resist saying that mkv would probably work a lot better as far as software players are concerned...


Can anyone tell me how to force MPC-HC to honor PAR signalling properly in MP4 container?

Usually that kind of thing happens when the container and video stream aspect do not match together. Applications often can't decide which to use (container one is usually easier to change, thus more likely to be correct, but only the stream one can support AR changes in the middle of the stream).
Have you made sure you set the AR properly _both_ in the H.264 encoder and mp4box?

kypec
24th June 2009, 08:12
Audio tracks should have the correct language identification.
It works for me at least with http://samples.mplayerhq.hu/MPEG-4/embedded_subs/1Video_2Audio_2SUBs_timed_text_streams_.mp4
I admit that beyond that track names are not supported by MPlayer.Yes, but the language and subs also are only identified like (eng) or (ger) for a fraction of second on the screen just after the audio/sub track has been changed, which is pretty useless IMO for general use. See the screenshot below, language ID is also missing in the Information window about the clip :mad:
http://i40.tinypic.com/2mnos4p.jpg

About audio restarting from the beginning, I noticed that, it is
being worked on...Thanks, much appreciated.
As for chapters, they seem to be a complete mess with MP4 since there are two formats, one supported by all Apple stuff and the other probably by everything else. I can't resist saying that mkv would probably work a lot better as far as software players are concerned...I see your reasoning, however, I can't resist saying "Screw Apple", MP4 format structure is clearly defined by ISO standards, every software should support this implementation first, and only then focus on proprietary/non-compliant ways.

Usually that kind of thing happens when the container and video stream aspect do not match together. Applications often can't decide which to use (container one is usually easier to change, thus more likely to be correct, but only the stream one can support AR changes in the middle of the stream).
Have you made sure you set the AR properly _both_ in the H.264 encoder and mp4box?Yes, I specified AR in the x264 encoder by --sar 64:45 switch. Didn't work with MPC-HC. I again specified the same custom AR via Yamb and remuxed. Didn't work either. OTOH, MPlayer displayed both files correctly :)
Can anyone recommend what should I change in splitter/filter settings of MPC-HC in order to display AR properly?

Reimar
24th June 2009, 09:55
Yes, but the language and subs also are only identified like (eng) or (ger) for a fraction of second on the screen just after the audio/sub track has been changed, which is pretty useless IMO for general use. See the screenshot below, language ID is also missing in the Information window about the clip :mad:


Ah, I see. I think it is fixed in MPlayer SVN r29383, language information should appear in SMPlayer with that version. It seems that for MKV SMPlayer actually might be able to even display the track name. Not sure how much effort it would be to support this also for MP4.


Can anyone recommend what should I change in splitter/filter settings of MPC-HC in order to display AR properly?

I rarely use Windows so I hardly have a clue, but I think separately installing Haali's splitter and making MPC use that might help (or maybe not).

kypec
24th June 2009, 11:07
Well, today I replaced mplayerc.exe with the latest 1.2.1161.0 build provided by xvidvideo.ru. I also downloaded the latest update for DirectX9 from Microsoft as recommended on that site but I'm not sure this was really necessary.
Now my MP4 file plays correctly with intended DAR 16:9. Sometimes.
I experimented a bit with renderer settings (WinXP+SP3):
VMR9 (renderless) = DXVA kicks in, DAR is wrong again, video is unwatchable, seems like frames are presented completely out of order, extremely stuttering
VMR9 (windowed) = no DXVA, DAR correct, frames out of order, stuttering
VMR7 (renderless) = no DXVA, DAR correct, smooth playback
VMR7 (windowed) = no DXVA, DAR correct, playback not as smooth as with VMR7 (renderless)
How can one force DXVA to be used? I have ATI Radeon HD 3800 Series, Driver Packaging Version 8.53-080820a-068903C-ATI

Reimar
25th June 2009, 10:18
About audio restarting from the beginning, I noticed that, it is being worked on...


For anyone still interested: that bug is fixed in latest MPlayer/FFmpeg. Which leaves the missing support for chapters in MP4 which I think won't be fixed any time soon.

kypec
25th June 2009, 12:41
For anyone still interested: that bug is fixed in latest MPlayer/FFmpeg. Which leaves the missing support for chapters in MP4 which I think won't be fixed any time soon.
Thanks, now I'll just wait for LoRd_MuldeR's (http://forum.doom9.org/member.php?u=78667) until updated build of SMPlayer package is ready. :cool:

MatMaul
25th June 2009, 13:42
Well, today I replaced mplayerc.exe with the latest 1.2.1161.0 build provided by xvidvideo.ru. I also downloaded the latest update for DirectX9 from Microsoft as recommended on that site but I'm not sure this was really necessary.
Now my MP4 file plays correctly with intended DAR 16:9. Sometimes.
I experimented a bit with renderer settings (WinXP+SP3):
VMR9 (renderless) = DXVA kicks in, DAR is wrong again, video is unwatchable, seems like frames are presented completely out of order, extremely stuttering
VMR9 (windowed) = no DXVA, DAR correct, frames out of order, stuttering
VMR7 (renderless) = no DXVA, DAR correct, smooth playback
VMR7 (windowed) = no DXVA, DAR correct, playback not as smooth as with VMR7 (renderless)
How can one force DXVA to be used? I have ATI Radeon HD 3800 Series, Driver Packaging Version 8.53-080820a-068903C-ATI
Can we have a sample please ?

kypec
25th June 2009, 14:58
Sure, here's the download link (http://www.mediafire.com/?jnuonjj2z0v) (~25MB).

kypec
28th June 2009, 21:31
Can anyone confirm my sample plays right through DXVA? In case it's not playable, what should I change in my x264 encoding then? I used Sharktooh's SD anime profile translated to direct command line switches (not using MeGUI) and x264 reports High profile 3.1, which is pretty easy for HW playback I think.

kypec
2nd July 2009, 08:25
I updated ATI drivers to latest version. No improvement, still sloppy, jerky and unwatchable. Can anybody confirm my MP4 sample is encoded fine for DXVA playback, please?

Keiyakusha
2nd July 2009, 16:02
Your sample works fine with DXVA. Encoding parameters looks fine too.

Win7 / nvidia / latest MPC-HC

kypec
3rd July 2009, 12:00
:thanks: Keiyakusha. So there is definitely something wrong in my playback chain, unfortunately I've no time in these days to experiment thoroughly what could it be.