AM68A: AM68A

Part Number: AM68A

Tool/software:

Hello,

I'm trying to split my video recording into three separate files, each containing 10 seconds of footage, using a camera as the video source.

According to GStreamer's official documentation, splitmuxsink is typically used with x264enc. However, on the TI AM68A platform, there are three hardware video encoders available, and for saving purposes, I believe v4l2h264enc and v4l2h265enc should be suitable.

I attempted the following pipeline:

gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=100 ! \ video/x-raw, width=1280, height=720 ! videoconvert ! queue ! \ tee name=t \ t. ! queue ! v4l2h264enc extra-controls="encode,key_int_max=10" ! h264parse ! queue ! \ splitmuxsink location=video%02d.mkv max-size-time=10000000000 max-files=3 muxer-factory=matroskamux \ muxer-properties="properties,streamable=true" \ t. ! queue ! autovideosink

While this pipeline successfully records video, it does not continuously save as expected. I initially set num-buffers=100, which resulted in a 10-second recording. However, when I increased num-buffers to 500, the video duration extended to 50 seconds.Also tried removing the num-buffers then the video is streaming but creating one file of video00.mkv and video is empty, 0kb file.

I assumed that max-size-time should control the duration of each file (10 seconds), while max-files should limit the total number of files. However, the pipeline does not seem to be functioning as intended.

  • Hello, 

    Thanks for your question. It could the queueing and parsing steps need to restructured. Additionally, num-buffers will stop the source at a certain number of frames which is around a 1:1 relationship with the number of buffers specified depending on stream characteristics. 

    Also what SDK version are you using?

    Thanks,
    Sarabesh S.

  • The SDK version is 10.0.1. I tried removing the "num-buffers" property from the source, which made autovideosink work correctly. However, the video is not being saved—the file video00.mkv is created but remains empty and no further file is created.
    The logs show that splitmuxsink is waiting for the end of a GOP, and I’ve set key_int_max=5 to ensure frequent keyframes and increased the queue size to prevent overflows, but the issue persists.. I’ve tested the encoder and muxer independently, and they work fine.
    Thanks

  • Hi Nihal, 

    Wasn't able to look into this today, I'll have an update for you next week. 

    Thanks,
    Sarabesh S.