[FFmpeg-devel] [PATCH 2/4] avdevice/decklink_enc: add support to specify field order
Marton Balint
cus at passwd.hu
Fri Feb 24 01:32:02 EET 2017
On Thu, 23 Feb 2017, Matthias Hunstock wrote:
> Am 23.02.2017 um 17:24 schrieb Marton Balint:
>>> The "@mode" syntax does not work for output devices. Let me add a patch,
>>> I will send it tonight.
>>
>> Please don't. The @mode syntax is insane. You need a different @mode for
>> different hardware to get the same output format. @mode may even be
>> different across driver versions.
>
> I know... the numbers are really a mess.
>
> What about supporting the mode strings? They are constant:
>
> bmdModeHD1080i50 = /* 'Hi50' */ 0x48693530
>
> At least for capture this is IMO a benefit:
>
> ffmpeg -f decklink -i 'DeckLink Duo at Hi50'
>
> For playout... well if the automatic detection works and interlaced flag
> is always correct, fps is always correct (30 vs 29.97)... to be honest:
> if I'd do a setup, I'd sleep better with an explicit mode. But yeah, not
> those numbers.
Specifying the mode based on the decklink fourcc makes more sense.
On the other hand, for output, you'd still have to check if the stream
parameters are correct and if they are corresponding to the wanted mode.
So if the user specify the mode with a decklink mode fourcc, you could
only do a check like this (with &&):
if ((bmd_width == width &&
bmd_height == height &&
!av_cmp_q(mode_tb, target_tb) &&
field_order_eq(field_order, bmd_field_dominance) &&
mode == bmd_mode) || i == num) {
For input, using a decklink fourcc to specify a mode would be definitely
useful.
However, I don't like the @anything part in the device name. If you add
this feature, I'd very much prefer a separate option of the device,
'format' maybe. I'd even deprecate @mode in the device name later.
Regards,
Marton
More information about the ffmpeg-devel
mailing list