|
|
| MrSmite |
| Posted: Mar 13 2013, 05:55 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
I'm trying to convert an MKV to DVD by frameserving from VDub to TMPGENC. Unfortunately TMPGENC says it will take 56 hours.
Computer:
Windows XP SP3 Pentium 4 3.2 Ghz with Hyperthreading 4 GB DDR2
Video:
1920x800 23.970 fps Audio: (not applicable - not converting with VDub) Bitrate: 9599 kbps
The video has a 2.40 AR so to make a 16:9 compliant DVD it needs to be resized to 720x356 and then padded with black borders to 720x480:
(480) x (16/9) / 2.40 = (480) x (1.78) / 2.40 = 356
Workflow:
- Open video in Virtualdub
- Add a "Resize" filter
- Aspect Ratio: Disabled
- New Size: 720x356
- Filter Mode: Lanczos3
- Letterbox / crop to size: 720x480
- Start frameserving
- Open the frameserved file in TMPGENC
- Adjust the "Video" settings
- Size: 720x480
- Aspect Ratio: 16:9
- Framerate: 23.976 (internally 29.970)
- Rate control mode: 2-pass vbr
- Encode mode: 3:2 pulldown when playback
- YUV format: 4:2:0
- DC Compression precision: 10 bits
- Motion search precision: Highest quality
- Adjust the "Advanced" settings
- Source: Non-interlaced
- Interlaced mode: (not applicable)
- Source aspect ratio: 16:9 display
I thought it might be a colorspace conversion problem because MPC HomeCinema shows the video as 4:2:0 (YV12) so I forced VDub to decompress in that format. The problem is the resize filter only supports RGB32 so I have to output it as RGB32 and let TMPGENC change it back to 4:2:0, I think.
Anyway, I've converted numerous videos that only took about 7 to 10 hours each. I can't figure out what I'm doing wrong with this one. I can't play the MKV directly on this particular PC because it stutters on high bitrates (anything over 6000 kbps).
Thanks in advance! |
 |
| dloneranger |
| Posted: Mar 13 2013, 07:01 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
Not sure why that one would take so long either Have you tried just saving it with a lossless codec and loading that into tmpeg to see if it's mpeg or a combination of that and virtualdub
Resize supports more than rgb, looking at it here it's resizing in yuv4:2:0
Have you tried turning off hyperthreading? That's one of those weird things that can make some programs faster, but others can be slower when enabled
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| MrSmite |
| Posted: Mar 13 2013, 08:35 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
I was hoping to avoid making the interim file but I guess it's worth a try.
Interestingly enough I just noticed when I open the video in VDub I get the following filters (based on icons in the system tray):
2x Haali Media Splitter 1x AC3filter 1x FFDshow Audio decoder 2x FFDShow video decoder 1x CoreAVC video decoder
I've disabled FFDshow for H264 and AC3 but for some odd reason they show up. Also, when I play the video using MPC Home Cinema, it shows that CoreAVC is decoding as YUY2 but FFDshow shows it as NV12 and finally VDub shows it as either RGB32 or YV12.
I'm pretty sure something's not right here. There's too many "cooks in the kitchen" with all these colorspace conversions. Also, my system seems to dislike NV12 since that particular one has the worst performance if I disable everything but CoreAVC. |
 |
| dloneranger |
| Posted: Mar 13 2013, 08:44 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
Thats a lot of codecs involved :-) A graphedit type program can show you what's going on - looks like quite a few redundant ones http://code.google.com/p/graph-studio-next/
FFDshow has options for how many filters in a graph, ac3filter has options for pcm etc that you might want to tun off
What kind of source is it? I'm assuming it's being opened with the DirectShow plugin, as coreavc doesn't do vfw and ffdshow's audio doesn't do acm
I never do frameserving, so is that dragging in all the codecs a second time? Even if so, they shouldn't add that much time to the encoding
Anything odd about this video? One that's nearly 100% high motion would take longer to encode as the search would have to look further on each frame to find/giveup on a match
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| MrSmite |
| Posted: Mar 13 2013, 08:49 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
Thanks, I'll try that tonight and report back.
I did a test render (1 minute) out of VDub using Lagarith lossless (which I use all the time) and I noticed this particular video is rendering at an abyssmal 1.39 fps.
Then again the LAGS codec also allows you to set the colorspace which defaults to RGBA (RGB32 with dummy alpha) but it can be forced to YUY2 or YV12 provided I can figure out what it's decoding as in the first place. |
 |
| -vdub- |
| Posted: Mar 14 2013, 01:56 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
Mediainfo http://mediainfo.sourceforge.net/en will show the colour spaces for files.
Demux the mkv video to elementary streams using for example MKV_Cleaver or other http://www.videohelp.com/tools/sections/vi...de-multiplexers Frame-serve video without audio.
Avisynth is also a good frame-serve that could be used. |
 |
