FFMPEG - Recording sound from jack

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FFMPEG - Recording sound from jack

list
Hello.

Debian 9 - Stretch.
ffmpeg version 3.2.5-1
I run Jackd from Qjackctl

jackd2 1.9.10+20150825git1ed50c92~dfsg-5



cat /proc/asound/cards

 1 [AVB            ]: USB-Audio - UltraLite AVB
                      MOTU UltraLite AVB at usb-0000:00:1a.7-5, high
                      speed



aplay -l

**** Liste des Périphériques Matériels PLAYBACK ****
carte 1: AVB [UltraLite AVB], périphérique 0: USB Audio [USB Audio]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0





When i try to record my screen i use :

ffmpeg -f x11grab -s 1920x1080 -r 25 -i :0.0 00screencast.mp4

And it's working great.



But, when i try to add the sound.... no success

ffmpeg -f alsa -ac 2 -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
00screencast.mp4

[alsa @ 0x563a80c18b60] cannot open audio device hw:1 (Device or
resource busy)
hw:1: Input/output error




arecord -l

**** Liste des Périphériques Matériels CAPTURE ****
carte 1: AVB [UltraLite AVB], périphérique 0: USB Audio [USB Audio]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0




arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
jack
sysdefault:CARD=AVB
    UltraLite AVB, USB Audio
    Default Audio Device
front:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Front speakers
surround21:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct sample mixing device
dsnoop:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct sample snooping device
hw:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Hardware device with all software conversions



ffmpeg -f alsa -ac 2 -i plughw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
test.mp4

[alsa @ 0x55be84165b60] cannot open audio device plughw:1 (Device or
resource busy) plughw:1: Input/output error




Any advices, feeback, experiences.... ?

All the best.



_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

Paul Davis
Some other progream is using your Ultralite AVB.

Run this command from a terminal to find out what is using it:

   cd /tmp && wget http://jackaudio.org/downloads/adevices.sh && bash ./adevices.sh

On Mon, Aug 7, 2017 at 8:12 PM, list <[hidden email]> wrote:
Hello.

Debian 9 - Stretch.
ffmpeg version 3.2.5-1
I run Jackd from Qjackctl

jackd2 1.9.10+20150825git1ed50c92~dfsg-5



cat /proc/asound/cards

 1 [AVB            ]: USB-Audio - UltraLite AVB
                      MOTU UltraLite AVB at usb-0000:00:1a.7-5, high
                      speed



aplay -l

**** Liste des Périphériques Matériels PLAYBACK ****
carte 1: AVB [UltraLite AVB], périphérique 0: USB Audio [USB Audio]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0





When i try to record my screen i use :

ffmpeg -f x11grab -s 1920x1080 -r 25 -i :0.0 00screencast.mp4

And it's working great.



But, when i try to add the sound.... no success

ffmpeg -f alsa -ac 2 -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
00screencast.mp4

[alsa @ 0x563a80c18b60] cannot open audio device hw:1 (Device or
resource busy)
hw:1: Input/output error




arecord -l

**** Liste des Périphériques Matériels CAPTURE ****
carte 1: AVB [UltraLite AVB], périphérique 0: USB Audio [USB Audio]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0




arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
jack
sysdefault:CARD=AVB
    UltraLite AVB, USB Audio
    Default Audio Device
front:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Front speakers
surround21:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct sample mixing device
dsnoop:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct sample snooping device
hw:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=AVB,DEV=0
    UltraLite AVB, USB Audio
    Hardware device with all software conversions



ffmpeg -f alsa -ac 2 -i plughw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
test.mp4

[alsa @ 0x55be84165b60] cannot open audio device plughw:1 (Device or
resource busy) plughw:1: Input/output error




Any advices, feeback, experiences.... ?

All the best.



_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

list
Hello.

Nop.

Only Jackd using it - and qjackctl.

* Playback Device 0 (USB Audio):
used by: jackd (PID 904)

