Jump to content

New Fast Transcode App with Benchmarking Features


jcs
 Share

Recommended Posts

I created a fast transcoding app for in-house use and thought it might be useful to others: you can get it here. I added benchmarking features so you can easily see performance differences between codecs and settings: ETA to complete, MB/s, and FPS. With example NX1 files, it can do ~46fps converting 4K H.265 to 1080p ProRes LT (12-Core 2010 Mac Pro running Win7). Sony A7S Mp4 files can be converted to ProRes LT at 192 FPS.  It can rewrap A7S and FS700 files for use with Resolve 11 and audio. Also works well for high-quality GH4 4K to 1080p (Lanczos scaler). 422 10-bit H.264 (XAVC) in both IPB & ALL-I as well as H.265 output also provided for experimental use.

Link to comment
Share on other sites

EOSHD Pro Color 5 for Sony cameras EOSHD Z LOG for Nikon CamerasEOSHD C-LOG and Film Profiles for All Canon DSLRs

Thanks guys! Currently Windows only, though would expect it to work OK with Wine or any VM on OSX. Might port the project to wxWidgets which would allow an easy OSX port.

Photon was designed to the be the fastest transcoder of those using ffmpeg: please let me know if any transcoder is faster.

Testing with 12 (or more) NX1 4K H.265 files with the following ProRes settings yields 50fps (4K => 1080p with very high quality scaler):

H265_50fps.thumb.gif.51be1a007c885fd3bd0

NX1 H.265 4K to ProRes LT 4K = 33.1fps:

H265_33_1_4K_fps.thumb.gif.508930a83e1bc

This is on a 5+ year old MacPro: would be helpful to know performance numbers on other machines.

Link to comment
Share on other sites

 

NX1 H.265 4K to ProRes LT 4K = 33.1fps:

H265_33_1_4K_fps.thumb.gif.508930a83e1bc

This is on a 5+ year old MacPro: would be helpful to know performance numbers on other machines.

Tried some NX1 files (80mbps 4K) with the same settings on my i7 3770 (4 cores 8 threads), 16GB RAM.

I'm getting about 6.0 MB/s and 16 FPS when converting 4 files at once (I can't set Max Jobs higher than 4).
It makes sense your 12 core machine is faster, but how come you get dubble the fps but the data rate is not that much different? Does that depend on the source files?

When using RockyMountain Movie Converter (4K ProRes LT) it says it's working with a bitrate of around 275000 kbps. This translates to around 35MB/s. The 4 files (46 seconds in total) take about 90 seconds to convert.

With Photon the same job is done in 68 seconds. The resulting files from Photon are a lot smaller though (600MB vs 1,5 GB for RMMC) with those settings.

Also just noticed that the files from Photon have less contrast - RMMC seems to clip the blacks and whites where Photon still shows detail. Interesting, because the RMMC file looks the same as the original file when played back, but this might be another playback issue with contrast/blacklevels...

Link to comment
Share on other sites

Thanks guys.

Geoff- glad to see the colors/contrast are working well for you. As noted in the Photon manual, FFMPEG introduces a color shift for 4K material with ProRes. Not a major deal if all files are transcoded the same way. However, I prefer to have color/contrast preserved and hopefully FFMPEG devs can fix the color shift issues with >1080p material in the future.

In Photon under Options/Custom Options, you can try custom FFMPEG commands which adjust matrices (bt601/709) and input/output range (video/full range (16-235, 0-255, in and out)). I'll post examples shortly. I also suggest trying out high bitrate H.264. In Premiere Pro and FCPX, H.264 can edit fast enough on modern computers and GPUs, including 4K. 10-bit 422 H.264 requires building FFMPEG (link to instructions in Photon manual). Due to licensing issues, I can't host FFMPEG builds. 10-bit 422 H.264 (including ALL-I versions, which Photon supports) should be competitive to ProRes with smaller files (though will not be as fast for editing; however can be more than fast enough). 10-bit 422 H.264 is basically XAVC, which Sony provides in their pro cameras.

When performance testing, try both ProRes Modes 1 & 2. Mode 1 is faster for smaller jobs-at-a-time, and Mode 2 is faster for many jobs-at-a-time. Mode 2 can be much faster when adjusting ProRes QScale (not available in Mode 1). Higher numbers are faster, resulting in smaller files with lower quality. Perhaps do just one reference file with QScale 1 (max quality possible), then try higher QScales and A/B test in your NLE at e.g. 400% to check for macroblock and other artifacts, then adjust QScale to get a balance of transcode time, quality, and file size.

The current version of Photon limits the number of jobs based on CPU cores available. I can unlock this, however another issue is since I don't directly control FFMPEG (runs as a separate process), I can't strongly control memory usage. Photon monitors memory and CPU load, and adjusts total jobs in real-time. Under certain conditions, FFMPEG can (somewhat unpredictably) allocate a lot of memory, and can cause the computer to run out of physical memory, forcing the computer to page to disk, which is extremely slow (select File/Abort Current Jobs if this happens: I could do this automatically in a future build (when physical memory hits zero)). I have some algorithm ideas for Photon to work around this condition without aborting, but isn't something I can implement quickly. For now, set Max Jobs to prevent this issue if it ever happens (I prefer to have software be smart and 'do everything automatically' when possible).

Photon's MB/s indicator is MB/s written to disk for all jobs. Sometimes the processing rate is disk-limited vs. CPU-limited. Fastest processing occurs with SSDs (especially on the output side).This is different than FFMPEG's reporting of bitrate (which is the video file's current bitrate). I will add FFMPEG's bitrate output in the next build of Photon: this can be helpful in tuning output file size.

Thanks for the feedback so far and look forward to more benchmark numbers.

 

Link to comment
Share on other sites

Yeah I ran into memory issues with Rocky Mountain which is also based on ffmpeg, it would slow down the rest of my computer to the point I would have difficulty running a web page. That's with me running a 4.6 Ghz quad core with 16gb of memory.

Will give 10-bit H264 a go on the same clip and see if I can get similar results, will be great if I do.

Photon seems to drop the highlight brightness in ProRes 2, which while I do like for skin, is a problem in outdoor scenes. Will see if 0-235 helps.

Link to comment
Share on other sites

Photon doesn't do anything special between ProRes 1 and 2: default FFMPEG behavior.

Here are some Photon Options / Custom Options for FFMPEG to play with:

-vf colormatrix=bt709:bt601

-vf colormatrix=bt601:bt709

-color_primaries bt709

-color_primaries bt470bg

(I didn't see any change with -color_primaries for the cases I tested)

 -vf scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709

 -vf scale=in_color_matrix=bt709:out_color_matrix=bt709

bt709 can be swapped with bt601 for above args. I would expect the -vf scale color in_/out_ matrix above to work the same as the -vf colormatrix compact form further above.

 

-vf scale=in_range=pc:out_range=pc

pc arg above can be: pc (0-255, full range. 'full' is also valid) or tv (16-235)

If anyone finds/figures out custom FFMPEG args to fix any issues with ProRes, please let me know.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • EOSHD Pro Color 5 for All Sony cameras
    EOSHD C-LOG and Film Profiles for All Canon DSLRs
    EOSHD Dynamic Range Enhancer for H.264/H.265
×
×
  • Create New...