From WebOS Internals
Jump to: navigation, search
  • The built-in camera on the current version of WebOS allows videoRecording.
    • To use it, tap the video icon (rightmost icon) from inside the camera app.
    • Rotate your phone sideways clockwise (to the right)
    • Tap red icon to start recording.
    • Tap red icon to stop recording.
    • Tap the 'flash' icon to toggle the flash LED while recording.


  • Output of the videos go into your 'video roll' area, and can be offloaded via USB.
  • You can edit videos directly on the device for start/stop point (total length)
  • If you want you can connect USB to offload the video but note also - :
  • You can email videos immediately from anywhere directly from the phone/EVDO - no need to connect to computer first.
  • Patches available to extend the allowed email length (30 seconds.)
  • Same as anything else you can do with a stored video (upload to facebook, etc.)

This wasn't always present as a feature. What follows is the legacy page, before this feature existed.

At your command line (after accessing linux):

(make sure FS is rw)

mount -o remount,rw /
gst-launch camsrc ! palmvideoencoder ! filesink location=/media/internal/downloads/foo.mts
mount -o remount,ro /

- No GUI
- No sound (need a muxer plugin? verify alsasrc works)
- Frame rate seemed pretty decent too.
- Video is H.264 at 480x320.
- Image is rotated 90 degrees CCW

other useful gstreamer commands:

gst-inspect (shows list of sources to pipe through, mostly decoders/demuxers)

