0

I have a RPi3B+, and I wish to test transcoding capabilities (h264->h264) with ffmpeg:

ffmpeg -c:v h264_v4l2m2m -rtsp_transport tcp -i 'rtsp://admin:admin@camip:camport' -c:v h264_v4l2m2m -pix_fmt yuv420p -b:v 128k -an test.mp4

Unfortunately I got an error with this:

[h264_v4l2m2m @ 0x2cc35b50] Could not find a valid device
[h264_v4l2m2m @ 0x2cc35b50] can't configure decoder

I'm on a quite recent OS and Kernel:

Kernel: 6.12.22-v8+
OS: Debian (Raspbian) 12

I tried with

modprobe bcm2835_v4l2
AND
adding "dtoverlay=vc4-kms-v3d" to config

Nothing seems working.

Can you confirm (with RPi3B+), if this is working for you?

Update

I have changed the command:

ffmpeg -c:v h264 -rtsp_transport tcp -i 'rtsp://admin:admin@camip:camport' -c:v h264 -b:v 1024k -an test.mp4 -loglevel debug

Now I got some further details:

[graph -1 input from stream 0:0 @ 0x7f70001ae0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:0/1 csp:unknown range:unknown
[format @ 0x7f70002060] Setting 'color_ranges' to value 'tv'
[AVFilterGraph @ 0x7f70000f70] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[graph -1 input from stream 0:0 @ 0x7f70001ae0] video frame properties congruent with link at pts_time: 2.640733
[h264_v4l2m2m @ 0x16ee26f0] Could not find a valid device
[h264_v4l2m2m @ 0x16ee26f0] can't configure encoder
[vost#0:0/h264_v4l2m2m @ 0x16fa3660] [enc:h264_v4l2m2m @ 0x16ee2670] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x16f8f610] Error sending frames to consumers: Invalid argument
[h264 @ 0x16f30810] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[vf#0:0 @ 0x16f8f610] Task finished with error code: -22 (Invalid argument)
[h264 @ 0x16f41ad0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[vf#0:0 @ 0x16f8f610] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/h264_v4l2m2m @ 0x16fa3660] [enc:h264_v4l2m2m @ 0x16ee2670] Encoder thread received EOF
[vost#0:0/h264_v4l2m2m @ 0x16fa3660] [enc:h264_v4l2m2m @ 0x16ee2670] Could not open encoder before EOF
[vost#0:0/h264_v4l2m2m @ 0x16fa3660] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_v4l2m2m @ 0x16fa3660] Terminating thread with return code -22 (Invalid argument)
[h264 @ 0x16ee18c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[vist#0:0/h264 @ 0x16fba920] [dec:h264 @ 0x16f8fc70] Decoder returned EOF, finishing
[vist#0:0/h264 @ 0x16fba920] [dec:h264 @ 0x16f8fc70] Terminating thread with return code 0 (success)
[vist#0:0/h264 @ 0x16fba920] All consumers of this stream are done
[in#0/rtsp @ 0x16eb3690] All consumers are done
[in#0/rtsp @ 0x16eb3690] Terminating thread with return code 0 (success)
[out#0/mp4 @ 0x16fd0d20] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A    
[AVIOContext @ 0x16f53040] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[in#0/rtsp @ 0x16eb3690] Input file #0 (rtsp://admin:dmann87!!!@192.168.87.205:8554):
[in#0/rtsp @ 0x16eb3690]   Input stream #0:0 (video): 140 packets read (439526 bytes); 6 frames decoded; 0 decode errors; 
[in#0/rtsp @ 0x16eb3690]   Total: 140 packets (439526 bytes) demuxed
Conversion failed!
Daniel
  • 291
  • 1
  • 2
  • 11

0 Answers0