Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Thilo Borgmann
Hi,

Am 08.06.20 um 16:36 schrieb Devin Heitmueller:
> On Sun, Jun 7, 2020 at 6:31 PM Thilo Borgmann  wrote:
>>
>>
>> Not sure if you don't mix it with Video screw me...
>> For Audio, I cannot find another device handling more than one format in one 
>> device.
>> I'd appreciate a better way to do it than having N-devices...
> 
> While not yet upstream, my version of the decklink output module
> provides a single avdevice that supports multiple formats, including
> AC-3 for passthrough.
> 
> https://github.com/LTNGlobal-opensource/FFmpeg-ltn/blob/lted1/libavdevice/decklink_enc.cpp

thanks! Patch v2 supports several codecs now :)

-Thilo
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Thilo Borgmann
Hi,

Am 08.06.20 um 16:27 schrieb Nicolas George:
> Thilo Borgmann (12020-06-08):
>> How do you avoid the auto-scaler to be scaling to alsa's default
>> format of pcm_s16 on the command line?
> 
> We cannot, not with your original version, not with how alsa_enc does
> and the new version.
> 
> Because they are not sample formats, they are codecs, and converting
> from a codec to another is more complex than just a resampler. And even
> if in these particular cases they are trivial codecs, they could easily
> not be: ALSA supports S/PDIF, so it could be AC3 or something.

yes I figured that codec thing out after querying on IRC. So with providing 
-a:c XY I can do all the formats (or pcm codecs so to speak) in one muxer where 
I had seperate muxers for before. So v2 works like the examples you gave for 
alsa. Might even work for compressed codecs depending on what OSX accepts.

However you say we cannot avoid the auto scaler? I'm not sure what you mean we 
cannot do...
And do you think v2 is still object for improvements regarding this?


> The solution to have format negotiation would be to make sure all output
> devices have a matching lavfi sink. Unfortunately, for now, I am not
> sure lavfi's scheduling work with non-buffer sinks. And it has other
> drawbacks, including preventing S/PDIF.

This let's me think you're referring to some more general design shortcomings. 
Not sure if you relate that to the patch or something in general we should do 
prior to do the audiotoolbox output device.

Thanks,
Thilo
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Devin Heitmueller
On Sun, Jun 7, 2020 at 6:31 PM Thilo Borgmann  wrote:
>
>
> Not sure if you don't mix it with Video screw me...
> For Audio, I cannot find another device handling more than one format in one 
> device.
> I'd appreciate a better way to do it than having N-devices...

While not yet upstream, my version of the decklink output module
provides a single avdevice that supports multiple formats, including
AC-3 for passthrough.

https://github.com/LTNGlobal-opensource/FFmpeg-ltn/blob/lted1/libavdevice/decklink_enc.cpp

Devin

-- 
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com  e: devin.heitmuel...@ltnglobal.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Nicolas George
Thilo Borgmann (12020-06-08):
> How do you avoid the auto-scaler to be scaling to alsa's default
> format of pcm_s16 on the command line?

We cannot, not with your original version, not with how alsa_enc does
and the new version.

Because they are not sample formats, they are codecs, and converting
from a codec to another is more complex than just a resampler. And even
if in these particular cases they are trivial codecs, they could easily
not be: ALSA supports S/PDIF, so it could be AC3 or something.

