Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Camera board • cn you help me out guys? stuck here and cannot pipe my camera

$
0
0
Hi Everyone,
I am trying to pipe my camera but I am keep having issues , here below the code.

#!/usr/bin/env bash
set -euo pipefail

OUTDIR="$HOME/cam_hls"
mkdir -p "$OUTDIR"

libcamera-vid \
--width 1280 \
--height 720 \
--framerate 30 \
--codec h264 \
--profile baseline \
--level 4.0 \
--bitrate 4000 \
--inline 1 \
--intra 1 \
--nopreview \
--timeout 0 \
-o - | ffmpeg -hide_banner -nostdin -y \
-y -loglevel info \
-use_wallclock_as_timestamps 1 \
-fflags +genpts \
-probesize 10M \
-analyzeduration 10M \
-f h264 -i - pipe:0 \
-c:v copy \
-an \
-f hls \
-hls_time 2 \
-hls_list_size 8 \
-hls_flags delete_segments+programme_date_time \
"$OUTDIR/index.m3u8"

when launching it with sudo bash -x /usr/local/bin/cam-loopback.sh, below what happens:
I see code
camera is responding
stream is adjusted
CFE format: 1536x864-PC1B
[Null @ 0x55564r9ba340] Unable to find a suitable output format for '-'
Error: *** libav: cannot allocae output context, try setting with --libav-format ***
[h264 @ 0x55562caba6e0] could not find codec parameters for stream 0 (video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (1000000000) and 'probesize' (1000000000) options
input #0, h264, from 'pipe':
duration: N/A, bitrate: N/A
Stream #0:0 Video: h264, none, 25 tbr, 1200k tbn
[Null @ 0x55562cacbbb0] Unable to find a suitable output format for 'pipe:0'
pipe0: Invalid argument

Please, if you could help me out with this it would be great! Thanks in advance! :D

Statistics: Posted by Ro98pawar9800 — Sun Aug 10, 2025 11:09 am



Viewing all articles
Browse latest Browse all 8041

Trending Articles