xpra icon
Bug tracker and wiki

Opened 12 days ago

Closed 12 days ago

Last modified 12 days ago

#2940 closed defect (duplicate)

How to register screen in background?

Reported by: Francesco Potortì Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: android Version: 3.0.x
Keywords: Cc:

Description

I have a task for which I think I could use Xpra, but I cannot manage it. I sometimes follow a webinar which is streamed in real time. I would like to have a sort of timeshift. In order to do that, I think I could:

  • launch a local Xpra server on, say :7
  • launch a browser on :7 running a web video
  • launch ffmpeg on :7 and grab the video to disk

Now I should be able to timeshift the video by playing the one recorded on disk, while it is recorded

However, it does not work and I do not know why. Here is what I did. the resulting video shows a white window and sound coming from the microphone. What am I doing wrong?

#!/bin/bash

remote=:7
res=1024x768

xpra info &>/dev/null && xpra stop $remote

xpra start $remote \
     --use-display=auto --desktop-scaling=$res \
     --speaker=on --env=XPRA_CUTTER_THRESHOLD=0 \
     --border=\#CC00CC --start="chromium 'https://www.youtube.com/watch?v=w-XZu8DBLSs'"

for ((w=10;w>0;w--)); do echo -n $w..; sleep 1s; done

#xpra attach $remote

ffmpeg -f x11grab -framerate 25 -video_size $res \
       -probesize 64M -thread_queue_size 128 -i $remote.0+20,60 \
       -f pulse -ac 2 -thread_queue_size 32 -i default \
       -preset ultrafast ~/Videos/$(date -Iseconds)-capture.mkv

Change History (2)

comment:1 Changed 12 days ago by Antoine Martin

Resolution: duplicate
Status: newclosed

See #988 and use --sync-xvfb=25

comment:2 Changed 12 days ago by Antoine Martin

Alternatively, you could try:

XPRA_SAVE_TO_FILE=video xpra start --video-encoders=x264 ...

This will save all video streams to file.
Assuming that youtube is correctly detected as video, this will result in one or more video streams being saved.

Note: See TracTickets for help on using tickets.