Git Product home page Git Product logo

pi-dev-playbook's People

Contributors

geerlingguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pi-dev-playbook's Issues

Add automated tests to this repository using GitHub Actions

At a minimum, set up Molecule to run the playbook against Debian 10 Buster, and set up yamllint and ansible-lint for Molecule's lint stage.

Ideally, it would be cool if I could find a way to run this against the Raspberry Pi OS image on ARM hardware...

Document video chat/streaming/recording options with the Pi 4

I have a couple Logitech C920 webcams, and I wanted to see if I could use them while streaming and/or recording clips at 1080p... the problem is "it's complicated", and unlike macOS where there are literally a dozen or so free options with fancy/simple GUIs for the purpose, on Linux/RPi, it's a lot more complex.

The most reliable way to capture video is with ffmpeg, but its usage is inscrutable for beginners. And maybe not impossible for me, but it still requires a lot of futzing around.

After reading this article about streaming 1080p content to YouTube directly (without killing your Pi's poor CPU), it was apparent I was in luck that my Logitech C920 has a built-in H.246 encoder that puts out a pre-compressed stream.

Using this incantation gets the video and dumps it into an mp4 file, with minimal CPU usage:

ffmpeg -f v4l2 -codec:v h264 -framerate 30 -video_size 1920x1080 -itsoffset 0.5 -i /dev/video0 -copyinkf -codec:v copy -codec:a aac -ab 128k -g 10 -f mp4 test.mp4

Using a simpler/more standard example from ffmpeg's documentation, however, results in the Pi's CPU struggling to maintain 5 fps:

ffmpeg -f v4l2 -framerate 30 -video_size 1920x1080 -i /dev/video0 output.mkv

You might wonder, 'how do you know the webcam is at /dev/video0? Well, find it with:

$ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
	/dev/video10
	/dev/video11
	/dev/video12

bcm2835-isp (platform:bcm2835-isp):
	/dev/video13
	/dev/video14
	/dev/video15
	/dev/video16

HD Pro Webcam C920 (usb-0000:01:00.0-1.2.3):
	/dev/video0
	/dev/video1

Now, onto finding a way to get my audio interface into the stream...

Notes about initial setup and comparison to macOS

Following are some of the settings I've changed just for appearance and initial usage:

  • Removed desktop picture.
  • Set desktop background to medium grey (solid color).
  • Set Dock/Pi bar to bottom, interface defaults to 'Large'.
  • Mouse: Acceleration 7.0, Double-click delay 250
  • Keyboard: Repeat delay: 500, Repeat interval: 30

Regarding 4K, the Pi is capable of 4K resolution, but with a number of caveats:

  1. You can do up to 30 Hz, so there is noticeable 'flicker' while scrolling, moving windows, etc. (jarring to my eyes).
  2. The default window manager/UI does not natively have any kind of HiDPI mode built in.
  3. You can set many apps to higher font sizes but many apps end up looking a little janky.
  4. You can enable 'pixel doubling', but this basically doubles pixels from 1080p resolution, though without anti-aliasing, so (to my eye, at least) it is harder to read (and sticks with 30 Hz refresh rate), so just using 1080p is a better option.

Notes on the keyboard and mouse:

  • As with any time I switch platforms (Mac to Windows and vice-versa, especially), my muscle memory for control/option/command/alt really hinders my ability to be productive the first few hours, because I keep accidentally closing something or going back when trying to paste.
  • The way mouse acceleration works makes my Apple Magic Trackpad almost completely unusable. I'll have to see if there's a better driver for it I could use. It doesn't feel natural at all. Luckily scroll behavior is pretty good still. Also, can't right click without a driver for it. (For now I'm using my Kensington USB mouse, but boy do I hate mice!).
  • The keyboard responsiveness is great, no problems there.

Pick an email client, code editor, other essential apps

There are a few apps I kind of rely on day-to-day on my Mac:

macOS App arm64 equivalent
Sublime Text 3 VSCodium
macOS Mail Evolution
1Password N/A (Chrome extension requires 1Password subscription)
RadarScope Pro N/A (Tried to get aweather working, didn't)
Safari Chromium
Terminal Terminal
Dropbox rclone (Dropbox CLI/app had problems installing)
Photos N/A
Calendar N/A
Notes N/A
Photoshop (I wish I didn't...) Mirage (tiny and fast), GIMP (slow and clunky but mostly adequate)
LimeChat Pidgin
Slack N/A (Linux build only on AMD64)
BlueJeans N/A (Browser only; video worked, audio did not)
Zoom N/A (Browser only; video worked first time, audio never did)
Hubstaff (time tracker) N/A
Reeder N/A
Tweetbot Cawbird (sorta)
QuickTime Player VLC (See #4 for A/V capture options)
Sound Studio gnome-sound-recorder (though didn't work for me)
Final Cut Pro X N/A

There are also a dozen or so other apps I probably use once a week and I'd miss them if I had no alternative.

So the point of this issue is to try to figure out if the same app can be had for the Raspberry Pi under arm64 arch, or if I'll need to find a decent substitute (in most cases, probably yes). In a few cases, if there's no substitute, I'll have to find a way to make do with the web app version of something (e.g. Calendar and maybe something like Slack?).

On top of all that, I'd like to see if I can use my typical accessories (AirPods, Behringer USB audio interface, Logitech C920 webcam(s), etc.) with the Pi 4 through an extra USB 3.0 hub. See how far I can go down the road of fully replacing my Mac with an ARM 64-bit SBC.

I know I won't get all the way, but how far can I go? Surely I can do more on it than my iPad Pro, since I actually have some control over the computer :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.