The solution to have format negotiation would be to make sure all output
devices have a matching lavfi sink. Unfortunately, for now, I am not
sure lavfi's scheduling work with non-buffer sinks. And it has other
drawbacks, including preventing S/PDIF.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Thilo Borgmann
Am 08.06.20 um 09:52 schrieb Michael Niedermayer:
> On Mon, Jun 08, 2020 at 12:26:28AM +0200, Thilo Borgmann wrote:
>> Hi,
>>
>> $subject.
>>
>> Enables native audio output on OSX.
>> OSX accepts numerous formats, so there are several output devices.
>>
>> -Thilo
> 
>>  configure  |3 
>>  libavdevice/Makefile   |1 
>>  libavdevice/alldevices.c   |   10 +
>>  libavdevice/audiotoolbox.m |  308 
>> +
>>  4 files changed, 322 insertions(+)
>> 21f03d85483da43f5de38101bc3b6d7367525297  
>> 0001-lavdevice-Add-AudioToolbox-output-device.patch
>> From bdabbc6a919ccff20d6ae16acff1a5d0f8ca46b8 Mon Sep 17 00:00:00 2001
>> From: Thilo Borgmann 
>> Date: Mon, 8 Jun 2020 00:20:25 +0200
>> Subject: [PATCH] lavdevice: Add AudioToolbox output device.
> 
> this breaks build on linux
> 
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
> reference to `ff_audiotoolbox_f32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
> reference to `ff_audiotoolbox_s32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
> reference to `ff_audiotoolbox_s24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
> reference to `ff_audiotoolbox_s16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
> reference to `ff_audiotoolbox_s8_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
> reference to `ff_audiotoolbox_u32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
> reference to `ff_audiotoolbox_u24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
> reference to `ff_audiotoolbox_u16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
> reference to `ff_audiotoolbox_u8_muxer'
> collect2: error: ld returned 1 exit status
> Makefile:114: recipe for target 'ffmpeg_g' failed
> make: *** [ffmpeg_g] Error 1
> make: *** Waiting for unfinished jobs
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
> reference to `ff_audiotoolbox_f32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
> reference to `ff_audiotoolbox_s32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
> reference to `ff_audiotoolbox_s24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
> reference to `ff_audiotoolbox_s16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
> reference to `ff_audiotoolbox_s8_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
> reference to `ff_audiotoolbox_u32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
> reference to `ff_audiotoolbox_u24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
> reference to `ff_audiotoolbox_u16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
> reference to `ff_audiotoolbox_u8_muxer'
> collect2: error: ld returned 1 exit status
> Makefile:114: recipe for target 'ffplay_g' failed
> make: *** [ffplay_g] Error 1
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
> reference to `ff_audiotoolbox_f32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
> reference to `ff_audiotoolbox_s32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
> reference to `ff_audiotoolbox_s24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
> reference to `ff_audiotoolbox_s16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
> reference to `ff_audiotoolbox_s8_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
> reference to `ff_audiotoolbox_u32_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
> reference to `ff_audiotoolbox_u24_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
> reference to `ff_audiotoolbox_u16_muxer'
> libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
> reference to `ff_audiotoolbox_u8_muxer'
> collect2: error: ld returned 1 exit status
> Makefile:114: recipe for target 'ffprobe_g' failed
> make: *** [ffprobe_g] Error 1
> 

Seen that, will fix, thx!

-Thilo
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-08 Thread Michael Niedermayer
On Mon, Jun 08, 2020 at 12:26:28AM +0200, Thilo Borgmann wrote:
> Hi,
> 
> $subject.
> 
> Enables native audio output on OSX.
> OSX accepts numerous formats, so there are several output devices.
> 
> -Thilo

>  configure  |3 
>  libavdevice/Makefile   |1 
>  libavdevice/alldevices.c   |   10 +
>  libavdevice/audiotoolbox.m |  308 
> +
>  4 files changed, 322 insertions(+)
> 21f03d85483da43f5de38101bc3b6d7367525297  
> 0001-lavdevice-Add-AudioToolbox-output-device.patch
> From bdabbc6a919ccff20d6ae16acff1a5d0f8ca46b8 Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Mon, 8 Jun 2020 00:20:25 +0200
> Subject: [PATCH] lavdevice: Add AudioToolbox output device.

this breaks build on linux

libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
reference to `ff_audiotoolbox_f32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
reference to `ff_audiotoolbox_s32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
reference to `ff_audiotoolbox_s24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
reference to `ff_audiotoolbox_s16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
reference to `ff_audiotoolbox_s8_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
reference to `ff_audiotoolbox_u32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
reference to `ff_audiotoolbox_u24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
reference to `ff_audiotoolbox_u16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
reference to `ff_audiotoolbox_u8_muxer'
collect2: error: ld returned 1 exit status
Makefile:114: recipe for target 'ffmpeg_g' failed
make: *** [ffmpeg_g] Error 1
make: *** Waiting for unfinished jobs
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
reference to `ff_audiotoolbox_f32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
reference to `ff_audiotoolbox_s32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
reference to `ff_audiotoolbox_s24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
reference to `ff_audiotoolbox_s16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
reference to `ff_audiotoolbox_s8_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
reference to `ff_audiotoolbox_u32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
reference to `ff_audiotoolbox_u24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
reference to `ff_audiotoolbox_u16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
reference to `ff_audiotoolbox_u8_muxer'
collect2: error: ld returned 1 exit status
Makefile:114: recipe for target 'ffplay_g' failed
make: *** [ffplay_g] Error 1
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x88): undefined 
reference to `ff_audiotoolbox_f32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x90): undefined 
reference to `ff_audiotoolbox_s32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0x98): undefined 
reference to `ff_audiotoolbox_s24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa0): undefined 
reference to `ff_audiotoolbox_s16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xa8): undefined 
reference to `ff_audiotoolbox_s8_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb0): undefined 
reference to `ff_audiotoolbox_u32_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xb8): undefined 
reference to `ff_audiotoolbox_u24_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc0): undefined 
reference to `ff_audiotoolbox_u16_muxer'
libavdevice/libavdevice.a(alldevices.o):(.data.rel.ro+0xc8): undefined 
reference to `ff_audiotoolbox_u8_muxer'
collect2: error: ld returned 1 exit status
Makefile:114: recipe for target 'ffprobe_g' failed
make: *** [ffprobe_g] Error 1

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-07 Thread Thilo Borgmann
Am 08.06.20 um 00:35 schrieb Nicolas George:
> Thilo Borgmann (12020-06-08):
>> Not sure if you don't mix it with Video screw me...
> 
> Oh, that's why you re-sent the patch. I could not spot the difference.
> 
>> For Audio, I cannot find another device handling more than one format in one 
>> device.
>> I'd appreciate a better way to do it than having N-devices...
> 
> alsa_enc.c, at least:
> 
> Output #0, alsa, to 'default':
>   Metadata:
> encoder : Lavf58.42.100
> Stream #0:0: Audio: pcm_u8, 44100 Hz, mono, u8, 352 kb/s (default)
> 
> Output #0, alsa, to 'default':
>   Metadata:
> encoder : Lavf58.42.100
> Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s (default)
> 
> Output #0, alsa, to 'default':
>   Metadata:
> encoder : Lavf58.42.100
> Stream #0:0: Audio: pcm_f32le, 44100 Hz, mono, flt, 1411 kb/s (default)