root@castle:/var/home/ccrook# gst-inspect
palmvideodecoder:  palmvideodecoder: palmvideodecoder
palmaudiodecoder:  palmaudiodecoder: palmaudiodecoder
wavparse:  wavparse: WAV audio demuxer
wavenc:  wavenc: WAV audio muxer
udp:  udpsink: UDP packet sender
udp:  multiudpsink: UDP packet sender
udp:  dynudpsink: UDP packet sender
udp:  udpsrc: UDP packet receiver
typefindfunctions: application/x-id3v2: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: application/x-id3v1: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: audio/mpeg: mp3, mp2, mp1, mpga
typefindfunctions: video/mpeg4: m4v
typefindfunctions: audio/x-m4a: m4a
typefindfunctions: application/x-3gp: 3gp
typefindfunctions: video/quicktime: mov
typefindfunctions: audio/x-wav: wav
typefindfunctions: adts_mpeg_stream: aac
typefindfunctions: audio/x-amr-nb-sh: amr
typefindfunctions: audio/x-amr-wb-sh: amr
rtsp:  rtspsrc: RTSP packet receiver
rtsp:  rtpdec: RTP Decoder
rtsp:  rtspgoogle: Google RTSP Extension
gstrtpmanager:  gstrtpbin: RTP Bin
gstrtpmanager:  gstrtpclient: RTP Client
gstrtpmanager:  gstrtpjitterbuffer: RTP packet jitter-buffer
gstrtpmanager:  gstrtpptdemux: RTP Demux
gstrtpmanager:  gstrtpsession: RTP Session
gstrtpmanager:  gstrtpssrcdemux: RTP SSRC Demux
rtp:  rtpdepay: RTP depayloader
rtp:  rtpac3depay: RTP packet depayloader
rtp:  rtpdvdepay: RTP DV Depayloader
rtp:  rtpdvpay: RTP DV Payloader
rtp:  rtpilbcpay: RTP Payloader for iLBC Audio
rtp:  rtpilbcdepay: RTP iLBC packet depayloader
rtp:  rtpg726depay: RTP packet depayloader
rtp:  rtpg726pay: RTP packet payloader
rtp:  rtpg729depay: RTP packet depayloader
rtp:  rtpg729pay: RTP Payloader for G729 Audio
rtp:  rtpgsmdepay: RTP packet depayloader
rtp:  rtpgsmpay: RTP GSM audio payloader
rtp:  rtpamrdepay: RTP packet depayloader
rtp:  rtpamrpay: RTP packet payloader
rtp:  rtppcmadepay: RTP packet depayloader
rtp:  rtppcmudepay: RTP packet depayloader
rtp:  rtppcmupay: RTP packet payloader
rtp:  rtppcmapay: RTP packet payloader
rtp:  rtpmpadepay: RTP packet depayloader
rtp:  rtpmpapay: RTP packet payloader
rtp:  rtpmpvdepay: RTP packet depayloader
rtp:  rtpmpvpay: RTP MPEG2 ES video payloader
rtp:  rtph263ppay: RTP packet payloader
rtp:  rtph263pdepay: RTP packet depayloader
rtp:  rtph263depay: RTP H263 packet depayloader
rtp:  rtph263pay: RTP packet payloader
rtp:  rtph264depay: RTP packet depayloader
rtp:  rtph264pay: RTP packet payloader
rtp:  rtpL16pay: RTP packet payloader
rtp:  rtpL16depay: RTP packet depayloader
rtp:  asteriskh263: RTP packet parser
rtp:  rtpmp1sdepay: RTP packet depayloader
rtp:  rtpmp2tdepay: RTP packet depayloader
rtp:  rtpmp2tpay: RTP MP2T audio payloader
rtp:  rtpmp4vpay: RTP MPEG-4 Video packet payloader
rtp:  rtpmp4vdepay: RTP packet depayloader
rtp:  rtpmp4apay: RTP packet payloader
rtp:  rtpmp4adepay: RTP packet parser
rtp:  rtpmp4gdepay: RTP packet depayloader
rtp:  rtpmp4gpay: RTP packet payloader
rtp:  rtpspeexpay: RTP packet payloader
rtp:  rtpspeexdepay: RTP packet depayloader
rtp:  rtpsv3vdepay: RTP packet depayloader
rtp:  rtptheoradepay: RTP packet depayloader
rtp:  rtptheorapay: RTP packet depayloader
rtp:  rtpvorbisdepay: RTP packet depayloader
rtp:  rtpvorbispay: RTP packet depayloader
rtp:  rtpvrawdepay: RTP packet depayloader
rtp:  rtpvrawpay: RTP packet payloader
queue2:  queue2: Queue
quicktime:  qtdemux: QuickTime demuxer
quicktime:  rtpxqtdepay: RTP packet depayloader
playback:  playbin: Player Bin
playback:  playbin2: Player Bin 2
mulaw:  mulawenc: Mu Law audio encoder
mulaw:  mulawdec: Mu Law audio decoder
mobirtspsrc:  mobirtspsrc: MobiRtspSrc
ffmpeg:  ffdec_alac: FFMPEG ALAC (Apple Lossless Audio Codec) decoder
ffmpeg:  ffdec_qcelp: FFMPEG QCELP / PureVoice decoder
ffmpeg:  ffdeinterlace: FFMPEG Deinterlace element
ffmpeg:  ffaudioresample: FFMPEG Audio resampling element
uridecodebin:  decodebin2: Decoder Bin
uridecodebin:  uridecodebin: URI Decoder
decodebin:  decodebin: Decoder Bin
coreindexers:  memindex: A index that stores entries in memory
coreelements:  capsfilter: CapsFilter
coreelements:  fakesrc: Fake Source
coreelements:  fakesink: Fake Sink
coreelements:  fdsrc: Filedescriptor Source
coreelements:  fdsink: Filedescriptor Sink
coreelements:  filesrc: File Source
coreelements:  identity: Identity
coreelements:  queue: Queue
coreelements:  filesink: File Sink
coreelements:  tee: Tee pipe fitting
coreelements:  typefind: TypeFind
coreelements:  multiqueue: MultiQueue
video4linux2:  camsrc: Video (video4linux2/raw) Source
avi:  avidemux: Avi demuxer
avi:  avimux: Avi muxer
avi:  avisubtitle: Avi subtitle parser
audiotestsrc:  audiotestsrc: Audio test source
audiorate:  audiorate: Audio rate adjuster
audioconvert:  audioconvert: Audio converter
alsa:  alsamixer: Alsa mixer
alsa:  alsasrc: Audio source (ALSA)
alsa:  alsasink: Audio sink (ALSA)
alaw:  alawenc: A Law audio encoder
alaw:  alawdec: A Law audio decoder
palmvideosink:  palmvideosink: palmvideosink
palmvideoencoder:  palmvideoencoder: palmvideoencoder
palmqcelpdemux:  palmqcelpdemux: palmqcelpdemux
palmqcelpdemux: audio/x-gst-fourcc-sqcp: no extensions
palmmp3demux:  palmmp3demux: palmmp3demux
palmjpegencfilesink:  palmjpegencfilesink: palmjpegencfilesink
palmhttpsrc:  palmhttpsrc: Palm HTTP Source Element
palmamrdemux:  palmamrdemux: palmamrdemux
adpcmdecoder:  palmadpcmdecoder: ADPCM Decoder
palmaacdemux:  palmaacdemux: palmaacdemux
staticelements:  bin: Generic bin
staticelements:  pipeline: Pipeline object

