Embedded VobSUB + CoreAVC decoding without AviSynth

If you have a suggestion for a feature, post it here

Embedded VobSUB + CoreAVC decoding without AviSynth

Postby ExSport » Mon Feb 08, 2010 2:32 am

Hi Shagrath
Please can you add support for embedded VOBSUB subtitles in MKV?
Now I tested it with latest MEncoder_mt (build r30521) and with no problems embedded vobsub was rendered. Unfortunatelly external ones can't be loaded. Also now -ass parameter can be used with VOBSUB without generating error (in older versions when embedded VOBSUB was loaded with -ass parameter, it failed with error)
Also can you enable possibility to use CoreAVC decoding outside AviSynth engine?
New MEncoder versions from Sherpya includes this support so adding
Code: Select all
-vc coreavc
will free up CPU little bit.
Also linux version can use HW decoding, not CUDA but vdpau(DXVA alternative on Linux)...don't know exact parameter now and if it is already coded there.
Let me inform all that MEncoder is crashing when "Force VMR AR Correction" is enabled in CoreAVC so disable it!!!
Also up to v1.9.5 MEncoder detects CoreAVC but it seems that from v2.0 you need to copy "CoreAVCDecoder.ax" to "c:\Program Files\PS3 Media Server\win32\codecs\" folder.
It can be done for any version for compatibility reason, so better to copy it there everytime so MEncoder will find everytime 8-)
My benchmarks show that it has some gain in speed (EDIT: This test is misleading. I accidentally used wrong MEncoder parameters from other test):
Code: Select all
old benchmark removed

Tested on Core2duo 2.5GHz so maybe on 4 core CPU performance gain will be higher.
EDIT:
New test for 720p file. Difference is about 20% on whole 720p movie:

viewtopic.php?f=4&t=5547&p=25147#p25274
Another one for 1080p file. Difference is about 28% on whole movie:
viewtopic.php?f=4&t=5547&p=25386#p25319
Last edited by ExSport on Wed Feb 10, 2010 5:12 pm, edited 6 times in total.
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby blk01s4 » Mon Feb 08, 2010 7:50 am

