FFmpeg RGB capture with Intensity Pro 4K

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Cédric Lalouette

  • Posts: 13
  • Joined: Fri Aug 18, 2017 8:10 am

FFmpeg RGB capture with Intensity Pro 4K

PostMon Aug 21, 2017 3:34 pm

Hello !

I'm trying to capture RGB video (even 422 is complicated in fact...) with my Intensity Pro 4K but, it seems complicated.... as I always have a black video at the end.

It seems that FFmpeg can't reach the yuv444 pin of the Intensity Pro 4K and uses the yuv422 instead. And... at the end the video is black.

I am using the latest FFmpeg compiled with the --enable-decklink tag, and of course everything works fine with Media Express. All my Blackmagic drivers are up-to-date (10.9.5)

I tried the exact same command line with another capture card (Intensity Shuttle) and it works fine.

Does anyone ever experienced this behaviour with RGB/444 capture in FFmpeg ? Thank you for your help !

Here is the kind of command line I am using :

Ok with my Intensity Shuttle for 422 10 bits capture : ffmpeg.exe -f decklink -bm_v210 1 -format_code "hp60" -i "Intensity Shuttle" -r 60 -vcodec copy -acodec copy output.avi

Gives me a black screen with my Intensity Pro 4K : ffmpeg.exe -f decklink -bm_v210 1 -format_code "hp60" -i "Intensity Pro 4K" -r 60 -vcodec copy -acodec copy output.avi

Of course what I want is RGB/444 capture with my Intensity Pro 4K (at least yuv422...).

Thank you for your help !
Offline

Andrew Gibb

  • Posts: 32
  • Joined: Wed Aug 23, 2017 10:31 am

Re: FFmpeg RGB capture with Intensity Pro 4K

PostWed Aug 23, 2017 11:13 am

Hi Cédric,

I'm guessing that you're on a Mac as you haven't mentioned the current lack of Decklink device support in the Zeranoe FFmpeg builds. What follows is what works for me on a Windows machine.

I think you need to specify the format number of the resolution and frame rate you wish to record at with your Intensity Pro 4K.

To list what formats your Intensity Pro 4K can capture at type the following:
Code: Select all
ffmpeg -f decklink -list_formats 1 -i "Intensity Pro 4K"

NOTE: The @[FormatNumber] method below will soon be deprecated. Use -format_code to specify the format you wish to use.

This should produce a list of capture format similar to my DeckLink HD Extreme 3D+ :
Code: Select all
Supported formats for 'DeckLink HD Extreme 3D+':
  1       720x486 at 30000/1001 fps (interlaced, lower field first)
  2       720x486 at 24000/1001 fps
  3       720x576 at 25000/1000 fps (interlaced, upper field first)
  4       1920x1080 at 24000/1001 fps
  5       1920x1080 at 24000/1000 fps
  6       1920x1080 at 25000/1000 fps
  7       1920x1080 at 30000/1001 fps
  8       1920x1080 at 30000/1000 fps
  9       1920x1080 at 25000/1000 fps (interlaced, upper field first)
  10      1920x1080 at 30000/1001 fps (interlaced, upper field first)
  11      1920x1080 at 30000/1000 fps (interlaced, upper field first)
  12      1920x1080 at 50000/1000 fps
  13      1920x1080 at 60000/1001 fps
  14      1920x1080 at 60000/1000 fps
  15      1280x720 at 50000/1000 fps
  16      1280x720 at 60000/1001 fps
  17      1280x720 at 60000/1000 fps

In my case, I wanted to capture at 1920x1080 at 25p, which is format option 6, so I used the following line to capture at that resolution and frame rate:
Code: Select all
ffmpeg -f decklink -video_input hdmi -bm_v210 1 -audio_input embedded -channels 2 -i "DeckLink HD Extreme 3D+@6" -r 25 -vcodec copy -acodec copy output.avi

So the formatting of your ffmpeg input (-i) would be something like:
Code: Select all
-i "Intensity Pro 4K@[FormatNumber]"


You can also get FFmpeg to "preview" the input into your card by using the following:
Code: Select all
ffplay -f decklink -channels 2 -video_input hdmi -audio_input embedded -i "Intensity Pro 4K@[FormatNumber]" -vf scale=1280:720

I hope this helps in some way.
Last edited by Andrew Gibb on Thu Aug 24, 2017 7:06 am, edited 1 time in total.
Offline

Andrew Gibb

  • Posts: 32
  • Joined: Wed Aug 23, 2017 10:31 am

Re: FFmpeg RGB capture with Intensity Pro 4K

PostWed Aug 23, 2017 12:51 pm

Hi Cédric,

I've done a bit more research into the v210 codec and it looks like it only handles uncompressed 4:2:2 10-bit video, so no 4:4:4.

When I specify -bm_v210 when capturing on my (old-ish) DeckLink HD Extreme 3D, the input pixel format presented to FFmpeg is yuv422p10le (10bit video), and when I don't specify -bm_v210 (leave it out of the command line), then the input pixel format is presented as "rawvideo" uyvy422 (possibly only 8bit video). As you can see neither are 4:4:4. I don't think my capture card can capture 4:4:4 video - are you sure your card can capture 4:4:4 video?

If you need 4:4:4 chroma subsampling in the output video file you could always get FFmpeg to force it by adding the following :
Code: Select all
-pix_fmt yuv444p10le
as in
fmpeg.exe -f decklink -bm_v210 1 -i "Intensity Pro 4K@[FormatNumber]" -r 60 -pix_fmt yuv444p10le -vcodec [CodecThatSupports444] -acodec copy output.avi

A suitable 4:4:4 codec might be one of the following:
Code: Select all
Uncompressed packed 4:4:4
-vcodec v308

Uncompressed 4:4:4 10-bit
-vcodec v410

If you require RGB output try specifying an RGB codec:-
Code: Select all
AJA Kona 10-bit RGB Codec
-vcodec r10k

Uncompressed RGB 10-bit
-vcodec r210

Good luck!
Offline

Cédric Lalouette

  • Posts: 13
  • Joined: Fri Aug 18, 2017 8:10 am

Re: FFmpeg RGB capture with Intensity Pro 4K

PostThu Aug 24, 2017 7:42 am

Hello Andrew !

Thank you for your help ;). I did also did some research and it seems that FFmpeg is not ready to handle 4:4:4 or RGB inputs..... it is as simple as that !

Of course I can force RGB/444 output but... if the input signal is 4:2:2 the 4:4:4 output is useless for me.

I hope that someone will update FFmpeg and add the 4:4:4 support for capture cards.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 18 guests