mptsd icon indicating copy to clipboard operation
mptsd copied to clipboard

Output PIPE | File

Open lars18th opened this issue 6 years ago • 9 comments

Hi @gfto ,

In order to support PIPE output (instead of only Network UDP output), I suggest to merge the changes from @gvangool : https://github.com/gvangool/mptsd/commits/master

His work includes support for file support when disabling network output. Using in this way, it's possible to pipe the output to other tools, as for example: mptsd -N -W - | ffmpeg

You found it interesting?

lars18th avatar Jun 27 '18 11:06 lars18th

If you're interested, I'll rebase it onto master and make a pull request.

gvangool avatar Jun 27 '18 11:06 gvangool

Hi @gvangool ,

I'm really interested. Just only one comment: You test it with stdout? That's with -W -.

Thank you for your contribution!

lars18th avatar Jun 27 '18 11:06 lars18th

I modified it for friends because they weren't using the network part (only file output). I'm guessing it currently doesn't support the - shortcut for /dev/stdout.

gvangool avatar Jun 27 '18 11:06 gvangool

I'm guessing it currently doesn't support the - shortcut for /dev/stdout.

Ok. Well, in any case it will be easy to include after the rebase. Thank you!

lars18th avatar Jun 27 '18 12:06 lars18th

I've created to pull requests: #25 and #26.

They will have a merge conflict on the getopt line. I'll fix it when either one gets merged.

@lars18th: I have a commit for the stdout option, but would still need to test it out.

gvangool avatar Jun 27 '18 14:06 gvangool

@lars18th check gvangool/mptsd@issue-24. It combines both pull requests and 1 new change (f36f5da042bf4e076f1ac3fccefa5a2206d162f0).

gvangool avatar Jun 27 '18 14:06 gvangool

Hi @gvangool ,

Thank you! I hope @gfto will agree and commit them soon... In any case, I'll check and merge them with my repo.

Regards. :+1:

lars18th avatar Jun 27 '18 14:06 lars18th

Hi @gvangool ,

Thank you for the https://github.com/gfto/mptsd/commit/f36f5da042bf4e076f1ac3fccefa5a2206d162f0. However, it doesn't work because even using the -q (Quiet mode) parameter the program continues writing text in the STDOUT.

So, only disabling all log with -q and writing to STDERR in case of it, will be possible to use it with PIPEs.

Regards.

lars18th avatar Jun 29 '18 12:06 lars18th

Hi @gvangool ,

I created this PR https://github.com/gvangool/mptsd/pull/2 because with your "disable network output" solution the program raises an error. Please, merge it to your "issue-24" branch.

I'm working on fixing the STDOUT output... at time, it doesn't work.

lars18th avatar Jun 29 '18 13:06 lars18th

This is implemented in #37 .

lars18th avatar Mar 13 '24 15:03 lars18th