Active Topics

 


Closed Thread
Thread Tools
Posts: 10 | Thanked: 0 times | Joined on Dec 2009
#81
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
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#82
Originally Posted by addee View Post
Ok, downloaded and tried to install the deb-file
Please use the Application Manager
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#83
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?
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
Posts: 237 | Thanked: 157 times | Joined on Dec 2009 @ San Diego, CA
#84
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.
 

The Following 2 Users Say Thank You to go1dfish For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#85
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()
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
Posts: 7 | Thanked: 7 times | Joined on Jan 2010 @ Finland
#86
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.



 

The Following User Says Thank You to spawn For This Useful Post:
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#87
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.
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#88
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
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
anapospastos's Avatar
Posts: 552 | Thanked: 183 times | Joined on Oct 2009 @ Not decided
#89
Definitely grat work. Well done!
__________________
My name was Maemo, then it became Meego and now I'm getting a third one. I am Sailfish.
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#90
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.
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
Closed Thread


 
Forum Jump


All times are GMT. The time now is 12:27.