i tried to add the -vc coreavc option under 'custom option'. I get this error . "VideoDecoder::SetExtAttr: registry failure"
------
Code: Select all
[Thread-1004] DEBUG 01:42:43.904 MEncoder MT-SVN-r28126-Build-from-Sherpya-4.2.4 (C) 2000-2008 MPlayer Team
[Thread-1004] DEBUG 01:42:43.904 CPU: Intel(R) Core(TM)2 CPU          4400  @ 2.00GHz (Family: 6, Model: 15, Stepping: 2)
[Thread-1004] DEBUG 01:42:43.905 CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
[Thread-1004] DEBUG 01:42:43.905 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
[Thread-1004] DEBUG 01:42:43.955 success: format: 0  data: 0x0 - 0x17cfefd1
[Thread-1004] DEBUG 01:42:44.045 [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[Thread-1004] DEBUG 01:42:44.045 [mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[Thread-1004] DEBUG 01:42:44.045 [mkv] Track ID 3: subtitles (S_TEXT/UTF8), -sid 0, -slang eng
[Thread-1004] DEBUG 01:42:44.045 [mkv] Will play video track 1.
[Thread-1004] DEBUG 01:42:44.045 Matroska file format detected.
[Thread-1004] DEBUG 01:42:44.045 VIDEO:  [avc1]  1280x720  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[Thread-1004] DEBUG 01:42:44.045 [V] filefmt:31  fourcc:0x31637661  size:1280x720  fps:23.976  ftime:=0.0417
[Thread-1004] DEBUG 01:42:44.045 ==========================================================================
[Thread-1004] DEBUG 01:42:44.063 Opening audio decoder: [liba52] AC3 decoding with liba52
[Thread-1004] DEBUG 01:42:44.064 AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
[Thread-1004] DEBUG 01:42:44.064 Selected audio codec: [a52] afm: liba52 (AC3-liba52)
[Thread-1004] DEBUG 01:42:44.064 ==========================================================================
[Thread-1001] INFO  01:42:44.065 Result of \\.\pipe\mencoder1268289763424 : true
[Thread-1003] DEBUG 01:42:44.065 Using SSE optimized IMDCT transform
[Thread-1003] DEBUG 01:42:44.065 Using MMX optimized resampler
[Thread-1003] DEBUG 01:42:44.065 ** MUXER_LAVF *****************************************************************
[Thread-1003] DEBUG 01:42:44.065 REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
[Thread-1003] DEBUG 01:42:44.065 INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
[Thread-1003] DEBUG 01:42:44.065 will play these INCORRECT files as if nothing were wrong!
[Thread-1003] DEBUG 01:42:44.065 *******************************************************************************
[Thread-1004] DEBUG 01:42:44.072 OK, exit.
[Thread-1004] DEBUG 01:42:44.083 Opening video filter: [expand osd=1]
[Thread-1004] DEBUG 01:42:44.086 Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 4542808
[Thread-1004] DEBUG 01:42:44.086 ==========================================================================
[Thread-1004] DEBUG 01:42:44.086 Forced video codec: coreavc
[Thread-1004] DEBUG 01:42:44.090 Opening video decoder: [dshow] DirectShow video codecs
[Thread-1004] DEBUG 01:42:44.376 Decoder supports the following YUV formats: YUY2 UYVY YV12 I420
[Thread-1004] DEBUG 01:42:44.376 Decoder is capable of YUV output (flags 0x2b)
[Thread-1004] DEBUG 01:42:44.376 VDec: vo config request - 1280 x 720 (preferred colorspace: Packed YUY2)
[Thread-1004] DEBUG 01:42:44.376 [PP] Using codec's postprocessing, max q = 4.
[Thread-1004] DEBUG 01:42:44.376 VDec: using Planar YV12 as output csp (no 0)
[Thread-1004] DEBUG 01:42:44.376 Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[Thread-1004] DEBUG 01:42:44.376 videocodec: libavcodec (1280x720 fourcc=32564d57 [WMV2])
[Thread-1004] DEBUG 01:42:44.457 VideoDecoder::SetExtAttr: registry failure
[Thread-1004] DEBUG 01:42:44.457 Selected video codec: [coreavc] vfm: dshow (CoreAVC DShow H264 decoder for x86 - http://corecodec.org/)
[Thread-1004] DEBUG 01:42:44.457 ==========================================================================
[Thread-1004] DEBUG 01:42:44.629 VIDEO CODEC ID: 19
Last edited by blk01s4 on Mon Feb 08, 2010 4:32 pm, edited 1 time in total.
blk01s4
 
Posts: 121
Joined: Sat Jan 02, 2010 9:25 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby ExSport » Mon Feb 08, 2010 11:15 am

Code: Select all
MEncoder MT-SVN-r28126-Build-from-Sherpya-4.2.4 (C) 2000-2008 MPlayer Team
Opening video decoder: [dshow] DirectShow video codecs

You are using old mencoder build ;)
Also beware that you copy also this file with mencoder/mencoder_mt executable:
Code: Select all
dsnative.dll

Also please put debug part to [code] in your post.
Thanks
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby blk01s4 » Mon Feb 08, 2010 4:52 pm

ok fixed, sorry ;) .. As far as using an old copy of mencoder build goes I copied the latest mencoder & mencoder_mt.exe (version 30369-4.2.5) to test with and I get a different error less helpful then before :P
Where do I ge ta copy of dsnative.dll ? I haven't read about that dll anywhere even over at doom9 ??

Code: Select all
win32/mencoder_mt.exe] INFO  10:48:51.324 Reading pipe: \\.\pipe\mencoder1268322531105
[win32/mencoder_mt.exe] INFO  10:48:51.324 Attaching thread: win32/mencoder_mt.exe
[Thread-906] DEBUG 10:48:51.910 MEncoder Sherpya-SVN-r30369-4.2.5 (C) 2000-2009 MPlayer Team
[Thread-906] DEBUG 10:48:51.915 success: format: 0  data: 0x0 - 0x17cfefd1
[Thread-906] DEBUG 10:48:51.921 [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[Thread-906] DEBUG 10:48:51.921 [mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[Thread-906] DEBUG 10:48:51.921 [mkv] Track ID 3: subtitles (S_TEXT/UTF8), -sid 0, -slang eng
[Thread-906] DEBUG 10:48:51.921 [mkv] Will play video track 1.
[Thread-906] DEBUG 10:48:51.921 Matroska file format detected.
[Thread-906] DEBUG 10:48:51.921 VIDEO:  [avc1]  1280x720  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[Thread-906] DEBUG 10:48:51.921 [V] filefmt:31  fourcc:0x31637661  size:1280x720  fps:23.976  ftime:=0.0417
[Thread-906] DEBUG 10:48:51.921 ==========================================================================
[Thread-906] DEBUG 10:48:51.922 Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[Thread-906] DEBUG 10:48:51.923 AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
[Thread-906] DEBUG 10:48:51.923 Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
[Thread-906] DEBUG 10:48:51.923 ==========================================================================
[Thread-902] INFO  10:48:51.923 Result of \\.\pipe\mencoder1268322531105 : true
[Thread-905] DEBUG 10:48:51.924 ** MUXER_LAVF *****************************************************************
[Thread-906] DEBUG 10:48:51.925 OK, exit.
[Thread-905] DEBUG 10:48:51.925 REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
[Thread-905] DEBUG 10:48:51.925 INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
[Thread-905] DEBUG 10:48:51.925 will play these INCORRECT files as if nothing were wrong!
[Thread-905] DEBUG 10:48:51.925 *******************************************************************************
[Thread-906] DEBUG 10:48:51.925 Opening video filter: [expand osd=1]
[Thread-906] DEBUG 10:48:51.925 Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
[Thread-906] DEBUG 10:48:51.925 ==========================================================================
[Thread-906] DEBUG 10:48:51.925 Forced video codec: coreavc
[Thread-905] DEBUG 10:48:51.926 Cannot find codec matching selected -vo and video format 0x31637661.
[Thread-906] DEBUG 10:48:51.926 ==========================================================================
[Thread-906] DEBUG 10:48:51.926 Exiting...
[Thread-902] DEBUG 10:48:51.928 EOF
[win32/mencoder_mt.exe] DEBUG 10:48:51.929 EOF
[win32/mencoder_mt.exe] TRACE 10:48:51.929 Process C:\Program Files\PS3 Media Server\win32\mencoder_mt.exe has a return code of 1! Maybe an error occured... check the log file
blk01s4
 
Posts: 121
Joined: Sat Jan 02, 2010 9:25 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby ExSport » Mon Feb 08, 2010 7:08 pm

Download latest Sherpya build and it is r30521 for now ;)
When downloaded, the archive already includes this file so you need to copy it to win32 dir with mencoder/mencoder_mt files together.
http://oss.netfarm.it/mplayer-win32.php
This file is coded by Sherpya itself because original dshow driver in Mplayer/MEncoder doesn't support loading of CoreAVC and other external drivers.
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby blk01s4 » Mon Feb 08, 2010 7:43 pm

Forgive me but I've been there before and can't find the windows version of mencoder to download. Do I have the compile the windows version or something ? Could you paste the direct URL please?
blk01s4
 
Posts: 121
Joined: Sat Jan 02, 2010 9:25 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby ExSport » Mon Feb 08, 2010 7:54 pm

Depends on your CPU.
It is so hard to click on build directly in table? ;)
Example:
Code: Select all
Intel Pentium 4 or better Multi Core (core2/xeon/etc) p4 / p4 mt

For example clicking on p4 mt link on Sherpya page 8-)
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby blk01s4 » Mon Feb 08, 2010 8:17 pm

My bad I was clicking down below and downloading the uncompiled version. Thank you. :mrgreen:
blk01s4
 
Posts: 121
Joined: Sat Jan 02, 2010 9:25 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby ExSport » Tue Feb 09, 2010 8:41 am

I edited my first post about misleading test. So now more info.
I accidentally used bad MEncoder parameters from other testing when copy-paste it so now new test result on full movie:
Code: Select all
MKV file with h264, duration: 1:23:11.333, resolution 1280x544

Code: Select all
Encoding time with CoreAVC(CUDA enabled) and MEncoder_mt   ==>  29min 48sec = 66.93 frames/s (CPU loaded at about 60-70% max)
Encoding time without CoreAVC and with MEncoder_mt         ==>  35min 24sec = 56.34 frames/s (CPU loaded at max, about 95%)

Very good improvement (CUDA is about 20% faster) :mrgreen:
- I wasn't able to use CPU at max with CUDA enabled also when I changed threads from 2 to 4 (on 2 core CPU). CPU wasn't used fully. Only solution was to start 2 separate encoding processes at a time.
- At the begining of my tests I spotted that sometimes when "CUDA enabled encoding" started and I was watching video with VideoLAN on background, my desktop refreshed after some time. It was something like folder refresh or like GPU recovery reset.
When it happened, encoded video jammed in circle so last few frames repeated continuously until the end of encoded file.
When I stopped VLC or disabled CUDA in CoreAVC, it fixed this behavior so I suppose it was problem of nvidia driver or dsnative driver used with MEncoder. Maybe this dsnative driver don't like other directshow application running at same time? Maybe Sherpya know...also I will try to use most recent nvidia drivers if it helps.
- I tried quick test with 2 CUDA enabled enconding processes at a same time and need to test it again because maybe I spotted that both encoded videos are sometimes jerky. Need to approve it with new test.
Maybe GPU wasn't able to decode two 720p movies fluently at a same time and MEncoder encoded these jerks to video...weird because encoder should wait for fully decoded frame before it is encoded but maybe CUDA HW decoding confused encoder somehow or dsnative driver is confused when used twotimes at the same time.... but everything is only my thoughts 8-)
So feel free to test it ;) You can do it also directly from PMS by adding -vc coreavc in custom options and using latest Sherpya MEncoder_mt builds.
Last edited by ExSport on Tue Feb 09, 2010 10:12 pm, edited 3 times in total.
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Embedded VobSUB + CoreAVC decoding without AviSynth

Postby blk01s4 » Tue Feb 09, 2010 5:20 pm

I'm not sure what VLC has to do with this ? Your post is a bit gray there.. Anyways, here is my take on CUDA I noticed it wasn't designed to encode video faster then real time which is what we are looking to do. It simply didn't full my buffer any faster with CUDA enabled. How many cuda cores does your video card have ? I have the NVIDIA 9800 GT. It seems when it comes down to it or from the benchmarks I've seen on doom9 is that CoreAVC w/no CUDA enabled rendered video quicker into a buffer, there seems no replacement for raw processing power for transcoding! BTW thanks for the pointer the other day I can now use the -vc coreavc switch and all works well. Lastnight I did for a bit get unsynced sound with CoreAVC and AC3Filter using Avisynth. I'm not sure what causes this but torwards the end of the movie it was back in sync again.

BTW give DI-avc a look sometime! http://di-avc.com/ . Its suppose to outperform coreavc, there is some bench info on Doom9
blk01s4
 
Posts: 121
Joined: Sat Jan 02, 2010 9:25 pm

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 4 guests