maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Recording problem using different applications. (https://talk.maemo.org/showthread.php?t=99444)

NotMicro 2017-06-26 10:53

Re: Recording problem using different applications.
 
Quote:

Originally Posted by ontime (Post 1529532)
ah, right
for manual stop, press Ctrl+c in the same terminal
or
send SIGINT (kill -2 $PID) to gstreamer:
Code:

kill -2 `pidof gst-launch-0.10`

Thank you for this. And what do you think about my problems with playing recorded file audio.m4a.

ontime 2017-06-26 13:47

Re: Recording problem using different applications.
 
wrong stopped or crash - lack metadata in file
if you have mplayer:
Code:

mplayer -quiet -slave -frames 0 -vo null -ao null -identify audio.m4a

NotMicro 2017-06-27 13:46

Re: Recording problem using different applications.
 
Quote:

Originally Posted by ontime (Post 1529691)
wrong stopped or crash - lack metadata in file
if you have mplayer:
Code:

mplayer -quiet -slave -frames 0 -vo null -ao null -identify audio.m4a


Thank you once again for this outstanding solutions. I am really very very impressed. You are a real audio professsional !! Problem solved thanks to your advice how to stop recording. After this, file is correct and fully playable.
If you would be so kind please answer for some questions, what may have been useful for many users.

1. If I am recording quiet sounds some clicking is heard in the background. No matter if this is wav or m4a audio and which application is used for recording. This problem was also described in this thread:

http://talk.maemo.org/showthread.php?t=54860

2. When I am recording sound using, for example, recorder app high volume sounds are almost always oversteered. In VoiceNote or when recording video with standard camerra application are not.
Do you know why is it so?

3. Is there any difference between recording "m4a" sound with the standard camera application and this method you have proposed? I mean set of commands.

4. What is the meaning of output-format parameter. What could have happen when this is different from 0.

ontime 2017-06-27 16:46

Re: Recording problem using different applications.
 
Quote:

1. If I am recording quiet sounds some clicking is heard in the background. No matter if this is wav or m4a audio and which application is used for recording. This problem was also described in this thread:

http://talk.maemo.org/showthread.php?t=54860
put here sample with this clicking noise

Quote:

2. When I am recording sound using, for example, recorder app high volume sounds are almost always oversteered. In VoiceNote or when recording video with standard camerra application are not.
Do you know why is it so?
try this in xterm
Code:

amixer -qc0 set PGA 0
and
Code:

alsamixer -c0
When you click Tab, you'll see all capture settings. You can use arrow keys to adjust it.
or
You can use different audio source instead of 'source.hw0':

source.voice (hardware dsp)
source.record

Code:

gst-launch-0.10 -e pulsesrc device=source.record ! audio/x-raw-float,channels=1 ! audioconvert ! nokiaaacenc bitrate=64000 output-format=0 ! hantromp4mux ! audio/x-m4a ! filesink location=/home/user/MyDocs/audio.m4a
Quote:

3. Is there any difference between recording "m4a" sound with the standard camera application and this method you have proposed? I mean set of commands.
camera application vs gstreamer:
- audio bitrate - 128kbps vs you can choose
- audio rate - 48000Hz vs 44100Hz
- audio source - source.record vs you can choose (ad 2.)

- both has one channel
- the same codec - nokiaaacenc
- the same container - hantromp4mux

Quote:

4. What is the meaning of output-format parameter. What could have happen when this is different from 0.
Code:

gst-inspect-0.10 nokiaaacenc
(0): RAW - AAC Raw format (it needs container)
(1): ADTS - Audio Data Transport Stream format (can be streams directly into playable aac file)
(2): ADIF - Audio Data Interchange Format

NotMicro 2017-07-03 13:14

Re: Recording problem using different applications.
 
2 Attachment(s)
Quote:

Originally Posted by ontime (Post 1529753)
put here sample with this clicking noise



try this in xterm
Code:

amixer -qc0 set PGA 0
and
Code:

alsamixer -c0
When you click Tab, you'll see all capture settings. You can use arrow keys to adjust it.
or
You can use different audio source instead of 'source.hw0':

source.voice (hardware dsp)
source.record

Code:

gst-launch-0.10 -e pulsesrc device=source.record ! audio/x-raw-float,channels=1 ! audioconvert ! nokiaaacenc bitrate=64000 output-format=0 ! hantromp4mux ! audio/x-m4a ! filesink location=/home/user/MyDocs/audio.m4a


camera application vs gstreamer:
- audio bitrate - 128kbps vs you can choose
- audio rate - 48000Hz vs 44100Hz
- audio source - source.record vs you can choose (ad 2.)

- both has one channel
- the same codec - nokiaaacenc
- the same container - hantromp4mux



Code:

gst-inspect-0.10 nokiaaacenc
(0): RAW - AAC Raw format (it needs container)
(1): ADTS - Audio Data Transport Stream format (can be streams directly into playable aac file)
(2): ADIF - Audio Data Interchange Format




Here are the samples of clicking noise. I have noticed that when sim card is "active" clicking noise has higher frequency; when the phone is in offline mode this frequency is lower. Audio04 is the sample of this first situation, Audio05 for the second one. Additionally, in this second situation I hear probably more distortions to the recorded sound.

NotMicro 2017-07-03 13:21

Re: Recording problem using different applications.
 
Quote:

Originally Posted by ontime (Post 1529753)
You can use different audio source instead of 'source.hw0':

source.voice (hardware dsp)
source.record

Do you know what is the difference in parameters and quality of recorded sound using these sources? And why source.voice has hardware dsp support and others have not?

NotMicro 2017-07-03 13:27

Re: Recording problem using different applications.
 
Quote:

Originally Posted by ontime (Post 1528840)
this set gain for it (0-127), here is 60
Code:

amixer -qc0 set PGA 60

Is this a setting for all types of recording source(that is - microphone) ? What is the default value of this parameter? Has N900 option to use AGC in recording? And how to turn it on?

ontime 2017-07-03 17:38

Re: Recording problem using different applications.
 
Quote:

I have noticed that when sim card is "active" clicking noise has higher frequency; when the phone is in offline mode this frequency is lower
If audio04.m4a and audio05.m4a was recorded by build in mic or headset mic? How do you recognize if sim card is active or not? Are you meaning active sim card as gsm online or making call / send / receive sms?

source.voice (hardware dsp)
source.record
Quote:

Do you know what is the difference in parameters and quality of recorded sound using these sources? And why source.voice has hardware dsp support and others have not?
I think source.voice has 8000kHz by default.
source.record has wider range 8000, 11025, 16000, 22050, 44100, 48000 [kHz] or sth like that.

Why don't you check its quality? You can use gstreamer for that. Source.voice is optimized for better understanding human voice through gsm transmision and maybe for some background noise cancellation.

Quote:

Is this a setting for all types of recording source(that is - microphone) ? What is the default value of this parameter?
default is 0, I think. It's for headset mic and fm radio at least.

Quote:

Has N900 option to use AGC in recording? And how to turn it on?
yes, is has
Code:

amixer -qc0 cset name='AGC Switch' on
amixer -qc0 cset name='AGC Switch' off

or you can find it in
Code:

alsamixer -c0
can be changed by 'm' key

NotMicro 2017-07-05 15:35

Re: Recording problem using different applications.
 
Thank you once again for your complete answer. It is really something !!

Quote:

Originally Posted by ontime (Post 1530082)
If audio04.m4a and audio05.m4a was recorded by build in mic or headset mic? How do you recognize if sim card is active or not? Are you meaning active sim card as gsm online or making call / send / receive sms?

It was recorded by build-in mic. Active means gsm online. I didn't test recording during making call yet.

NotMicro 2017-07-05 15:40

Re: Recording problem using different applications.
 
Quote:

Originally Posted by ontime (Post 1530082)
Why don't you check its quality? You can use gstreamer for that.

Could you, please, explain how to use gstreamer to test quality of recording. And what quality means - parameters of recordng (for example - sample frequency) or levels, oversteering etc. ?


All times are GMT. The time now is 05:36.

vBulletin® Version 3.8.8