|
2010-01-21
, 23:47
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#82
|
|
2010-01-21
, 23:49
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#83
|
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.
The Following User Says Thank You to twaelti For This Useful Post: | ||
|
2010-01-22
, 01:07
|
Posts: 237 |
Thanked: 157 times |
Joined on Dec 2009
@ San Diego, CA
|
#84
|
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?
The Following 2 Users Say Thank You to go1dfish For This Useful Post: | ||
|
2010-01-22
, 01:39
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#85
|
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?
#! /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()
The Following User Says Thank You to daperl For This Useful Post: | ||
|
2010-01-22
, 08:19
|
Posts: 7 |
Thanked: 7 times |
Joined on Jan 2010
@ Finland
|
#86
|
The Following User Says Thank You to spawn For This Useful Post: | ||
|
2010-01-22
, 08:42
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#87
|
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
The Following User Says Thank You to twaelti For This Useful Post: | ||
|
2010-01-22
, 08:43
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#88
|
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.
The Following User Says Thank You to twaelti For This Useful Post: | ||
|
2010-01-22
, 08:45
|
|
Posts: 552 |
Thanked: 183 times |
Joined on Oct 2009
@ Not decided
|
#89
|
|
2010-01-22
, 09:03
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#90
|
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.
The Following User Says Thank You to twaelti For This Useful Post: | ||
Should i wait or any ideas?
python-hildondesktop
hildon-desktop-python-loader
python-gtk2
python-dbus
python-gst0.10