Score:0

Hide input ffmpeg command from terminal (htop) when its running on Ubuntu 18.04

us flag
Ben

I want to hide input ffmpeg cmd from terminal when it is running, how can I do it? hide ffmpeg cmd

nobody avatar
gh flag
keyboard ctrl-z this interrupts your command. then type `bg` this puts your command to background. https://serverfault.com/questions/34750/is-it-possible-to-detach-a-process-from-its-terminal-or-i-should-have-used-s
Ben avatar
us flag
Ben
I want to hide input ffmpeg cmd from htop; ffmpeg -i '/~/holiday.mp4' -vcodec libx264 -crf 30 -profile high -preset veryslow '/~/encode.mp4'
cocomac avatar
cn flag
@karel I realize this isn't clear from the question, but [the OP clarified](https://askubuntu.com/questions/1392711/hide-input-ffmpeg-command-from-terminal-htop-when-its-running-on-ubuntu-18-04?noredirect=1#comment2408409_1392717) that they're not trying to hide the output of the command. Instead, they're trying to make `ffmpeg` not show up in htop and similar process-viewer apps
karel avatar
sa flag
back to no CVs@cocomac retracted back to 0 CVs
Score:1
cn flag

If you want to hide stdout, do this:

$ echo hi > /dev/null

Errors will still show up. If you also want to hide errors do this

$ echo hi > /dev/null 2>&1

But, you can also redirect output to a file (to redirect errors to the file, add 2>&1 to the end of this command)

$ echo hi > logfile

To run a command in the background, add an amperstand (&) to the end of the command:

$ your_command &

If you do that, you may want to redirect the output to a log file. For example, this will run it in the background (letting you use your terminal for something else), and redirect output and errors to a log file

$ your_command > logfile 2>&1 &

If you want to put an already-running command in the background, do Ctrl + Z.

Ben avatar
us flag
Ben
thank you. but I want to hide input command parameters from showing in task manager like htop , ect, not the result of stdout.
Nmath avatar
ng flag
Edit your question and include more context. Can you give an example of a use case why you need to hide a process from resource monitors? Because the only thing I can think of is that you want to run malware or spyware on someone else's device without them knowing about it. Now surely, if that were possible, we would consider it a security threat, wouldn't you think?
Ben avatar
us flag
Ben
I am developing a software that it is running ffmpeg, and because of that I don't want my client see my ffmpeg command on htop (or other task manager)!!
cocomac avatar
cn flag
@Ben Why shouldn't they see that? I'm generally against app developers trying to hide what they're running from end users. So I advise against trying to hide what processes are running on the system from the person that owns the system. Well-behaved software shouldn't be secretly starting processes. If you also figure out how to hide processes from the root user, are you also going to secretly run a cryptominer? I strongly suggest that you **don't try to hide processes from the root user**. They have a right to know what's running on **their computer**.
Nmath avatar
ng flag
Why? Why do you need to hide a process from your client? Do you not want them to know about it? What purpose does that solve? Who does that help? And more importantly, do you not see how this would be a security problem if it were possible?
Ben avatar
us flag
Ben
@cocomac Thank your for reply. I don't want to hide the process, and my client knows I use ffmpeg, just I want to hide ffmpeg input setting and presets, not the process. For example I want to see only "ffmpeg" on htop, not "ffmpeg -i /~/holiday.mp4' -vcodec libx264 -crf 30 -profile high -preset veryslow '/~/encode.mp4".
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.