*Recording Device 0 (USB Audio):
used by: jackd (PID 904)


Part II: jack processes
  809 ?        S      0:00 /bin/sh -c qjackctl
  811 ?        SLl    0:22 qjackctl


I guess it's more an ffmpeg option trick....





Le Mon, 7 Aug 2017 20:23:12 -0400,
Paul Davis <[hidden email]> a écrit :

> Some other progream is using your Ultralite AVB.
>
> Run this command from a terminal to find out what is using it:
>
>    cd /tmp && wget http://jackaudio.org/downloads/adevices.sh && bash
> ./adevices.sh

> >  

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

Chris Caudle
On Tue, August 8, 2017 9:28 am, list wrote:
> Only Jackd using it - and qjackctl.

Your original email had this as the ffmpeg command:
ffmpeg -f alsa -ac 2 -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
00screencast.mp4

You are telling ffmpeg to use the ALSA device, but the ALSA device is in
use by jackd.
If you want to have ffmpeg capture the ALSA device then don't start jackd.
 If you want to have ffmpeg use jackd ports then read the ffmpeg man page
for the correct options.  The "-f" argument would be jack instead of alsa,
but you have to look at all the details of how to get the ports connected
correctly.  I think you need to use qjackctl or jack_connect to connect
the ports after starting ffmpeg.

--
Chris Caudle


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

list
Oh yeah, you are right.

But it's a copy/paste of one of the trick i've tried, my mistake

Sure i've already done an  :

ffmpeg -f jack -ac 2  -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
nul.mp4

But the same...

Stangely the jack_capture - or audacity - command work great...but i
want to avoid having, 1 sound file, 1 video file and then join them :/
Dont want to bring out the big guns for that.



Still looking....

Thank you anyway for reading.

All the best.





Le Tue, 8 Aug 2017 10:11:41 -0500,
"Chris Caudle" <[hidden email]> a écrit :

> On Tue, August 8, 2017 9:28 am, list wrote:
> > Only Jackd using it - and qjackctl.  
>
> Your original email had this as the ffmpeg command:
> ffmpeg -f alsa -ac 2 -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
> 00screencast.mp4
>
> You are telling ffmpeg to use the ALSA device, but the ALSA device is
> in use by jackd.
> If you want to have ffmpeg capture the ALSA device then don't start
> jackd. If you want to have ffmpeg use jackd ports then read the
> ffmpeg man page for the correct options.  The "-f" argument would be
> jack instead of alsa, but you have to look at all the details of how
> to get the ports connected correctly.  I think you need to use
> qjackctl or jack_connect to connect the ports after starting ffmpeg.
>

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

Chris Caudle
On Tue, August 8, 2017 10:29 am, list wrote:
> Sure i've already done an  :
> ffmpeg -f jack -ac 2  -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
> nul.mp4

The input descriptor you used, "-i hw:1" is the format for describing ALSA
device numbers.

I will repeat my earlier admonition to read the ffmpeg man page to see how
you connect jack ports to ffmpeg.
https://www.ffmpeg.org/ffmpeg-devices.html#jack

--
Chris Caudle


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FFMPEG - Recording sound from jack

list
Yes.
Thank you very much.
All the best.




Le Tue, 8 Aug 2017 10:40:41 -0500,
"Chris Caudle" <[hidden email]> a écrit :

> On Tue, August 8, 2017 10:29 am, list wrote:
> > Sure i've already done an  :
> > ffmpeg -f jack -ac 2  -i hw:1 -f x11grab -s 1920x1080 -r 25 -i :0.0
> > nul.mp4  
>
> The input descriptor you used, "-i hw:1" is the format for describing
> ALSA device numbers.
>
> I will repeat my earlier admonition to read the ffmpeg man page to
> see how you connect jack ports to ffmpeg.
> https://www.ffmpeg.org/ffmpeg-devices.html#jack
>

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Loading...