PDA

View Full Version : GPU acceleration for .mts files?


napx
28th July 2009, 23:34
Hi,
I have 15-20mbit/s 1080p .mts files from a Canon HG20 cam (AVCHD). I need a way to play these files smoothly. I have a laptop with 1.8ghz c2d and 8400M GS.
On XP SP3 with latest DirectX 9 (March 2009) and nvidia drivers 185.85.

I tried the following:

1. VLC 1.01 : opens .mts but performance is awful. To be expected because VLC has no multicore or dxva support. When will VLC pickup multicore support from ffmpeg-mt? Will dxva ever happen with VLC?

2. MPC HC (+ haali splitter + CoreAVC) : I think I'll use the dxva, but MPC HC can't open .mts files! I give haali a try (unticking in-built MPC HC filter from options) haali icon shows in systray but no go. I install CoreAVC, but MPC HC still can't open file so CoreAVC sits useless. Can I make MPC HC dxva magic happen on my .mts's? Or at least MPC HC + CoreAVC magic?

3. MPC HC + ffdshow nightly: Finally playable with multicore support in latest ffdshow! However uses both cores %90-100, so not ideal.

If none of this is possible or coming soon, can I change the .mts container into something that MPC HC can open natively without re-encoding with x264, if yes how?

Inspector.Gadget
29th July 2009, 01:16
Open the file with MediaInfo's GUI and copy and paste the "text" view into a new post in this thread.

ar-jar
29th July 2009, 07:42
Hi,
I have 15-20mbit/s 1080p .mts files from a Canon HG20 cam (AVCHD). I need a way to play these files smoothly.

The best decoder for AVCHD material in mts format from my Sony HandyCam that I have ever tested is the CyberLink H.264/AVC Decoder (PDVD8) (there is a trial version available of PDVD). Not sure if your format is exactly the same. As my files are interaced, the decoder does a wonderful frame-doubling, effectively producing 50 different full frames / s from the 1080i/50 material when in DXVA mode. The result is a very fluid and smooth video. I can only only run it with VMR9 on my XP machine and there is some kind of aspect ratio issue in MPC-HC/VMR9 (the frame size is 1080 x 1440 anamorphic) so the aspect ratio needs to be set manually in that player. ffdshow works fine too but only produces 25 fps and needs 50 - 60% of my Quad core CPU (I have not tested all the deinterlacing methods). -A

Blue_MiSfit
29th July 2009, 08:14
Try DivX H.264. It's a good software decoder and can outperform ffmpeg-mt in some cases.

As far as DXVA with an 8400M GS - it should definitely work, provided you have recent drivers installed, and you setup MPC-HC correctly (i.e. the DXVA decoder directly connected to EVR or another supported renderer).

If you got the MTS files to open properly with MPC-HC, then that issue is solved, right? It's just an MPEG Transport Stream - Haali's media splitter should handle things just fine.

If you want to remux, just use MKVToolNix's mmg.exe. Drop the MTS in there, and it will let you remux to an MKV.

~MiSfit

roozhou
29th July 2009, 09:25
If you want to remux, just use MKVToolNix's mmg.exe. Drop the MTS in there, and it will let you remux to an MKV.

~MiSfit

I don't think mmg has ever supported importing from transport streams

napx
29th July 2009, 16:00
I finally managed to properly use external codecs in MPC HC with .mts files! I tested Core AVC (with and without "prefer CUDA" selected) and DivX7 codec and I found both to be good and about equal options. They give me %80 CPU usage with 26-28fps playback which is good enough for me! thanks everyone who helped. This is better than what I got with the ffdshow nightly (ffmpeg-mt) which gave me %100 CPU and less fps.

The trick was to select the filters manually in MPC HC by adding them as "external filters" and ticking the -prefer- button. I also used the -block- button for the ones I did not want to use. Not bad!

Although I still suspect GPU acceleration was not active even when I selected the option in CoreAVC because selecting it did nothing to change CPU usage and had no noticeable effect on playback.

Here is a HG20 sample I found on the web to work with: http://d01.megashares.com/dl/baf49c2/HG20.Yellow.Rose.MTS

@Inspector.Gadget : I found MediaInfo to be a nice replacement for GSpot. Thanks! Here is the text output for the above file:
General
ID : 0
Complete name : C:\Documents and Settings\Administrator\Desktop\HG20.Yellow.Rose.MTS
Format : BDAV
Format/Info : Blu-ray Video
File size : 31.1 MiB
Duration : 11s 8ms
Overall bit rate : 23.7 Mbps
Maximum Overall bit rate : 24.0 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Duration : 10s 910ms
Bit rate : 22.5 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16/9
Frame rate : 29.970 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.362
Stream size : 29.3 MiB (94%)

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 11s 8ms
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Video delay : -67ms
Stream size : 344 KiB (1%)

@ar-jar : I would download Power DVD 9 Trial if nothing else worked, it is important for me to succeed with free software (Free software would be best). I may give Power DVD a try to experiment later.


I still cannot get MPC HC to play back .mts file with dxva in any way. Even with haali installed, I don't get an image if the dxva transform filter is selected. I guess it just doesn't want to play with .mts's?

I also think I didn't get any CUDA GPU love from CoreAVC either, any theories?

Btw, roozhou is right. Mkvtoolnix does not support .mts file input. I am open to other options for remuxing...

Thanks all for the wonderful help btw, doom9 is awesome.

Inspector.Gadget
29th July 2009, 23:42
To remux, first demux with eac3to and then remux with mkvmerge.

roozhou
30th July 2009, 05:51
To remux, first demux with eac3to and then remux with mkvmerge.

You can also try tsMuxeR+mmg

napx
31st July 2009, 01:02
TsMuxer + mmg did the trick.
One little note: I had to manually enter 50 as the FPS value in mmg for my 25 frames per second material (25p video packaged in 50i for compatibility - The PsF mode of Canon). If I entered 25, i got a 12.5 fps result.

napx
9th August 2009, 15:26
Here's something: I installed Windows 7 64-bit, and the 186.03 Nvidia drivers. WMP played the .mts without a problem at %30 CPU time. I'm not sure if it's the newer drivers or the WMP codecs...