Log in

View Full Version : x264 for high bitrate 1080p capture via HD-SDI


Blue_MiSfit
15th April 2010, 09:29
Hey all,

Suppose you are capturing a 1080p24 video stream from an HDCAM-SR tape via HD-SDI.

I'm using Digital Rapids (on an 8 core Xeon server), which supports 3rd party encoders via VFW. Enter x264vfw :devil:

Annoyingly, Digital Rapids only allows so much buffer during the capture (displayed as a percentage in the GUI), and x264 will quickly run into it when using things like b-frames, lookahead, etc. When this happens, the capture process fails - I think due to dropped frames.

Obviously I can just disable things until I get enough performance. The irritating thing is, if I strip the encoder down to something near --preset superfast or --preset ulrafast, I will constantly have tons of idle CPU time. That's CPU time that could be spent getting me closer to --preset placebo!!! :devil:

I was reading one of Dark_Shikari's blog posts about low latency streaming improvements to x264, via --intra-refresh and other settings, like a single frame VBV, sliced threads etc... Am I crazy for seeing some potential association here? I can't help but think at least some of that magic would be helpful in my scenario.

I'll be fiddling over the next several days, but wonder if anyone has suggestions?

Thanks!
~MiSfit

ifb
15th April 2010, 14:12
I've only ever seen the Digital Rapids app overflow when I was trying to encode too many things at once (running out of CPU) or capturing lossless and being disk I/O bound.

I think if you tweak your x264 settings you'll be able to keep CPU usage higher and not overflow the capture buffer.

I have an SD system, so I can't really test anything for you. This thread does remind me however, that I really should switch our workflow back to x264. Previously, I had it capturing to HuffYUV and using x264cli after (you can run post-capture scripts in your project). The problem was users stacking a bunch of clips at once and the live capture being CPU-starved when x264 was still running on the previously-captured file. That should be less of an issue going straight to x264vfw. Worth testing at least.

Midzuki
15th April 2010, 14:29
@ Blue_MiSfit:

Have you already tried "-I 1" ? :devil:

If "yes", what was the result, then, ? :)

Gser
15th April 2010, 14:45
Why not just capture it to a lossless format and then use cli x264 on it?

ifb
15th April 2010, 16:15
Why not just capture it to a lossless format and then use cli x264 on it?
Then it's not realtime. Plus, like I said, you run into issues doing captures back-to-back.

RunningSkittle
15th April 2010, 18:59
--tune zerolatency

ifb
15th April 2010, 19:37
--tune zerolatency
x264vfw doesn't support presets/tunes last time I tried it. Too lazy to confirm right now.

Blue_MiSfit
15th April 2010, 20:11
Correct. The VFW GUI uses a series of drop-down menus and data fields, rather like MeGUI used to. There is no preset / tune selection.

I can enable sliced threads, disable b-frames, etc.

@Midzuki:
I did try intra-only, and it worked, but I don't have any other reason to have intra-only, and it's obviously much less efficient. It's worth more testing though :)

Has anyone else with Digital Rapids been able to increase the buffer size? I'm totally new to their software and haven't had the time to dig through the menus etc.

I'll keep messing with it, but thanks for the input, guys!

~MiSfit

ifb
15th April 2010, 21:06
Correct. The VFW GUI uses a series of drop-down menus and data fields, rather like MeGUI used to. There is no preset / tune selection.In x264vfw, I still only use the command line interface but even that doesn't let you use preset/tune. (Who needs a GUI?)

--veryfast is --no-mbtree --no-mixed-refs --ref 1 --subme 2 --trellis 0 --weightp 0 -o file.264 and that's still realtime with room to spare?


Has anyone else with Digital Rapids been able to increase the buffer size? I'm totally new to their software and haven't had the time to dig through the menus etc.tI've never seen a way to control the capture buffer size. Unfortunately, there probably aren't too many other post/broadcast guys in here with such toys to ask. (That or they're still hungover from NAB.)

If you're really motivated, you could compile x264vfw with the speedcontrol patch (http://pastebin.com/ErL2eAW8) and not worry about settings. :)

Blue_MiSfit
15th April 2010, 21:44
OMG... I didn't realize the speedcontrol patch was public (!) I assume this feature isn't quite suitable for mainline x264 yet? Does it come with any caveats?

I'm still a little hung over from NAB :)

~MiSfit

Dark Shikari
15th April 2010, 21:59
OMG... I didn't realize the speedcontrol patch was public (!) I assume this feature isn't quite suitable for mainline x264 yet? Does it come with any caveats?

I'm still a little hung over from NAB :)

~MiSfitWorks fine for Avail Media ;)

a451guy451
23rd July 2010, 22:24
I've never used DR's VFW mode, but I'm guessing it only lets you use AVI as a container? (I'd love to be wrong though).

Blue_MiSfit
25th July 2010, 08:22
It does, but x264vfw cleverly allows you to write a placeholder AVI only, and use its own output engine to write anything x264cli can write :)

Derek

Mug Funky
26th July 2010, 05:02
i used a digital rapids system with mainconcept mpeg, and now am wishing the machine were still available.

