jaredpetersen / raspilive

📷 Stream video from the Raspberry Pi Camera Module to the web
MIT License
146 stars 33 forks source link

Adjust ffmpeg configuration command to dynamically fetch CPU core count #21

Closed nicklasfrahm closed 5 years ago

nicklasfrahm commented 5 years ago

This is a potential fix for #20.

nicklasfrahm commented 5 years ago

@jaredpetersen I've updated it. It should get the core count and CPU architecture only from very basic bash commands. I will test it on my 3B+ as soon as I am home and I will also check if I have other RPis lying around to test it. Currently, I've only validated these commands on my Windows Subsystem Linux with Ubuntu 16.04.

jaredpetersen commented 5 years ago

@nicklasfrahm Were you able to confirm that this works on your raspberry pi 3B+ and some of your other pis? Otherwise, looks great to me.

nicklasfrahm commented 5 years ago

@jaredpetersen Specifying a specific arch for arm, either armhf, armel or armv7l, is unnecessary, as this shows. I have removed it and verified that the command for the CPU thread count works on the following devices:

nicklasfrahm commented 5 years ago

Would you mind if I also throw in an editor config to prevent problems with whitespaces in PRs? Something like this:

# top-most .editorconfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
jaredpetersen commented 5 years ago

@nicklasfrahm I'd rather not commit any editor config files since there's a million different configs out there. I think it would be better if there was a linter or something like prettier installed that ensured that none of that was committed anyways. Not for this pull request though.

EDIT: Opened issue #22 per your feedback.

nicklasfrahm commented 5 years ago

@jaredpetersen All comments are fixed and I will have a look at #22.