Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [Implemented] Call recording for N900

    Closed Thread
    Page 9 of 13 | Prev |   7     8   9   10     11   | Next | Last
    addee | # 81 | 2010-01-21, 23:46 | Report

    Ok, downloaded and tried to install the deb-file but despite the fact that i installed Python 2.5 it still complains over some Python Packages which i can not find...

    Should i wait or any ideas?

    python-hildondesktop
    hildon-desktop-python-loader
    python-gtk2
    python-dbus
    python-gst0.10

    Edit | Forward | Quote | Quick Reply | Thanks

     
    twaelti | # 82 | 2010-01-21, 23:47 | Report

    Originally Posted by addee View Post
    Ok, downloaded and tried to install the deb-file
    Please use the Application Manager

    Edit | Forward | Quote | Quick Reply | Thanks

     
    twaelti | # 83 | 2010-01-21, 23:49 | Report

    Originally Posted by go1dfish View Post
    Good luck in ever getting your applet out of extras-testing then.

    Most of the hard-core maemo community members (read the people who vote) are linux desktop users.

    If VLC wont play files you're generating then you're doing something horribly wrong.

    Lacking a container format might be the cause.
    Bla-di-blabla or constructive feedback? It might be more helpful if you could tell me how to properly stop a recording in gstreamer/pygst
    Try 0.3.0, it should be better in closing the stream after recording it. It still won't play on my Win7 x64 VLC, but perhaps it does on Ubuntu now?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to twaelti For This Useful Post:
    iKneaDough

     
    go1dfish | # 84 | 2010-01-22, 01:07 | Report

    Originally Posted by twaelti View Post
    Bla-di-blabla or constructive feedback? It might be more helpful if you could tell me how to properly stop a recording in gstreamer/pygst
    Try 0.3.0, it should be better in closing the stream after recording it. It still won't play on my Win7 x64 VLC, but perhaps it does on Ubuntu now?
    Tried out 0.3.0 the new icon is nice, but the file still fails to play in mplayer, totem (which uses gstreamer on ubuntu) vlc, audacity etc...

    Also, the recorded files fail to load/play on QuickTime/iTunes on OSX which is an even bigger blocker.

    Wish I was able to provide more help, but I am not very familiar with gstreamer or aac from a development perspective.

    The faad command line utility (linux) is able to read the aac files your generating, this seems to reinforce that the problem is the lack of a container for the aac stream.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to go1dfish For This Useful Post:
    iKneaDough, shvedsky

     
    daperl | # 85 | 2010-01-22, 01:39 | Report

    Originally Posted by twaelti View Post
    Bla-di-blabla or constructive feedback? It might be more helpful if you could tell me how to properly stop a recording in gstreamer/pygst
    Try 0.3.0, it should be better in closing the stream after recording it. It still won't play on my Win7 x64 VLC, but perhaps it does on Ubuntu now?
    Maybe just try a simple wav encoding. The following code produces a wav file that works in vlc on my Mac. If you run this, you'll notice that first buffer spewed in the probe callback is the 44 byte wav header. Also, if you want do more stuff with audio files and buffers, I recommend checking out the following standard Python packages:

    wave
    audioop

    Love your work!

    Code:
    #! /usr/bin/env python
    
    import platform
    import gtk
    import gst
    
    class RecordMe:
        def __init__(self):
            window = gtk.Window(gtk.WINDOW_TOPLEVEL)
            window.set_title('A Recorder')
            window.connect('destroy', gtk.main_quit)
            vbox = gtk.VBox()
            window.add(vbox)
            self.movie_window = gtk.DrawingArea()
            vbox.add(self.movie_window)
            hbox = gtk.HBox()
            vbox.pack_start(hbox, False)
            hbox.set_border_width(10)
            hbox.pack_start(gtk.Label())
            self.button = gtk.Button('Record')
            self.button.connect('clicked', self.start_stop)
            hbox.pack_start(self.button, False)
            self.button2 = gtk.Button('Quit')
            self.button2.connect('clicked', self.exit)
            hbox.pack_start(self.button2, False)
            hbox.add(gtk.Label())
            window.show_all()
            self.machine = platform.uname()[4]
    
            sampleRate = 22050
    
            if self.machine == 'armv7l':
                self.player = gst.Pipeline('ThePipe')
                src = gst.element_factory_make('pulsesrc','src')
                self.player.add(src)
                caps = gst.element_factory_make('capsfilter', 'caps')
                caps.set_property('caps', gst.caps_from_string(
                    'audio/x-raw-int,width=16,depth=16,\
                    rate=%d,channels=1'%sampleRate))
                self.player.add(caps)
                enc = gst.element_factory_make('wavenc','enc')
                self.player.add(enc)
                sink = gst.element_factory_make('filesink', 'sink')
                sink.set_property('location','testme.wav')
                self.player.add(sink)
                pad = sink.get_pad('sink')
                pad.add_buffer_probe(self.doBuffer)
                src.link(caps)
                caps.link(enc)
                enc.link(sink)
    
            bus = self.player.get_bus()
            bus.add_signal_watch()
            bus.enable_sync_message_emission()
            bus.connect('message', self.on_message)
    
        def doBuffer(self, pad, buffer):
            n = len(buffer)
            if n == 44:
                print 'found WAV header'
            elif n > 0:
                self.totalAudioBytes = self.totalAudioBytes + n
            return True
    
        def start_stop(self, w):
            if self.button.get_label() == 'Record':
                self.totalAudioBytes = 0
                self.button.set_label('Stop')
                self.player.set_state(gst.STATE_PLAYING)
            else:
                print 'total audio bytes',self.totalAudioBytes
                self.player.set_state(gst.STATE_NULL)
                self.button.set_label('Record')
    
        def exit(self, widget, data=None):
            gtk.main_quit()
    
        def on_message(self, bus, message):
            t = message.type
            if t == gst.MESSAGE_EOS:
                self.player.set_state(gst.STATE_NULL)
                self.button.set_label('Record')
            elif t == gst.MESSAGE_ERROR:
                err, debug = message.parse_error()
                print 'Error: %s' % err, debug
                self.player.set_state(gst.STATE_NULL)
                self.button.set_label('Record')
    
    if __name__ == '__main__':
        RecordMe()
        gtk.main()

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to daperl For This Useful Post:
    iKneaDough

     
    spawn | # 86 | 2010-01-22, 08:19 | Report

    i changed my version of recorder to encode files to flac format and added possibility to listen / delete recording after it's done.

    if anyone is interested recording using power button menu i could share
    this mod.

    few images attached.




    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to spawn For This Useful Post:
    iKneaDough

     
    twaelti | # 87 | 2010-01-22, 08:42 | Report

    Originally Posted by daperl View Post
    Maybe just try a simple wav encoding. Also, if you want do more stuff with audio files and buffers, I recommend checking out the following standard Python packages:
    wave
    audioop
    Been there done that WAV is how I started, but the files became way too big. It is a much simpler file format, that's probably why it worked without problems.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to twaelti For This Useful Post:
    iKneaDough

     
    twaelti | # 88 | 2010-01-22, 08:43 | Report

    Originally Posted by spawn View Post
    i changed my version of recorder to encode files to flac format and added possibility to listen / delete recording after it's done.
    if anyone is interested recording using power button menu i could share this mod.
    .me raises hand

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to twaelti For This Useful Post:
    iKneaDough

     
    anapospastos | # 89 | 2010-01-22, 08:45 | Report

    Definitely grat work. Well done!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    twaelti | # 90 | 2010-01-22, 09:03 | Report

    Originally Posted by go1dfish View Post
    the file still fails to play in mplayer, totem (which uses gstreamer on ubuntu) vlc, audacity etc...
    Also, the recorded files fail to load/play on QuickTime/iTunes on OSX which is an even bigger blocker.
    The faad command line utility (linux) is able to read the aac files your generating, this seems to reinforce that the problem is the lack of a container for the aac stream.
    But then it might well be a problem of these players expecting AAC in a container (which is not mandatory). The AAC files written by recaller (using Gstreamer/nokiaaacenc) are currently in ADIF format, which is a more basic format. And verifying the headers for some example files in a HEX editor looked good, so they are correct ADIF files. However, ADIF is only considered informative by MPEG-4, so an MPEG-4 decoder does not need to support either format.
    I will try to do 2 things:
    • Check what happens when encoding in ADTS instead
    • Mux the AAC into a MP4 or 3GP container.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to twaelti For This Useful Post:
    iKneaDough

     
    Page 9 of 13 | Prev |   7     8   9   10     11   | Next | Last
vBulletin® Version 3.8.8
Normal Logout