| MrSmite |
| Posted: Mar 14 2013, 09:26 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
I tried demuxing with MKVExtractGUI but nothing could open the .h264 file that was created, not even FFDShow knew what to do with it.
As for all the filters loading, GraphStudio showed the following:
source -> CoreAVC -> VMR Renderer \-> FFDShow text renderer (subtitles) -> VMR Renderer
Source -> FFDShow Audio 001 -> DirectSound Renderer \-> FFDShow Audio 002 -> DirectSound Renderer \-> FFDShow Audio 003 -> DirectSound Renderer \-> FFDShow Audio 004 -> DirectSound Renderer
I think there were so many FFDShow Audio connections because it was a 5.1 DTS track that I was downmixing to "4.1 Quadro". Also, even though subtitles were off it still connected the pin.
I found that totally disabling FFDShow allowed the video to play smoother but it didn't improve the conversion process.
Will play around wit it some more later today. Thanks for the help. |
 |
| dloneranger |
| Posted: Mar 14 2013, 01:38 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
On ffdshow audios configuration, directshow control tab There's an option "multiple ffdshow instances" - I ususally have that set to "only 1 - check previous filter only"
That fps for lagarith is truly abysmal
Random thoughts about this 1 file that's slow, that may or may not be useful/correct -- Badly muxed? Rerun through mkvtoonix's mmg.exe to remux The file's fragmented into 10000000000000000 parts ? Haali media splitter is quite old - I replaced it with LavSplitter a while ago and that seems much better (I don't use the lavcodecs though) http://code.google.com/p/lavfilters/ This video has a higher than 8bpp colourspace and it's having to be dithered down to 8bpp? - MediaInfo can show that if you look at its more detailed views
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| -vdub- |
| Posted: Mar 15 2013, 01:02 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
I would also remux the mkv file as you said it couldn't be demuxed that also could points to the video itself as been the likely problem.
I Agree to install LAV Filters if you have a problem or not. Later you could try use the FFInputDriver http://code.google.com/p/ffinputdriver/downloads/list virtualdub plugin which are based on the ffmpeg libs. After insatalling FFInputDriver to load your mkv video run virtualdub select Open Video File, select Files Of Type: and choose FFMpeg Supported Files choose the video then Open. |
 |
| MrSmite |
| Posted: Mar 15 2013, 04:36 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
@dloneranger
* FFDshow was in fact set to multiple instances * I checked the fragmentation and according to O&O Defrag's cluster inspector it is contiguous. * I will try the LAV filters, thanks
@-vdub-
* I was able to demux the file but I ended up with an .h264 file that nothing would play * I remuxed the .h264 back into an mkv and it plays * This new mkv is just as problematic as the original as far as conversion goes
I wonder if the problem is with the mkv. When I extract the video stream, the resulting file has a strange header:
| QUOTE | ...Ù..ÿÿÕÜE齿ÙH ·–,Ø Ù#îïx264 - core 129 r2245 b c13772 - H.264/M PEG-4 AVC codec - Copyleft 2003- 2013 - http://ww w.videolan.org/x 264.html
|
I even tried extracting the track using mkvextract.exe and different parameters. They all resulted in a file that would not play until remuxed. |
 |
| dloneranger |
| Posted: Mar 15 2013, 12:50 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
Looks like you've ruled out everything else H264's got so many options, I could believe that someone just turned everything up to fuill - must have taken a hell of a time to encode........
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| MrSmite |
| Posted: Mar 15 2013, 01:17 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
I wonder maybe if it has something to do with the frameserver.
When I "save as AVI", VirtualDub says it will only take 3 hours. It seems strange that the same source sent through the frameserver would take 56 hours. After all the tweaking I could only get it down to 34 hours via frameserving.
I'm going to try saving the interim LAGs AVI and see what TMPGEnc says about that. If it's more reasonable then I would venture to guess there's a problem frameserving high bitrate content on a 32-bit OS.
Stay tuned... |
 |
| -vdub- |
| Posted: Mar 15 2013, 06:44 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
Could try basic simple AviSynth frameserve script can make sense of it, likely it will use LAV Filters if you have them installed (I would) although still will depend on if any codec needed have higher merit values. A GraphEdit software will tell you what is been used by system to decode this video, so will be the same with basic AviSynth script below. If the below Avisynth doesn't seem to work. Here's an x264 codec for vfw that works well with directshow and Virtualdub when need it.
copy this below to a new text file change to suit your file where needed, save with changing the .txt extension to .avs drag and drop the filename.avs onto Virtualdub. AviSynth will frameserve uncompressed avi video and pcm audio to Virtualdub.
DirectShowSource ("Drive:FideoFile.mkv", fps=CopyFromMediainfo, audio=true)
Change audio=true to false if need to test without audio from source video if need |
 |
| MrSmite |
| Posted: Mar 15 2013, 09:08 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09

|
@-vdub-
Thanks, I'll try that script and see what happens, I've never used AviSynth before.
By the way, you mention an x264 vfw codec but forgot to supply the link. Could you drop the URL into your post? Thanks! |
 |
| -vdub- |
| Posted: Mar 15 2013, 10:38 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
x264 vfw
http://sourceforge.net/projects/x264vfw/
AviSynth
http://sourceforge.net/projects/avisynth2/
http://avisynth.org/mediawiki/SourceForge
http://avisynth.org/ |
 |