Commit Graph

52 Commits

Author SHA1 Message Date
f3fora 2eb60e4c87 unsecure-connection: removed hard-coded remarkable ip 2021-06-30 10:59:08 +02:00
Rien Maertens 73c5c7c131 Terminate script when ffmplay window closes 2021-06-30 10:08:24 +02:00
Rien Maertens 45a66480a2 restream.rs: use cli arguments instead of discovery 2021-01-29 00:12:13 +01:00
Rien Maertens b678e5f36b Apply shfmt 2021-01-28 23:36:35 +01:00
Rien Maertens 322dbfa4e4 Merge branch 'support-rm2fb' of https://github.com/danshick/reStream into danshick-support-rm2fb 2021-01-28 23:24:58 +01:00
Rien Maertens dcd3007932 Listen for connection on rM instead of host 2021-01-28 23:11:07 +01:00
Linus 87981226c5 Add option to send data over a tcp socket
This reducec the dropbear cpu usage to basically
nothing, since the traffic does not need encryption
anymore.

This option uses the nc command on the client side.
So this will not work with windows as of now!
2021-01-13 12:43:52 +01:00
Dan Shick 3501a4f6da Disable shellcheck SC2016 for ssh_cmd 2021-01-05 15:12:14 -05:00
Dan Shick 42f0dd116d Add support for rm2fb 2021-01-05 15:12:14 -05:00
Rien Maertens 3187c03e88 Disable password auth, mention rM2 ed25519 issue
Fixes #38
2021-01-05 20:09:41 +01:00
Rien Maertens c41b877789 Fix formatting 2021-01-01 14:55:28 +01:00
Rien Maertens 38ff447ae6 Fix transpose options for rM2 2021-01-01 14:52:30 +01:00
Rien Maertens 794db4c2e7 Fix formatting 2021-01-01 14:51:49 +01:00
Rien Maertens 4203ac7960 Fix typo 2021-01-01 14:51:49 +01:00
Rien Maertens a0248760bd Edit reStream.sh and README 2021-01-01 14:51:46 +01:00
Rien Maertens 2e280f889d Use head and tail instead of dd 2021-01-01 14:50:43 +01:00
Rien Maertens 221aa0e7b3 Use a better way to find the framebuffer address 2021-01-01 14:50:43 +01:00
Rien Maertens 0dc05496a9 Improve performance for carving memory 2021-01-01 14:50:42 +01:00
Rien cdd88ac6a3 Apply @thomsten's suggestion
Co-authored-by: Thomas Stenersen <stenersen.thomas@gmail.com>
2021-01-01 14:50:42 +01:00
Rien c90bfff017 Apply @xiu's suggestion
Co-authored-by: Guillaume Herail <xiu@users.noreply.github.com>
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 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
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 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 e680dd5531 Set pixel format to rgb565le 2020-04-18 16:17:42 +02:00
beardhatcode e687816421 Add video4linux2 support 2020-04-14 10:59:49 +02:00
Rien Maertens 088d3732c4 Add examples to usage info 2020-04-07 11:48:46 +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 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
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
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
Robbert Gurdeep Singh 0adb3e4fdc Add -p flag for portrait 2020-03-31 15:25:30 +02: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 9f6ba5dd1d Use lz4 instead of zstd, add prebuilt static library 2020-03-17 23:44:55 +01:00
Rien Maertens d0c5ffe9e1 Search for zstd in home directory
This is possibly a solution for #2.
2020-03-12 08:29:19 +01:00
Rien Maertens eb034a63bd Better documentation 2020-03-12 00:17:13 +01:00
Rien Maertens b638810082 Use the default SSH host location, also test if zstd is present on host 2020-03-02 09:34:16 +01:00
Rien Maertens 98709fc0c4 Fix landscape_param 2020-02-24 09:30:12 +01:00