LogoLogo
  • About
  • Installation
  • Update & migration
  • Configuration
    • Hostname
    • TLS / HTTPS
    • Database
    • Logging
    • API Security
    • Storage
      • Disk
      • In-memory
      • S3
    • RTMP
    • SRT
    • FFmpeg
    • Sessions
    • Metrics
    • Router
    • Debug
  • API Swagger-Documentation
  • API Clients
  • Web-Interface
  • Guides
    • Beginner
    • RTMP
    • SRT
    • Filesystems
  • General
    • Prometheus metrics
  • API
    • Login
    • Config
    • Log
    • Filesystem
      • Disk
      • In-memory
      • S3
    • Metrics
    • Sessions
    • Profiling
    • Ping
  • API / FFmpeg
    • Process
      • Command
      • Metadata
      • State
      • Probe
      • Report
    • Skills
    • Widget (Website)
  • API / RTMP
    • RTMP
  • API / SRT
    • SRT
  • Development
    • Architecture
    • Coding
    • Custom Docker images
    • Benchmark
    • Support
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API / FFmpeg
  2. Process

Report

PreviousProbeNextSkills

Last updated 2 years ago

Was this helpful?

The process report captures the log output from FFmpeg. The output is split up in a prelude and log output. The prelude is everything before the first progress line is printed. Everything after that is part of the log. The progress lines are not part of the report. Each log line comes with a timestamp of when it has been captured from the FFmpeg output.

The process report helps you to analyze any problems with the FFmpeg command line build from the inputs, outputs, and their options in the process configuration.

If the process is running, the FFmpeg logs will be written to the current report. As soon as the process finishes, the report will be moved to the history. The report history is also part of the response of this API endpoint.

You can define the number of log lines and how many reports should be kept in the history in the config for the datarhei Core in the section.

The following is an example of a report.

{
  "created_at": 1671109892,
  "history": [],
  "log": [
    [
      "1671111449",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8' for writing"
    ],
    [
      "1671111449",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing"
    ],
    [
      "1671111451",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0778.mp4' for writing"
    ],
    [
      "1671111451",
      "[mp4 @ 0x7fa31f80ee40] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0768.mp4' for writing"
    ],
    [
      "1671111451",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing"
    ],
    [
      "1671111453",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0779.mp4' for writing"
    ],
    [
      "1671111453",
      "[mp4 @ 0x7fa31f80ee40] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0769.mp4' for writing"
    ],
    [
      "1671111453",
      "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8' for writing"
    ],
    ...
  ],
  "prelude": [
    "ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers",
    "  built with Apple clang version 14.0.0 (clang-1400.0.29.102)",
    "  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox",
    "  libavutil      57. 28.100 / 57. 28.100",
    "  libavcodec     59. 37.100 / 59. 37.100",
    "  libavformat    59. 27.100 / 59. 27.100",
    "  libavdevice    59.  7.100 / 59.  7.100",
    "  libavfilter     8. 44.100 /  8. 44.100",
    "  libswscale      6.  7.100 /  6.  7.100",
    "  libswresample   4.  7.100 /  4.  7.100",
    "  libpostproc    56.  6.100 / 56.  6.100",
    "Input #0, lavfi, from 'testsrc2=rate=25:size=640x360':",
    "  Duration: N/A, start: 0.000000, bitrate: N/A",
    "  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn",
    "Input #1, lavfi, from 'anullsrc=r=44100:cl=stereo':",
    "  Duration: N/A, start: 0.000000, bitrate: 705 kb/s",
    "  Stream #1:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s",
    "Stream mapping:",
    "  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))",
    "  Stream #1:0 -> #0:1 (pcm_u8 (native) -> aac (native))",
    "Press [q] to stop, [?] for help",
    "[libx264 @ 0x7fa31ef08540] using SAR=1/1",
    "[libx264 @ 0x7fa31ef08540] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2",
    "[libx264 @ 0x7fa31ef08540] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit",
    "[libx264 @ 0x7fa31ef08540] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=1024 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1024 vbv_bufsize=1024 nal_hrd=none filler=0 ip_ratio=1.40 aq=0",
    "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing",
    "[http @ 0x7fa31f80fac0] HTTP error 404 Not Found",
    "Output #0, tee, to '[f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+independent_segments+temp_file:hls_delete_threshold=4:hls_segment_type=fmp4:hls_fmp4_init_filename=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4:hls_fmp4_init_resend=1:hls_segment_filename=http\\\\://admin\\\\:xxx@localhost\\\\:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_%04d.mp4:master_pl_name=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0.m3u8|[f=flv]rtmp://localhost:1935/live/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.stream?token=foobar|[f=mpegts]srt://localhost:6000?mode=caller\u0026transtype=live\u0026streamid=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf,mode:publish,token:abc':",
    "  Metadata:",
    "    title           : http://example.com:8080/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf/oembed.json",
    "    service_provider: datarhei-Restreamer",
    "    encoder         : Lavf59.27.100",
    "  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1024 kb/s, 25 fps, 25 tbn",
    "    Metadata:",
    "      encoder         : Lavc59.37.100 libx264",
    "    Side data:",
    "      cpb: bitrate max/min/avg: 1024000/0/1024000 buffer size: 1024000 vbv_delay: N/A",
    "  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 64 kb/s",
    "    Metadata:",
    "      encoder         : Lavc59.37.100 aac"
  ]
}

Example: read the report of a process with the ID test:

curl http://127.0.0.1:8080/api/v3/process/test/report \
   -H 'accept: application/json' \
   -X GET
from core_client import Client

client = Client(
    base_url="http://127.0.0.1:8080"
)
client.login()

core_process_test_report = client.v3_process_get_report(
    id="test"
)
print(core_process_test_report)
import (
    "fmt"
    "github.com/datarhei/core-client-go/v16"
)

client, _ := coreclient.New(coreclient.Config{
    Address: "https://127.0.0.1:8080",
})

report, err := client.ProcessReport("test")
if err != nil {
    ...
}

fmt.Printf("%+v\n", report)

Description:

ffmpeg.log

Get the logs of a process

get

Get the logs and the log history of a process.

Authorizations
Path parameters
idstringRequired

Process ID

Responses
200
OK
application/json
400
Bad Request
application/json
404
Not Found
application/json
get
GET /v3/process/{id}/report HTTP/1.1
Host: api
Authorization: YOUR_API_KEY
Accept: */*
{
  "created_at": 1,
  "history": [
    {
      "created_at": 1,
      "log": [
        [
          "text"
        ]
      ],
      "prelude": [
        "text"
      ]
    }
  ],
  "log": [
    [
      "text"
    ]
  ],
  "prelude": [
    "text"
  ]
}