I guess I see how it does that.
How do you avoid the auto-scaler to be scaling to alsa's default format of 
pcm_s16 on the command line?

-Thilo
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-07 Thread Nicolas George
Thilo Borgmann (12020-06-08):
> Not sure if you don't mix it with Video screw me...

Oh, that's why you re-sent the patch. I could not spot the difference.

> For Audio, I cannot find another device handling more than one format in one 
> device.
> I'd appreciate a better way to do it than having N-devices...

alsa_enc.c, at least:

Output #0, alsa, to 'default':
  Metadata:
encoder : Lavf58.42.100
Stream #0:0: Audio: pcm_u8, 44100 Hz, mono, u8, 352 kb/s (default)

Output #0, alsa, to 'default':
  Metadata:
encoder : Lavf58.42.100
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s (default)

Output #0, alsa, to 'default':
  Metadata:
encoder : Lavf58.42.100
Stream #0:0: Audio: pcm_f32le, 44100 Hz, mono, flt, 1411 kb/s (default)

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-07 Thread Thilo Borgmann
Am 08.06.20 um 00:28 schrieb Nicolas George:
> Thilo Borgmann (12020-06-08):
>> OSX accepts numerous formats, so there are several output devices.
> 
> The other audio output devices support all formats in a single device.
> Why does Apple need to be different again?

Not sure if you don't mix it with Video screw me...
For Audio, I cannot find another device handling more than one format in one 
device.
I'd appreciate a better way to do it than having N-devices...

echo $subject | sed -e 's/Video/Audio/g' | send_new_mail()

#TooLate

-Thilo

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavdevice: Add VideoToolbox output device.

2020-06-07 Thread Nicolas George
Thilo Borgmann (12020-06-08):
> OSX accepts numerous formats, so there are several output devices.

The other audio output devices support all formats in a single device.
Why does Apple need to be different again?

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".