Active Topics

 


Reply
Thread Tools
Posts: 578 | Thanked: 994 times | Joined on Dec 2012
#11
As a root on 2.0.5.6:
Code:
error: XDG_RUNTIME_DIR not set in the environment.
[C] unknown:0 - Failed to create display (No such file or directory)
export XDG_RUNTIME_DIR=/run/user/1000 lead to the same error as above.
I have enclosed rpm because it can be related to photon q sailfish port. It's kimmoli test branch.
Attached Files
File Type: rpm lipstick-recorder-0.0.1-1.armv7hl.rpm (20.7 KB, 100 views)
 

The Following 3 Users Say Thank You to elros34 For This Useful Post:
jellyroll's Avatar
Posts: 435 | Thanked: 684 times | Joined on Apr 2012 @ Netherlands 020
#12
I get the same error on 2.0.1.11 as user and root.
 

The Following 2 Users Say Thank You to jellyroll For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#13
I'm also interested if anyone got lipstick-recorder to run recently – I've only used kimmoli's build as well and get the same errors as mentioned above with and without devel-su on 2.0.2.48.

Also, just blindly checking out https://github.com/kimmoli/lipstick-recorder and starting a build in SailfishOS SDK does not go well and only spits out qmake usage info.
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)
 

The Following User Says Thank You to velox For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#14
You need to use platform sdk mb2 to build.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#15
Originally Posted by coderus View Post
You need to use platform sdk mb2 to build.
Hah, thanks, makes sense! Haven't touched matchbox since chinook or diablo for the n810 – and that left me a bit scarred at the time.

Now that I've build it (wasn't bad this time, actually), there's still the protocol error mentioned above when run either as root or nemo. So I guess that wasn't the problem to begin with.
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)
 
Posts: 578 | Thanked: 994 times | Joined on Dec 2012
#16
Maybe root needs to be added to privileged group.
https://git.merproject.org/mer-core/...dacf15b4e15868
usermod -G privileged -a root doesn't work for me.
 

The Following User Says Thank You to elros34 For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#17
Originally Posted by elros34 View Post
Maybe root needs to be added to privileged group.
https://git.merproject.org/mer-core/...dacf15b4e15868
usermod -G privileged -a root doesn't work for me.
Thanks for digging this up! You are awesome!
The commit got me thinking that maybe, just maybe, it only checks for the primary group.
After that, I kind of got it to run. It runs pretty badly but it kind of works!

I've written a test script to do this, but keep in mind:
  • Lipstick-recorder creates a lot of .bmp files. Those are huge. (A few seconds ate my /tmp/ space like it was a snickers bar.)
  • There's no fixed frame rate with those images… sometimes they are generated faster, sometimes slower
  • (Because of the previous problem:) The video file my script creates has a fixed framerate and it's length has nothing to do with the actual duration of recording.
  • Encoding the video takes a while.
  • It only works once. So choose wisely. (Actually it works again after a reboot. But that's pretty bad)
    (edit: sometimes it seems to work without a reboot – don't know when or why)
  • Don't run this from a directory where there are "frame*.bmp" files present. Those will be deleted!

With that out of the way, let's do this.
  • Install ffmpeg from openrepos
  • Place the following shell script somewhere and make it executable:
    Code:
    #!/bin/bash
    function runRecorder {	
    newgrp privileged << END
    	XDG_RUNTIME_DIR=/run/user/1000 lipstick-recorder
    END
    }
    function killRecorder {
    	killall lipstick-recorder 
    	sleep 2
    	echo should be killed
    }
    trackeroutput=$(tracker control --miner=org.freedesktop.Tracker1.Miner.Files --pause="makingavideo")
    trackercookie=$(echo $trackeroutput| awk '{print $NF}')
    
    runRecorder &
    read -n1 -r -p 'Press any key to exit...' key
    echo
    killRecorder
    echo 'making video'
    
    #how many files are there?
    count=$(awk "BEGIN {print ($(ls -l frame*.bmp | wc -l) - 1)}")
    ints=${#count};
    
    ffmpeg -f image2 -i frame%${ints}d.bmp -threads 3 -framerate 15 "/home/nemo/Videos/recorder-`date "+%Y%d%e-%H%M%S"`.mp4"
    
    echo 'deleting frame*.bmp'
    rm -f frame*.bmp
    tracker control --miner=org.freedesktop.Tracker1.Miner.Files --resume=$trackercookie
  • Run it as root
  • Profit!
--- EDITS:
edit 1: removed kill signal 3, that didn't seem to kill it ;)
edit 2: sometimes it works after the first time. don't know when or why
edit 3: Here's a test upload on youtube: https://youtu.be/TulKBs2AyeI
edit 4: lowered video frame rate + added threads in ffmpeg.
edit 5: added tracker pause command hoping it won't try to index the images
---
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)

Last edited by velox; 2017-01-14 at 00:01. Reason: structured edits… I'm tired ;)
 

The Following 6 Users Say Thank You to velox For This Useful Post:
Posts: 217 | Thanked: 142 times | Joined on Dec 2011
#18
Awesome, this is the closest we've got to a screen recorder on Jolla. No android app works so this is really the only way to do it. Please make a simple app of it. Would be über if it could save to SD and be descent in file size.
 

The Following 2 Users Say Thank You to latency For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#19
Originally Posted by latency View Post
Awesome, this is the closest we've got to a screen recorder on Jolla. No android app works so this is really the only way to do it. Please make a simple app of it. Would be über if it could save to SD and be descent in file size.
An app would be great, I agree!
Sadly that's way over my head, even without fixing the group issue and the need to reboot (or at least restart lipstick). I could offer to make a more or less fancy interface if someone was able to do the "real" programming. I guess, some things in lipstick should be fixed before anyone attempts this.

Oh, and as some confusion came up (via DM):
The script above does indeed turn the .bmp files into a .mp4 video, puts it into /home/nemo/Videos and deletes the images afterwards. It uses the current working directory to store the .bmp files, so you could start it from your sd card to use that as storage for the huge files.

Cheers
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)
 

The Following 2 Users Say Thank You to velox For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, España
#20
Here's my error output;

Code:
[image2 @ 0x2733450] Could find no file with path 'frame%2d.bmp' and index in the range 0-4
frame%2d.bmp: No such file or directory
Any ideas?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:40.