Im running Ubuntu 18.04 and I understand the gstreamer is slightly outdated, but I want to capture MJPEG from a webcam and encode it using VP9 into 5 minute videos. My pipeline looks like this:
gst-launch-1.0 -e \
v4l2src device=/dev/video0 ! 'image/jpeg, width=640, height=480, framerate=15/1' ! queue ! \
nvjpegdec ! 'video/x-raw' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420' ! nvv4l2vp9enc maxperf-enable=true ! \
queue ! \
splitmuxsink location=~/video%02d.webm max-size-time=300000000000 muxer=webmmux
Once I run this, the result is not multiple 5 minute videos and instead is just one large video file exceeding 5 minutes.
Ive used nvv4l2h264enc and nvv4l2h265enc with their respective parsers and qtmux for mp4 files, which works perfectly fine. I wanted to switch over to vp9 because the split videos using h264 and h265 mp4 files dont work as expected on chrome, so I figured to try out vp9.
Im using gstreamer 1.14.5, which could be the reason why, but I thought I should get input from others first.
Also, Im pretty new with gstreamer, itd be really nice if someone could point out if the queues in my pipeline are necessary. Sometimes the videos are not exactly 5 mins and are usually a couple seconds off so I figured the queues would fix it, but I really have no idea if it improved it or not. If it helps, Im basically repeating this same pipeline for 3 other cameras.