however, my employers were too disagreeable to justify my staying there just for the digital rapids card. post is an ugly, ugly business and i saw the worst of it.

i'd dearly love to use x264 for HD capture where i am now though, as windows 7 sucks at sustained write speeds and uncompressed seems too much on the software i'm using (the stock blackmagic capture program), no matter how many steroids we've put in the hardware.

maybe i'll go find a "spare" SDI capture card and have a play...

Blue_MiSfit
26th July 2010, 07:30
Hey Mug Funky! :)

Does DR sell HD cards / software a la carte? I was under the impression that they only sold their SD cards / software, and the only way to get HD stuff from them was as a turnkey workstation / server.

I'd be interested in just plopping one of their cards in a server. Capping straight to MPEG-2 (and now x264), plus being able to pull 3:2 on the fly is pretty nice! Paying $40k a seat IS NOT :)

Derek

Mug Funky
26th July 2010, 14:10
i didn't buy the system, but it didn't seem like anything special. it was a quadcore box running XP. AFAIK the card and the software were the special bits. i'm sure it can be dismantled and popped in a new machine. does stream run off a dongle? i don't recall whether there was a dongle for procoder and stream, or just procoder on the back of that box.

if BMD had better directshow support i'd love to just use graphedit or some homebrew software to do everything on a commodity BMD card. i experimented with VLC and even skype in some instances, running a kona or blackmagic as a capture device. it's definitely cool to be able to skype someone and they see the output of a telecine and see their film running, albeit in a small frame with no guarantee of accurate colour. any rough guide is better than guesswork over the phone when clients are nowhere near the facility.

kolak
26th July 2010, 19:35
i used a digital rapids system with mainconcept mpeg, and now am wishing the machine were still available.

however, my employers were too disagreeable to justify my staying there just for the digital rapids card. post is an ugly, ugly business and i saw the worst of it.

i'd dearly love to use x264 for HD capture where i am now though, as windows 7 sucks at sustained write speeds and uncompressed seems too much on the software i'm using (the stock blackmagic capture program), no matter how many steroids we've put in the hardware.

maybe i'll go find a "spare" SDI capture card and have a play...

I can encode with eg. Cinevision and capture full HD 60i to Canopus HQ (or uncompressed) with HDThunder card and Edius in the same time :)
Never seen more stable capture solution. AJA or BM are way more sensitive.

Andrew

kolak
26th July 2010, 19:43
i didn't buy the system, but it didn't seem like anything special. it was a quadcore box running XP. AFAIK the card and the software were the special bits. i'm sure it can be dismantled and popped in a new machine. does stream run off a dongle? i don't recall whether there was a dongle for procoder and stream, or just procoder on the back of that box.

if BMD had better directshow support i'd love to just use graphedit or some homebrew software to do everything on a commodity BMD card. i experimented with VLC and even skype in some instances, running a kona or blackmagic as a capture device. it's definitely cool to be able to skype someone and they see the output of a telecine and see their film running, albeit in a small frame with no guarantee of accurate colour. any rough guide is better than guesswork over the phone when clients are nowhere near the facility.

BM works well with Media Player Classic, but no timecode control. You can capture to any fast codec.

Andrew

drc_mike
3rd August 2010, 14:51
Hey Mug Funky! :)

Does DR sell HD cards / software a la carte? I was under the impression that they only sold their SD cards / software, and the only way to get HD stuff from them was as a turnkey workstation / server.

I'd be interested in just plopping one of their cards in a server. Capping straight to MPEG-2 (and now x264), plus being able to pull 3:2 on the fly is pretty nice! Paying $40k a seat IS NOT :)

Derek

Digital Rapids' new series of HD cards, Flux, are available a la carte.

http://www.digital-rapids.com/Products/IndividualProducts/Flux.aspx

Note that if you're used to the turnkey systems, the card/software bundles include the Stream LE software (rather than the Stream FE software that comes with the turnkeys). If you need some of the automation and advanced features of the FE software, it's available as an upgrade for the a la carte bundles.

Mike

ifb
7th August 2010, 17:09
Digital Rapids' new series of HD cards, Flux, are available a la carte.

http://www.digital-rapids.com/Products/IndividualProducts/Flux.aspx

Note that if you're used to the turnkey systems, the card/software bundles include the Stream LE software (rather than the Stream FE software that comes with the turnkeys). If you need some of the automation and advanced features of the FE software, it's available as an upgrade for the a la carte bundles.

Mike
You guys should just license (http://mailman.videolan.org/pipermail/x264-devel/2010-July/007508.html) x264. It would give me a reason to upgrade from the old 2.x version of Stream I'm still running.

Then, while you enjoy all the extra money you've made, you can sponsor/contribute someone to get speedcontrol commited upstream. :)

Blue_MiSfit
7th August 2010, 18:31
@drc_mike:

Good to know! We just bought a turnkey system, but could always use more DR capacity... :) I'll probably be whining at someone for an evaluation unit soon!

Also, yes please do license x264 as soon as possible :devil:

Derek