Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run headless? #27

Open
seitzbg opened this issue Nov 28, 2017 · 9 comments
Open

Run headless? #27

seitzbg opened this issue Nov 28, 2017 · 9 comments

Comments

@seitzbg
Copy link

seitzbg commented Nov 28, 2017

Is it possible to run this headless and just stream to youtube or file?

terminate called after throwing an instance of 'SDLInitException'
  what():  No available video device
[1]    19736 abort (core dumped)  logstalgia -1280x720 -o - /var/log/nginx/access.log
@cron410
Copy link

cron410 commented Nov 28, 2017

+1

@seitzbg
Copy link
Author

seitzbg commented Nov 28, 2017

This seems to work better but still can't get ffmpeg to accept it:

xvfb-run logstalgia -1280x720 -o - /var/log/nginx/access.log | ffmpeg -y -r 60 -f image2pipe -probesize 5000000 -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 logstalgia.mp4

@Jacketbg
Copy link

Jacketbg commented Jul 10, 2018

Did somebody have any luck with this? I'm also banging my head with it, but even before piping to ffmpeg I receive this error:

$ ssh root@nginx tail -f /var/log/nginx/access_log | xvfb-run logstalgia - -1280x720 -o -

terminate called after throwing an instance of 'SDLInitException'
  what():  GLX is not supported
/usr/bin/xvfb-run: line 181: 17615 Aborted                 DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1

Digging a bit more it turns out that xvfb doesn't support the GLX extension so it looks to me this is a dead end. However there are some (older) articles on the web that suggest using xvfb-run in conjunction with logstalgia, so it must be possible. Maybe with an older version or something? I'm using v1.1.2.

@acaudwell
Copy link
Owner

I managed to get xvfb-run to work by specifying the display resolution:

xvfb-run -s "-screen 0 1920x1080x24" logstalgia -1920x1080 ...

If you look at the xvfb-run script it defaults to -screen 0 640x480x8 which isn't wouldn't be sufficient.

@Jacketbg
Copy link

Same error. Which logstalgia version are you using? Can you give me your fully working command line? Thanks!

@acaudwell
Copy link
Owner

1.1.2. I don't think the version will matter though. I get the 'GLX is not supported' unless I specify the '-s' option to pass a resolution to xvfb-run.

I had install the package xserver-xorg-video-dummy before hand as I heard that may be necessary but it seemed to also work after removing it. Maybe that installed some dependencies required for GLX to work also?

This produced a working webm for me:

xvfb-run -s '-screen 0 1280x720x24' logstalgia -1280x720 -o - access.log | \
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libvpx -b 10000K logstalgia.webm

@Jacketbg
Copy link

Thanks for the command line. Still not getting it to work. What is your Linux distribution? I'm using CentOS 7 and the package there was called xorg-x11-drv-dummy, but no luck yet even after installing it. I don't have issues installing another OS just for this.

@Jacketbg
Copy link

Just installed a clean Debian 9. Works like a charm. Thanks!

@mhagnumdw
Copy link

Maybe this will help someone: acaudwell/Gource#137 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants