Skip to content
streamneo.
Troubleshooting13 min read

How to Copy FFmpeg YouTube Stream Logs from a VPS for Troubleshooting

Capture FFmpeg logs from a new or running VPS process, retrieve systemd output and copy files securely for troubleshooting.

sn.
StreamNeoPublished 7 October 2026
Worth sharing?

If you need FFmpeg output from a VPS, first find out how that particular process was started: its messages may be in a terminal, a redirected file, or a service manager’s journal. For a new run, you can ask FFmpeg to write a report; for an existing run, you can only retrieve output that was actually retained somewhere.

Once you have a log file, copy it to your computer over SSH and compare its timestamps with YouTube’s stream-health errors. The steps below cover each source without assuming a particular Linux distribution, supervisor, or service configuration.

Identify how FFmpeg was launched

Start by identifying whether FFmpeg is still running and what launched it. A command entered in an interactive SSH session behaves differently from a service started by systemd or a process managed by another supervisor. The log’s location depends on that launch method and on how standard output and standard error were handled.

If you still have the terminal where you started FFmpeg, its messages may be visible there. FFmpeg normally logs to standard error, so they will appear in the terminal unless the command or its surrounding shell redirected them. A terminal’s scrollback is not a durable log: it may be incomplete after disconnection, closure, or a long run. Do not assume you can reconstruct all earlier output from a terminal that is no longer open.

Look for the original command, a shell script, a service definition, or the supervisor’s configuration. You need to learn whether output was redirected, sent to a journal, or captured by some other tool. If you know the process ID, that can help an administrator identify the process, but it does not by itself tell you where past stderr went.

A useful first-pass comparison is:

Situation Likely place to look Limitation
You started FFmpeg in a terminal That terminal’s current output Scrollback may be partial or gone
The command used output redirection The named file or destination in the command or script The file may be elsewhere, rotated, or inaccessible
A systemd unit started FFmpeg The journal, if the unit’s output is connected to it Requires the correct unit, retained entries and permission
Another supervisor started FFmpeg That supervisor’s configured log destination Steps depend on its configuration
You are about to start a new run A report file created by FFmpeg It covers that invocation, not earlier runs

If the launch method is unclear, inspect the configuration rather than guessing filenames. A service can run as a different account, use a different working directory, or redirect output somewhere other than your login user’s home. An administrator may need to help identify the unit or log destination if you do not have permission to inspect it.

This distinction matters for continuous streams. Guides such as creating a 24/7 Indian music stream with VLC describe a different streaming tool, but the basic troubleshooting principle carries over: first establish what process actually produced the broadcast and where its output was sent.

Capture logs on the next run

For a fresh run, FFmpeg’s -report option is a straightforward way to create a report file. The FFmpeg documentation says this writes the command line and log output to a timestamp-named file in the current working directory; it also enables debug-level verbosity. The FFmpeg documentation for generic options explains -report and the FFREPORT environment variable.

Add -report to the invocation while retaining the input and output arguments you already use. The bracketed phrase below is a reminder, not literal shell syntax:

ffmpeg -report [your existing input and output arguments]

Run it from a directory where the account executing FFmpeg can write files. When the process starts, note that working directory and check it for the newly created report. If the FFmpeg command is inside a service or script, its working directory may not be the directory you get by opening a separate shell, so check the service or script configuration as well.

A report can be larger than ordinary informational output because -report implies debug verbosity. Use it when you need a fuller diagnostic record, but plan to inspect the resulting file before sharing it. If you are trying to keep a narrow, predictable filename, set FFREPORT for that invocation instead:

FFREPORT=file=ffreport.log:level=32 ffmpeg [your existing input and output arguments]

This documented example asks for the file ffreport.log and an info-level log setting. Replace the placeholder with your actual FFmpeg arguments. The environment variable must be present in the environment of the FFmpeg process; setting it in an unrelated shell after the process has started will not change a running invocation. The documentation also notes that errors parsing this variable are not fatal and may not appear in the report, so verify the file exists and contains output rather than assuming that the command worked.

A deliberate report is especially useful when an issue is intermittent. Record the start time and the exact version and command used, with credentials removed from any copy you plan to share. A report from a repeated run cannot recover a previous run’s output, but it gives you a consistent record to compare if the problem returns. If your workflow uses OBS instead, the relevant diagnostics may differ; see the guide to troubleshooting dropped frames in a pre-recorded OBS stream.

Find output from an existing process

An already-running process cannot be assumed to have a complete report waiting to be generated. If it was not started with -report, and its output was not retained by a terminal, file redirection, supervisor, or journal, the earlier stderr may simply no longer be available. Adding a report option now does not retroactively capture output from that invocation.

If you started FFmpeg manually and the terminal is still open, copy the relevant visible messages into a local text file or use the terminal application’s save or scrollback export feature. Include the time range and surrounding lines, not just the final error, because preceding messages can explain what led to it. Be aware that terminal output can be truncated, and avoid pasting a command line that contains a stream key into a shared support thread.

If the launch command included redirection, follow the path in that command. For example, 2> ffmpeg.log sends standard error to a file named ffmpeg.log relative to the command’s working directory; >> ffmpeg.log 2>&1 appends standard output and standard error to a file. These are examples of shell syntax, not a claim that your process used either form. Inspect the actual script or service command and check the appropriate path and account permissions.

A supervisor may provide its own interface for viewing or exporting a process’s output. Find its configured destination or documentation, then save a bounded time range if possible. Do not treat the existence of a live FFmpeg process as proof that its old messages are recoverable. If no destination was configured and the terminal is gone, the practical next step is to prepare a report for the next run and capture the failure again.

When you find a candidate file, check that it is non-empty and covers the time in question. A file can exist but contain only a startup banner, a later run, or output from another process. For a continuing playlist or loop, the question of whether the source itself is configured as intended is separate from log retrieval; this guide on streaming recorded Malayalam songs continuously is relevant to that operational context.

Retrieve logs from a systemd journal

Use this route only if FFmpeg is managed by systemd and its output is available through the journal. Identify the real unit name first; do not assume it is called ffmpeg.service. If you are authorised to query that unit, a recent window can be displayed without opening a pager:

sudo journalctl -u your-ffmpeg-service.service --since '30 minutes ago' --no-pager

Replace the example unit and time range with the actual service and the interval around the problem. journalctl -u filters entries by unit. A VPS may use a different service manager, or systemd may be present without the FFmpeg output being captured in the journal, so an empty result does not prove FFmpeg produced no messages. The systemd journalctl manual describes the command’s unit and time filters.

To preserve a specific interval as a text file on the VPS, redirect the command output. This example uses an illustrative date and unit, both of which you must replace:

sudo journalctl -u your-ffmpeg-service.service --since '2026-10-03 20:00:00 UTC' --until '2026-10-03 20:30:00 UTC' --no-pager > ffmpeg-journal.log

The file is created in the current directory of the shell running the command, not necessarily in the service’s working directory. If sudo is not appropriate or permitted, use the account’s authorised journal access or ask an administrator to export the relevant entries. Journal access is governed by local permissions; do not try to bypass them.

If the result looks incomplete, verify that you queried the right unit and time zone, and widen the window enough to include the events before and after the visible failure. The output may include status messages that help identify a restart or exit as well as FFmpeg’s own messages. A pager can make copying awkward, which is why --no-pager and file redirection are useful when preserving the result. Check the saved file’s size and first and last timestamps before transferring it.

If the unit is not the source of the stream, or the service has been renamed, journal entries for a different unit can mislead you. Confirm the service definition and its output handling with whoever maintains the VPS. If the broadcast is instead managed by a playlist tool, the AzuraCast and RadioBOSS comparison for YouTube radio may help distinguish the application’s logs from FFmpeg output.

Copy the log off the VPS securely

Once you know the remote path, run scp from your own computer, not from the VPS shell. The example below copies a file from the remote account into the current local directory, represented by .:

scp [email protected]:/path/to/ffmpeg-journal.log .

Replace the login name, host and path with the values for your server. If the file is in the remote account’s home directory, use its actual path or a home-relative path such as ~/ffreport.log. The local current directory is wherever your terminal was when you ran scp, so choose a location where you can find and review the file.

For a VPS configured to accept SSH on a non-default port, use capital -P followed by that port number:

scp -P 2222 [email protected]:/path/to/ffmpeg-journal.log .

The port shown is an example. Lowercase -p is a different option: it preserves file times and modes. OpenSSH’s scp manual documents these options and the source-to-destination form. Since OpenSSH 9.0, scp uses SFTP over SSH by default, but the command remains a familiar way to transfer a file.

If the transfer fails, check the remote hostname, username, port, authentication key, remote path and permissions. Also confirm that your local machine has an OpenSSH client. A path that exists for the service account may not be readable by your SSH login account. Rather than changing permissions broadly, ask an administrator to place a copy in an authorised location or arrange a transfer with the right account.

An interactive SFTP client can be easier if you need to browse several files or prefer a graphical interface; for one known log, scp is usually more direct. In either case, transfer only the file you need, use the SSH credentials you already trust, and keep the original on the VPS until you have confirmed the local copy opens and covers the right interval.

Include relevant stream and service context

A log is more useful when the person reading it can connect the messages to the broadcast. Alongside the file, provide the FFmpeg version and build banner, the approximate time and time zone of the incident, and the command structure with keys and tokens removed. Describe what you expected to happen, what happened instead, whether the issue repeats, and what changed shortly before it began.

For a managed process, include the unit or supervisor name and whether it restarted or exited, if you know. For a manually launched command, state whether output came from a terminal or redirected file. If you captured a systemd journal, say which unit and time window you queried. That helps distinguish a missing log from a process that never wrote to the destination you searched.

Keep the context factual. If the stream stopped, say when you noticed and whether FFmpeg continued running. If viewers reported buffering, distinguish that from an encoder error or a disconnected process. The goal is to let someone line up the log’s timestamps with other evidence, not to diagnose the cause from one message in isolation.

YouTube’s Live Control Room shows timestamped stream-health errors. Compare those times with the report or journal window rather than treating either source as complete on its own. YouTube’s live stream troubleshooting guidance recommends checking encoder-side picture and sound, encoder errors, CPU load, archive where available, and outbound connectivity. Its error guidance also covers ingest configuration such as format, bitrate, codecs, stream configuration, keyframe frequency and resolution. A mismatch between YouTube’s timestamps and your log window may mean you captured the wrong period, not that the two diagnostics contradict each other.

If you run a loop from a VPS and want to distinguish local encoding symptoms from delivery issues, keep notes about whether the process remained active and whether YouTube continued to receive the stream. A guide to reducing YouTube Live buffering for viewers in India on a VPS covers a related viewer-side concern, but it does not replace collecting the timestamped encoder evidence for this incident.

Protect stream keys and sensitive details

Treat a log as potentially sensitive before sending it to anyone. FFmpeg reports include the command line, which may contain a YouTube RTMP URL or other credential-bearing argument. A key can appear in a URL, shell history, a service file, copied terminal output, or a screenshot. Do not expose a YouTube stream key in shared logs, screenshots, support posts or public repositories.

Make a separate copy for sharing and review it before sending. Search the command line and output for stream keys, access tokens, passwords, private source URLs, names, IP addresses or other details you do not want to disclose. Redact the credential value while preserving enough of the argument to show the protocol and option structure. Do not edit the only original copy; keep an untouched file in a controlled location in case the redaction removes useful context.

If the command itself contains a key, do not paste it into a public issue even if the error looks harmless. Share the version, sanitized command, relevant error lines, timestamps and service context instead. If you suspect a key has already been exposed, follow YouTube’s current account and stream-key guidance to replace or reset it, then update the broadcaster that uses it. Check the official page for the current process rather than relying on an old screenshot or copied instructions.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

How do I copy FFmpeg logs from my VPS?

First identify where FFmpeg wrote its output. Save or export the relevant terminal, redirected-file, supervisor, or journal output to a file, then run scp from your local computer with the remote login, host and path. Check the local copy before sharing it and redact credentials.

Can I recover stderr from an FFmpeg process that is already running?

Only if the output was retained in a place you can access, such as an open terminal, redirected file, supervisor log or systemd journal. A running process does not guarantee that its earlier stderr is recoverable, and adding -report after launch will not create a report for that earlier part of the run. Capture the next run deliberately if no retained output exists.

How do I save systemd logs for FFmpeg?

If the process is a systemd unit whose output is available in the journal, query the actual unit with journalctl -u and a relevant time window, then redirect the output to a file. Permissions and journal configuration vary, so use an authorised account and confirm the file contains the intended interval.

Where did my FFmpeg report file go?

The -report option writes a timestamp-named report in the current working directory of that FFmpeg invocation. Check the directory from which the process was launched and the account’s write permissions; a service may use a different working directory from your interactive shell. For a chosen filename, configure FFREPORT before starting the process and verify that the resulting file is non-empty.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Troubleshooting guides ↗ · All topics ↗