restreamer
restreamer copied to clipboard
framerate mode unable to use passthrough when stream from device
Describe the bug framerate mode unable to use passthrough when stream from device
To Reproduce Steps to reproduce the behavior:
- when create container, group_add corresponding group(video) for /dev/video0
- create new stream from "hardware device"
- bit probe
- in "framerate mode" select passthrough
Expected behavior able to stream from device successly without transcoding etc.
Screenshots
Desktop (please complete the following information):
- OS: [macos]
- Browser [chrome]
Additional context Release: restreamer-v2.12.0 tag: tried the following: latest, vaapi-dev, vaapi datarhei-core v16.16.0 (linux/amd64) - shrill-scene-2972
command
ffmpeg -loglevel level+info -err_detect ignore_err -y -thread_queue_size 512 -re -r 30 -f video4linux2 -framerate 30 -video_size 1920x1080 -input_format mjpeg -i /dev/video0 -dn -sn -map 0:0 -codec:v libx264 -preset:v ultrafast -b:v 2048k -maxrate:v 2048k -bufsize:v 2048k -r 30 -sc_threshold 0 -pix_fmt yuv420p -fps_mode passthrough -tune:v zerolatency -an -metadata title=https://****.com:8181/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9/oembed.json -metadata service_provider=datarhei-Restreamer -flags +global_header -tag:v 7 -tag:a 10 -f tee [f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+temp_file:hls_delete_threshold=4:hls_segment_filename=http\\://admin\\:yOBd6Vz1tqtMXE1XEz@localhost\\:8080/memfs/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9_output_0_%04d.ts:master_pl_name=7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:yOBd6Vz1tqtMXE1XEz@localhost:8080/memfs/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9_output_0.m3u8|[f=flv]rtmp://localhost:1935/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9.stream|[f=mpegts]srt://localhost:6000?mode=caller&transtype=live&latency=20000&streamid=7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9,mode:publish
logs*
[info] ffmpeg version 7.1.1-datarhei-066f62c-2025-03-03T11:28:45Z Copyright (c) 2000-2025 the FFmpeg developers
[info] built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
[info] configuration: --extra-version='datarhei-066f62c-2025-03-03T11:28:45Z' --prefix=/usr/local --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-vaapi --enable-libv4l2 --enable-libfreetype --enable-alsa --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libdav1d --enable-librav1e --enable-libaom --enable-libxcb --disable-ffplay --disable-ffprobe --disable-debug --disable-doc
[info] libavutil 59. 39.100 / 59. 39.100
[info] libavcodec 61. 19.101 / 61. 19.101
[info] libavformat 61. 7.100 / 61. 7.100
[info] libavdevice 61. 3.100 / 61. 3.100
[info] libavfilter 10. 4.100 / 10. 4.100
[info] libswscale 8. 3.100 / 8. 3.100
[info] libswresample 5. 3.100 / 5. 3.100
[info] libpostproc 58. 3.100 / 58. 3.100
[info] Input #0, video4linux2,v4l2, from '/dev/video0':
[info] Duration: N/A, start: 1420390.174627, bitrate: N/A
[info] Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn
[vost#0:0/libx264 @ 0x5fb588d7a000] [fatal] One of -r/-fpsmax was specified together a non-CFR -vsync/-fps_mode. This is contradictory.
[error] Error opening output file [f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+temp_file:hls_delete_threshold=4:hls_segment_filename=http\\://admin\\:yOBd6Vz1tqtMXE1XEz@localhost\\:8080/memfs/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9_output_0_%04d.ts:master_pl_name=7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:yOBd6Vz1tqtMXE1XEz@localhost:8080/memfs/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9_output_0.m3u8|[f=flv]rtmp://localhost:1935/7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9.stream|[f=mpegts]srt://localhost:6000?mode=caller&transtype=live&latency=20000&streamid=7ebcc52f-a33e-4b7a-9b16-0cf5e2e4dcb9,mode:publish.
[fatal] Error opening output files: Invalid argument
[video4linux2,v4l2 @ 0x5fb588d77580] [warning] Some buffers are still owned by the caller on close.
[error] ioctl(VIDIOC_QBUF): Bad file descriptor
seems to be caused by having -r 30 and -fps_mode passthrough which caused conflits