161 Commits

Author SHA1 Message Date
Rien Maertens
7eb0143866
Change rM2 supported badge 🎉 2021-01-01 14:50:42 +01:00
Rien Maertens
d436a8ecb0
shfmt 2021-01-01 14:50:42 +01:00
Rien Maertens
995486e1ec
Update script to work with multiple reMarkable versions 2021-01-01 14:50:42 +01:00
Rien Maertens
eebf5e9880
Fix options in README 2020-12-31 15:44:04 +01:00
Rien Maertens
24b4846ec7
Merge branch 'cloudsftp-feature/window-title' 2020-12-31 15:22:38 +01:00
Rien Maertens
6f55f735b0
Simplify cli options 2020-12-31 15:22:11 +01:00
Murph Finnicum
f1cb66b663
Use ffmpeg native options to do scaling and padding math (#34)
* Use ffmpeg native options to do scaling and padding math

* whitespace
2020-12-31 15:19:16 +01:00
Murph Finnicum
943489a9fd
Use ffmpeg native options to do scaling and padding math (#34)
* Use ffmpeg native options to do scaling and padding math

* whitespace
2020-12-23 15:04:51 +01:00
Fabian Weik
8ef4a6993b add description of option to README 2020-11-20 12:34:16 +01:00
Fabian Weik
7a44de2862 fix typos 2020-11-20 12:29:32 +01:00
Fabian Weik
e775e8707b enable recording to output 2020-11-20 12:23:15 +01:00
Fabian Weik
30ac3b714d add option to change the window title (default: reStream) 2020-11-20 12:14:45 +01:00
Rien
4b3527ebef
Merge pull request #29 from Utopiah/patch-1
rm2 unsupported badge
2020-10-17 12:23:05 +02:00
Fabien Benetou
db572cfcad
rm2 unsupported badge
cf issue created earlier today
2020-10-16 23:53:22 +02:00
Rien Maertens
bea1581257
Fix formatting 2020-05-06 14:47:37 +02:00
Rien Maertens
a1b14bdf41
Measure troughput with -t 2020-05-06 14:43:23 +02:00
Rien Maertens
220d387994
Add MIT License
Closes #21
2020-04-18 16:17:42 +02:00
Rien Maertens
e680dd5531
Set pixel format to rgb565le 2020-04-18 16:17:42 +02:00
Rien
057e90721d
Merge pull request #18 from beardhatcode/master
Add video4linux2 support
2020-04-14 11:57:51 +02:00
beardhatcode
9e9fbbc771 Add explaination about v4l2 2020-04-14 11:54:01 +02:00
beardhatcode
e687816421 Add video4linux2 support 2020-04-14 10:59:49 +02:00
Rien Maertens
154fbe6fe8
Split action workflow into linting and formatting 2020-04-07 11:53:11 +02:00
Rien Maertens
088d3732c4
Add examples to usage info 2020-04-07 11:48:46 +02:00
Rien
48a7ed84c3
Merge pull request #13 from matteodelabre/specify-output
Allow choosing the video output
2020-04-07 11:34:50 +02:00
Mattéo Delabre
ab6fa11982
Fix formatting 2020-04-07 11:21:10 +02:00
Mattéo Delabre
3609b990ff
Store extra ffmpeg arguments in $@ 2020-04-07 11:17:45 +02:00
Mattéo Delabre
0c707af239
Merge branch 'master' into specify-output 2020-04-07 10:55:20 +02:00
Mattéo Delabre
d0323daef5
Replace arrays with variable substitutions for POSIX compliance
Co-Authored-By: Rien <rien.maertens@posteo.be>
2020-04-07 10:48:51 +02:00
Rien Maertens
52d0187d7e
Don't use ~ in commands 2020-04-06 23:19:54 +02:00
Rien Maertens
1dfb28028d
Add GitHub workflow 2020-04-03 12:16:16 +02:00
Rien Maertens
154d15b890
Apply shellcheck and shfmt 2020-04-03 12:15:53 +02:00
Mattéo Delabre
4344903438
Fix recorded videos playing back too fast
Use the `setpts` video filter to set each frame’s presentation timestamp
to the time it is received by the encoder.
See <https://ffmpeg.org/ffmpeg-filters.html#Examples-141>.
2020-04-03 11:28:42 +02:00
Mattéo Delabre
49f20074f0
Allow choosing the video output
Instead of simply playing back the frames through `ffplay`, I thought it
might be interesting to be able to record the sequence to a video file
or to use it as part of a stream.

I have in mind the use case of making educational videos/live streams
where the tablet can be used as a kind of remote blackboard by teachers,
which is especially relevant currently. But there are certainly other
use cases!

Changes
=======

This commit adds two new options to that effect:

* `-o --output`: Path of the output as understood by `ffmpeg` (usually a
file name). If this is `-` (as it is by default), the existing behavior
of playing the stream through `ffplay` is restored.

* `-f --format`: When recording to an output, this option can be used to
force the encoding format. If this is `-` (again, the default),
`ffmpeg`’s auto format detection is used (based on the file extension).

Because of the possible confusion between the newly added `--output`
option and the existing `--destination` option for specifying the source
address, I suggest renaming the `--destination` option to `--source`
(this is implemented in this commit).

Examples
========

Record to a file
----------------

```sh
./reStream.sh -o remarkable.mp4
```

Caveat: The recorded file plays back too fast.
I am not sure how to fix this.

Create an UDP MPEG-TS stream
----------------------------

```sh
./reStream.sh -o "udp://127.0.0.1:1234" -f "mpegts"
```

This sends frames over UDP to the specified port using the MPEG-TS
format (see <https://trac.ffmpeg.org/wiki/StreamingGuide>). This stream
can then be connected, for example, to OBS for live streaming (see
<https://connect.ed-diamond.com/Linux-Pratique/LP-096/Enrichir-sa-diffusion-de-contenus-multimedias-avec-OBS>
in French).
2020-04-02 20:54:11 +02:00
Rien
d1fa399c86
Merge pull request #12 from matteodelabre/fix-destination-flag
Fix incorrect handling of flags
2020-04-02 16:39:55 +02:00
Mattéo Delabre
ac981508f7
Fix incorrect handling of flags
Previously, arguments were examined by a for loop, but this loop is not
affected by the `shift` commands executed inside of it.

Because the loop always advances one argument further on each iteration,
this bug goes unnoticed with the `--portrait` option (`shift` is called
once, which matches the behavior of the loop). However, handling of the
`--destination` argument is broken because of that (`shift` is called
twice but the loop only advances one argument).

This commit replaces the `for` loop by a `while` loop which always
examines the next argument and properly takes `shift`s into account.
This is based on the following SO answer:
<https://stackoverflow.com/a/7069755/3452708>
2020-04-02 16:17:21 +02:00
Rien Maertens
382944058e
Add parameters to README, ssh timeout to 1s
Changed the README to reflect the command line options added with
bcf62e3. Also incorporates the SSH timeout of 1 second added by the
initial PR (#10).

Co-authored-by: Aaron David Schneider <aaron.david.schneider@gmail.com>
2020-04-02 14:20:48 +02:00
Rien
bcf62e3ae7
Merge pull request #11 from AaronDavidSchneider/detailed_options
add command-line options
2020-04-02 10:59:56 +02:00
Aaron David Schneider
8465062425 change name to -d 2020-04-02 10:23:58 +02:00
Aaron David Schneider
1f63880a8e add command-line options 2020-04-01 16:51:01 +02:00
Rien Maertens
2cc3f88274
Add -p flag functionality to README 2020-03-31 15:32:20 +02:00
Rien
f2ada8f208
Merge pull request #9 from beardhatcode/master
Add -p flag for portrait
2020-03-31 15:30:38 +02:00
Robbert Gurdeep Singh
0adb3e4fdc Add -p flag for portrait 2020-03-31 15:25:30 +02:00
Rien Maertens
e5edbed205
Simple troubleshooting stuff 2020-03-30 21:35:15 +02:00
Rien Maertens
1c917c1d14
Clarify SSH key setup 2020-03-30 21:33:44 +02:00
Rien Maertens
f3f5dd40fa
SSH key and ssh-agent instructions 2020-03-30 14:54:16 +02:00
Rien Maertens
53051fbdf5
Add instructions to make lz4 executable 2020-03-25 16:33:22 +01:00
Rien Maertens
8ca1557e7b
Replace which zstd by which lz4 (forgotten)
Fixes #5. Thanks @chkgk!
2020-03-18 16:19:12 +01:00
Rien Maertens
51d608cbd5
Update README with change to lz4 2020-03-18 00:19:28 +01:00
Rien Maertens
9f6ba5dd1d
Use lz4 instead of zstd, add prebuilt static library 2020-03-17 23:44:55 +01:00
Rien Maertens
c9af230f3a
Update README.md
Add instructions to fix zstd
2020-03-12 11:25:47 +01:00