Total count: 36 plugins, 129 features

Additional reference from XO Laptop site:

Currently looking at ways to use the camera preview pipe as a method of video recording through the WebOS GUI by diverting it to the filesystem.

File of interest: /usr/lib/luna/luna-media/palmInitMedia.js

More on the camera module:

Relies on Prelease for launching shell scripts. Use Flashlight App! to install it before attempting to run.
Currently stop button doesn't work.

Note: Current versions of Prelease available through webOS QuickInstall and Preware no longer support the exploit to pass abritrary code, so this shouldn't work --Prenos 16:59, 9 September 2009 (UTC)


1.) Figure out proper way to freevideosink via a homebrew app (killing gst-launch properly) (probably will involve invoking a custom service)
UPDATE: sending an INT signal seems to work? not sure if I'm missing something here... --Prenos 15:14, 6 October 2009 (UTC) 2.) Mux in sound from alsasrc

"gst-launch alsasrc ! alsasink" will give you sound from the mic playing back through the speakers, verifying alsasrc. It quickly loses resolution though, and starts giving "can't keep up with audio source" errors. --Zinge 08:23, 7 August 2009 (UTC)
"gst-launch alsasrc ! wavenc ! filesink location=/media/internal/downloads/test.wav" will record audio no problem. --Cpcrook 17:36, 7 August 2009 (UTC)
"gst-launch camsrc ! palmvideoencoder ! avimux name=mux ! filesink location=/media/internal/downloads/foo.mts alsasrc ! mulawenc ! mux." will mux audio and video, though the timing was a bit off when I played it back. --Muchtall 18:15, 7 August 2009 (UTC)

3.) Implement preview screen (possibility: send video through palmvideosink, then to palmvideoencoder so its still accessible for preview?) UPDATE: this seems semi-posible, as there are supported gstreamer elements that could "tee" the pipeline to 2 locations, unfortunately a custom app using palmvideosink seems unlikely as it's locked up in MediaServer --Prenos 15:14, 6 October 2009 (UTC)

4.) Get Videos app to display recorded video files (if anyone knows why the doesn't work now, please add it here, because it should work but it doesn't) UPDATE: This definitely SHOULDN'T work. You're piping a RAW h264 bitstream to a file with no container. Honestly I'm suprised it plays back in totem/smplayer. My only guess is they somehow contain them during stream. I'm working on backporting qtmux, as it's the only viable solution I've come up with that would be compatible with Pre's environment --Prenos 15:14, 6 October 2009 (UTC)

5.) Video conferencing via UDPsink? UPDATE: I'm thinking theoraenc and net2stream to an icecast server. 2 way probably isn't possible, i suppose this would be more 'http video streaming' than conferencing --Prenos 15:14, 6 October 2009 (UTC)

6.) Get 720x480@30fps working (TI claims this is possible with the current hardware). This seems to require recompiling camsrc with palm's 'capabilities template' removed or adjusted(palm offers both the base v4l2 drivers as well as their patch to compile the camsrc plugin on their opensource website). There's also a comment in palmInitMedia.js that the driver only supports up to 480x320, but v4l2 is documented to handle higher resolutions. Will also requre installing another video encoder. --Prenos 20:10, 27 August 2009 (UTC) UPDATE: this seems to be infeasble due to memory limitations, tons of segfaults and things. might have to do some serious buffering and framerate adjustments to get this to work. Will try with more efficient encoders --Prenos 15:14, 6 October 2009 (UTC)