I want to save a video file from the raspberry camera, by using the v4l2 driver and ffmpeg.
v4l2-ctl is able to capture the video, though ffmpeg is not.
When i run the command: ffmpeg -f video4linux2 -i /dev/video0 test.mp4
i get output like this:
DTS 140462612207577, next:1759963 st:0 invalid dropping
PTS 140462612207577, next:1759963 invalid dropping st:0
DTS 140462612247558, next:1799963 st:0 invalid dropping
PTS 140462612247558, next:1799963 invalid dropping st:0
and the video file is empty.
When i run ffmpeg -f video4linux2 -i /dev/video0 -c:v copy test.mp4
i get
[mp4 @ 0x1e44570] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x1e44570] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
and the video file is again empty. I manage to capture with ffmpeg and raspivid with pipelining " | ", but i want to do it with v4l2 driver as well. Any suggestions?