×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    3

    Buggy AMR Audio Recording. Please Help!!

    Hi all,

    I have been trying to solve this problem for several weeks now and it is getting very frustrating. I have seen several useful posts on how to play back AMR-encoded audio, but I haven't been able to get AMR recording to work correctly when mixed with playback. My app. has to work with the Nokia 3650, so I can't rely on any of the new 2.0 API's.

    I'm trying to do basically a clone of the Voice Recorder app as part of a larger application. My first approach was to use the CMdaAudioRecorderUtility (with TMdaRawAmrClipFormat and TMdaRawAmrAudioCodec), using a temp. file for the location. Bug #1 was that the last 0.6 seconds of the audio file were getting cut off, so I had to set a timer callback to wait 0.6 seconds before stopping the recording.

    Bug #2 is where I'm stuck. When the user saves the audio, I want to Close() the recorder, copy the file, then re-open the recorder. I only got this to work reliably by using another callback with a delay of 0.5 sec before closing. The problem is that, if the user plays back their recording before saving, about half the time I get a MdaAudioSampleEditor panic 1 (NotReady). Adding additional delays didn't help. Is there some magic trick to closing and reopening this beast?

    The alternate approach I tried was to record in PCM format to a descriptor (since I only got crashes when trying to use the AMR encoder with a descriptor), and manually convert the audio on load/save. For loading, I can use the CMdaAudioConvertUtility, but it is too slow (6.7 seconds for a 60 second clip). I could only get saving to work by using the low level CPcmToAmrEncoder class, and it is really slow (25 sec. for a 60 sec. clip).

    My current attempt is to try to encode the audio to AMR while it's recording to the PCM descriptor, and try to avoid any race conditions (I noticed there's a thread ID field in TMdaDesClipLocation..). For playback, I can try playing directly from the file.

    So, guys and gals, what's the magic secret to using these buggy, poorly documented, audio API classes for both recording and playback? Anyone experiencing these sorts of difficulties? I'm nearly at my wit's end...

    Thanks in advance!

    -Jake Hamby

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    12

    Buggy AMR Audio Recording

    Yes, I too am facing similar problems. I have built a portable Symbian app that does recording and playback. The recording on Nokia devices has been buggy. I somehow got to work PCM recording and used the AMR to PCM conversion for the 3650.
    One has to use Series60_v20 for Nokia 6600. The specs/documentation don't say it supports AMR, so I had to copy AMRDLL.DLL from Series60_v1.2. But few people have been successful recording in AMR using the recorderUtility.

    Nokia folks neither seem to acknowledge these problems nor willing to resolve them in the discussion boards.

    Vikas

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    3
    Never mind.. I set some breakpoints in the debugger and was able to see how the voice recorder app. uses the CMdaRecorderUtility.

    The key seems to be that it uses the OpenL() method to open an audio file for recording, then closes and reopens with OpenFileL() for playback. I also discovered that I may have been calling Position() and Duration() from a different part of the program while the recorder object was in the process of closing or reopening.

    BTW, the voice recorder constructs the RecorderUtility object using CMdaAudioRecorderUtility::NewL(*observer, 0, 80, EMdaPriorityPreferenceTime | 0x0600). I don't know what the 0x0600 flags are for, but they don't seem to be necessary.

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    7

    Red face Re: Buggy MP4 Audio Recording

    With a Nokia 6220c-1, I created a voice recording, during which a call is received on the same phone. I answered and closed the conversation and the voice recording. I renamed also the mp4 file of the clip recorded. The recorded file is over 10MB video/mp4.

    It seems to me that the file is corrupted, the ca. 10 MB available, but the sudden interruption of the recording could have generated a bug.

    - Quick Time don't open the mp4 clip becouse "it is not a movies", (it can open other similar mp4 clip).

    - Mpeg Streamclip don't open the mp4 clip becouse "file unknowed", (it can open other similar mp4 clip). With the option "Open anyway" it show "Error Opening file: "it is not possible to find video or audio tracks".

    - VLC show the following answer:

    main debug: CPU has capabilities AltiVec FPU
    main debug: looking for memcpy module: 2 candidates
    main debug: using memcpy module "memcpyaltivec"
    main debug: waiting for thread completion
    main debug: thread 25193984 (playlist) created at priority -47 (playlist/playlist.c:184)
    main debug: waiting for thread completion
    main debug: thread 26137088 (preparser) created at priority -47 (playlist/playlist.c:210)
    main debug: looking for interface module: 1 candidate
    main debug: using interface module "hotkeys"
    main debug: thread 26150400 (interface) created at priority -47 (interface/interface.c:198)
    main debug: looking for interface module: 3 candidates
    main debug: using interface module "macosx"
    main debug: thread 26143744 (manage) created at priority -47 (interface/interface.c:164)
    main debug: adding playlist item `MP + MC' ( /Users/fc/Movies/MP + MC.mp4 )
    main debug: creating new input thread
    main debug: waiting for thread completion
    main debug: thread 26673664 (input) created at priority 37 (input/input.c:261)
    main debug: creating statistics handler
    main debug: `/Users/fc/Movies/MP + MC.mp4' gives access `' demux `' path `/Users/fc/Movies/MP + MC.mp4'
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access_demux module: 1 candidate
    macosx debug: input has changed, refreshing interface
    main debug: creating access '' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access2 module: 7 candidates
    vcd debug: trying .cue file: /Users/fc/Movies/MP + MC.cue
    access_file debug: opening file `/Users/fc/Movies/MP + MC.mp4'
    main debug: using access2 module "access_file"
    main debug: pre-buffering...
    main debug: received first data for our buffer
    main debug: pre-buffering done 1408981 bytes in 0s - 238261 kbytes/s
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for demux2 module: 43 candidates
    mp4 debug: found Box: ftyp size 28
    mp4 debug: found an empty box (null size)
    mp4 debug: dumping root Box "root"
    mp4 debug: | + ftyp size 28
    mp4 debug: unrecognized major file specification (mp42).
    mp4 error: MP4 plugin discarded (no moov box)
    ffmpeg debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
    access_file error: seeking too far
    access_file error: seeking too far
    ffmpeg debug: AVFormat supported stream
    ffmpeg debug: - format = mov,mp4,m4a,3gp,3g2,mj2 (QuickTime/MPEG4/Motion JPEG 2000 format)
    ffmpeg debug: - start time = -1
    ffmpeg debug: - duration = -1
    main debug: using demux2 module "ffmpeg"
    main debug: looking for a subtitle file in /Users/fc/Movies/
    main debug: `/Users/fc/Movies/MP + MC.mp4' successfully opened
    main debug: EOF reached
    macosx debug: input has stopped, refreshing interface
    main debug: closing input
    main debug: removing module "ffmpeg"
    main debug: removing module "access_file"
    main debug: thread 26673664 joined (input/input.c:399)
    main: nothing to play
    main debug: creating new input thread
    main debug: waiting for thread completion
    main debug: thread 26758144 (input) created at priority 37 (input/input.c:261)
    main debug: `/Users/fc/Movies/MP + MC.mp4' gives access `' demux `' path `/Users/fc/Movies/MP + MC.mp4'
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access_demux module: 1 candidate
    main debug: creating access '' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access2 module: 7 candidates
    vcd debug: trying .cue file: /Users/fc/Movies/MP + MC.cue
    access_file debug: opening file `/Users/fc/Movies/MP + MC.mp4'
    main debug: using access2 module "access_file"
    main debug: pre-buffering...
    main debug: received first data for our buffer
    main debug: pre-buffering done 1408981 bytes in 0s - 271445 kbytes/s
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for demux2 module: 43 candidates
    mp4 debug: found Box: ftyp size 28
    mp4 debug: found an empty box (null size)
    mp4 debug: dumping root Box "root"
    mp4 debug: | + ftyp size 28
    mp4 debug: unrecognized major file specification (mp42).
    mp4 error: MP4 plugin discarded (no moov box)
    ffmpeg debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
    access_file error: seeking too far
    access_file error: seeking too far
    ffmpeg debug: AVFormat supported stream
    ffmpeg debug: - format = mov,mp4,m4a,3gp,3g2,mj2 (QuickTime/MPEG4/Motion JPEG 2000 format)
    ffmpeg debug: - start time = -1
    ffmpeg debug: - duration = -1
    main debug: using demux2 module "ffmpeg"
    main debug: looking for a subtitle file in /Users/fc/Movies/
    main debug: `/Users/fc/Movies/MP + MC.mp4' successfully opened
    main debug: EOF reached
    macosx debug: input has changed, refreshing interface
    main debug: closing input
    main debug: removing module "ffmpeg"
    main debug: removing module "access_file"
    macosx debug: input has stopped, refreshing interface
    main debug: thread 26758144 joined (input/input.c:399)
    main: nothing to play
    main debug: creating new input thread
    main debug: waiting for thread completion
    main debug: thread 26859520 (input) created at priority 37 (input/input.c:261)
    main debug: `/Users/fc/Movies/MP + MC.mp4' gives access `' demux `' path `/Users/fc/Movies/MP + MC.mp4'
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access_demux module: 1 candidate
    main debug: creating access '' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access2 module: 7 candidates
    vcd debug: trying .cue file: /Users/fc/Movies/MP + MC.cue
    access_file debug: opening file `/Users/fc/Movies/MP + MC.mp4'
    main debug: using access2 module "access_file"
    main debug: pre-buffering...
    main debug: received first data for our buffer
    main debug: pre-buffering done 1408981 bytes in 0s - 328783 kbytes/s
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for demux2 module: 43 candidates
    mp4 debug: found Box: ftyp size 28
    mp4 debug: found an empty box (null size)
    mp4 debug: dumping root Box "root"
    mp4 debug: | + ftyp size 28
    mp4 debug: unrecognized major file specification (mp42).
    mp4 error: MP4 plugin discarded (no moov box)
    ffmpeg debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
    access_file error: seeking too far
    access_file error: seeking too far
    ffmpeg debug: AVFormat supported stream
    ffmpeg debug: - format = mov,mp4,m4a,3gp,3g2,mj2 (QuickTime/MPEG4/Motion JPEG 2000 format)
    ffmpeg debug: - start time = -1
    ffmpeg debug: - duration = -1
    main debug: using demux2 module "ffmpeg"
    main debug: looking for a subtitle file in /Users/fc/Movies/
    main debug: `/Users/fc/Movies/MP + MC.mp4' successfully opened
    main debug: EOF reached
    macosx debug: input has changed, refreshing interface
    main debug: closing input
    main debug: removing module "ffmpeg"
    main debug: removing module "access_file"
    main debug: thread 26859520 joined (input/input.c:399)
    main: nothing to play
    macosx debug: input has stopped, refreshing interface
    main debug: creating new input thread
    main debug: waiting for thread completion
    main debug: thread 26909696 (input) created at priority 37 (input/input.c:261)
    main debug: `/Users/fc/Movies/MP + MC.mp4' gives access `' demux `' path `/Users/fc/Movies/MP + MC.mp4'
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access_demux module: 1 candidate
    main debug: creating access '' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for access2 module: 7 candidates
    vcd debug: trying .cue file: /Users/fc/Movies/MP + MC.cue
    access_file debug: opening file `/Users/fc/Movies/MP + MC.mp4'
    main debug: using access2 module "access_file"
    main debug: pre-buffering...
    main debug: received first data for our buffer
    main debug: pre-buffering done 1408981 bytes in 0s - 463910 kbytes/s
    main debug: creating demux: access='' demux='' path='/Users/fc/Movies/MP + MC.mp4'
    main debug: looking for demux2 module: 43 candidates
    mp4 debug: found Box: ftyp size 28
    mp4 debug: found an empty box (null size)
    mp4 debug: dumping root Box "root"
    mp4 debug: | + ftyp size 28
    mp4 debug: unrecognized major file specification (mp42).
    mp4 error: MP4 plugin discarded (no moov box)
    ffmpeg debug: detected format: mov,mp4,m4a,3gp,3g2,mj2
    access_file error: seeking too far
    access_file error: seeking too far
    ffmpeg debug: AVFormat supported stream
    ffmpeg debug: - format = mov,mp4,m4a,3gp,3g2,mj2 (QuickTime/MPEG4/Motion JPEG 2000 format)
    ffmpeg debug: - start time = -1
    ffmpeg debug: - duration = -1
    main debug: using demux2 module "ffmpeg"
    main debug: looking for a subtitle file in /Users/fc/Movies/
    main debug: `/Users/fc/Movies/MP + MC.mp4' successfully opened
    main debug: EOF reached
    macosx debug: input has changed, refreshing interface
    main debug: closing input
    main debug: removing module "ffmpeg"
    main debug: removing module "access_file"
    main debug: thread 26909696 joined (input/input.c:399)
    main: nothing to play
    macosx debug: input has stopped, refreshing interface


    Can I save this clip with an software editor or other solution?
    Francesco (fcaridei@yahoo.it)

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Buggy MP4 Audio Recording

    Instead of reviving a 5+ years old thread which has nothing to do with your problem, you might have considered visiting the end-user discussion site as you were already suggested 1.5 weeks ago (http://discussion.forum.nokia.com/fo...d.php?t=171470) and 1 week ago (http://discussion.forum.nokia.com/fo...d.php?t=151585)
    Your problem is simply out of the scope of Forum Nokia.

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    7

    Re: Buggy MP4 Audio Recording

    Quote Originally Posted by wizard_hu_ View Post
    Instead of reviving a 5+ years old thread which has nothing to do with your problem, you might have considered visiting the end-user discussion site as you were already suggested 1.5 weeks ago (http://discussion.forum.nokia.com/fo...d.php?t=171470) and 1 week ago (http://discussion.forum.nokia.com/fo...d.php?t=151585)
    Your problem is simply out of the scope of Forum Nokia.
    many thanks wizard-hu for your info.
    the find engine of this forum is really effective, it is possible find out 5+ years old thread on encode the audio to AMR. It is possible anyone can also have experience on MP4 audio recording file.

    As you can image, I am trying to find out a solution for this important audio file... unfortunately it is not a game, for me. I will appreciate if you can suggest, one or more, specific forum with any scope regarding bugs in MP4 file recorded with a Nokia 6220.

    I will follow the Lucian suggestion:

    "We have dedicated forums for media recording APIs on Discussion Board, please use those for technical discussions"

    I hope my problem is simply "in" of the scope of Forum.

    sincerely
    Francesco

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Buggy MP4 Audio Recording

    Ok, let us skip the argument.
    Quote Originally Posted by escoo View Post
    I renamed also the mp4 file of the clip recorded. The recorded file is over 10MB video/mp4.
    What do you exactly mean on that renaming? What have you recorded (using what tool/API/anything)? Why do you think that it is mpeg-4 video?

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Buggy MP4 Audio Recording

    I also have told Francesco to use end user discussion forums already twice, since at least for me it appears that you are not doing a development for a recorder application, but only confuced that the support for different types of audio format depends on the device, and often some specific files that work with PC might not be supported by the device..

  9. #9
    Registered User
    Join Date
    Jun 2009
    Posts
    7

    Red face Re: Buggy AMR Audio Recording. Please Help!!

    I do not know why, but the 6220 voice record utility (in italian is "registratore vocale") create an audio/mp4 file. The kind of file is MP4, not AMR probably becouse the quality setting of the 6220 voice record utility is on High mode. It is possible that in medium quality the file will be saved as AMR... I do not know.

    The 6220 users know that this record utility is really good, you can record a conversation among more people simply start this utility and leave the phone on table, the quality is really good.

    In this unfortunately case the file, more of 10 MB, about 2 hours of an important conversation... is recorded with a bug.

    If I open the file with an file editor software, the file result full of data (more of 10 milion of simbols). I would like compare, with an file editor software, another correct MP4 file (recorded with the same phone) with this buggy MP4 file, to exame the difference on the first or last data line.. but this is not my job.

    To wizard_hu_

    - I recorded 2 hours of my conversation with other persons;
    - I used Nokia 6220 voice record utility;
    - The info of the file are: format (video/mp4), dimension (10,8 MB);
    - The file is located in Gallery of 6220 Nokia, but I copied it on PC and MAC to try to lesten it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×