Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Help needed with optimising ImageSource
System: Windows 7 Ultimate 64-bit, Core i7 860 @ 2.80GHz, 8GB RAM
Installed: Avisynth 2.58 32-bit, latest 32-bit x264.exe Input: A sequence of 1920x1080x24b TIFF images, approx. 12MB each Output: 1920x1080x24b video at 23.976fps test.avs: Code:
ImageSource("W:\TEMP\b194out\yard.%7.7d.tif",0, 760).AssumeFPS("ntsc_film")
Code:
set input=D:\test.avs set output=D:\imgseqtest_v.mkv set ref=5 set bframes=5 set x264Path=D:\x264.exe %x264Path% %input% --preset fast --ref %ref% --bframes %bframes% --output %output% Code:
avs [warning]: converting input clip to YV12 avs [info]: 1920x1080p 0:0 @ 24000/1001 fps (cfr) x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 x264 [info]: profile High, level 5.0 [83.6%] 636/761 frames, 0.98 fps, 3343.68 kb/s, eta 0:02:07 I'd really appreciate any and all help with this. What can I do to speed up the encoding? Last edited by colinhunt; 25th April 2010 at 13:34. |
|
|
|
|
|
#3 | Link | |
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Quote:
edit: Whoop, never mind, found it. I get 1.16-1.17fps from the analysis pass. Last edited by colinhunt; 25th April 2010 at 14:30. |
|
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Can't tell if it's related to that "speed problem", but ... a 1920x1080@24b TIFF should have a size around 6MB. When your TIFFs are 12MB, then they have a colordepth of 16bit instead of 8bit. Check the actual colordepth, and try if it goes faster with 8bit ones. Also, try using "Converttoyv12()" directly in the avs script, to see if that makes a speed difference.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 25th April 2010 at 15:57. |
|
|
|
|
|
#5 | Link | ||
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Quote:
Quote:
|
||
|
|
|
|
|
#9 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,822
|
I can only think that disc access is your bottleneck. You might be able to speed things up slightly by using some other input function, but if your CPU is idle for 95% of the time, I'd guess this must just be because the images are taking so long to load.
Are D: and W: separate physical disks from C:? David |
|
|
|
|
|
#10 | Link | |
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,375
|
Quote:
Btw, could you upload some of these 16bit tiff images somewhere? |
|
|
|
|
|
|
#11 | Link | |||
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Did some additional testing. First I batch converted those 16bit TIFFs to 8bit files with IrfanView, which took wayyyy too long. I then fed those 8bit TIFFs to ImageSource and got no speed increase at all. Adding ConverttoYV12() to the .avs script didn't help either.
I then tried 'immareadseq'. With 8bit TIFFs I got a whopping (it's relative, isn't it?) speed increase to 2.8fps. LAN transfers reached 160mbps and x264's CPU load went all the way up to 14% at best. That's still way too slow; I should be looking at more than 15fps for x264 to be feasible in larger projects. What do you guys think, should I start messing about with MT and 64-bit stuff? How about speeding things up with piping, like RipBot? (No, I don't know what I'm talking about here, just throwing ideas around.) Quote:
Quote:
Quote:
Last edited by colinhunt; 25th April 2010 at 22:01. |
|||
|
|
|
|
|
#12 | Link | |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,822
|
Quote:
David |
|
|
|
|
|
|
#13 | Link | |
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Quote:
|
|
|
|
|
|
|
#14 | Link |
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Whoa! David, you were absolutely correct: there was indeed a file access bottleneck slowing the whole process down.
I copied the 8bit TIFFs to a OCZ Throttle eSATA drive, then edited the scripts for eSATA drive as source and NAS drive as destination - and boom, 15.03fps! Outputting to the internal SSD drive was slightly faster at 15.36fps. x264 CPU load wobbled between 65 and 80 percent. I guess this proves that reading small-ish files off a NAS over a Gb LAN is not a good solution, even when you can read large files off the NAS at 90MB/s. (Hmm, and yet copying the TIFF files from the NAS to internal SSD happens at 65MB/s. I wonder what in the encoding process chokes down the NAS read ops...) It will be interesting to see if I can squeeze more fps out of the system when the SAS comes on-line next week. Thank you very much to everyone who took time out to reply; I'm still interested in any tips you might have for speeding up this process further. After all, when there's 120 000+ TIFF files to encode, every fps counts
Last edited by colinhunt; 26th April 2010 at 00:24. |
|
|
|
|
|
#15 | Link |
|
Registered User
Join Date: Dec 2002
Posts: 1,022
|
Urgh, I meant to retire for the night, but instead I couldn't help running some tests with those 16bit TIFFs.
Source: SSD / Destination: NAS / ConverttoYV12() in .avs: no / fps: 5.48 / CPU load 20-25% Source: SSD / Destination: NAS / ConverttoYV12() in .avs: yes / fps: 5.55 / CPU load 19-28% Source: eSATA Flash / Destination: NAS / ConverttoYV12() in .avs: no / fps: 3.38 / CPU load 11-18% Almost 3 o'clock... sleepytime. |
|
|
|
|
|
#17 | Link |
|
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Well you seemed to have worked it out.
Summary :- With images of size 12MB each, you can expect this to be extremely limited by the read speed of the storage medium. E.g. With a very fast disk i.e. 120MB/sec, with no subsequent processing, all you could ever expect is something less than 10 fps. Much less when you factor in processing time as well. The DevIL libraries used by ImageSource() don't help much either. They do standard OS buffered, record level reads from the source file. |
|
|
|
|
|
#19 | Link |
|
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
I take it you already have the 12MB files.
![]() If so you are stuck with 12MB*1000/[disk rate MB/s] milliseconds per file plus all the processing time per frame. Accessing the data from a really really fast disk system is your only hope. Maybe copying to a Ram disk will help the script run faster, but you need to still add the time it take to copy the files to the Ram disk as part of the whole process. If you can batch the jobs then you could overlap copying the next batch with processing the current batch. If you have a choice at the source use a compressed format. Good lossless should see 3 or 4 to 1 depending on the image data. Slightly lossy maybe 10 to 1. If the images are 95% uniform white then very high levels of compression can be achieved. If the images contain 100% irregular very fine detail then compression will not be high. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|