Cannot save .mp4 output when using with video sink

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson AGX Xavier
• DeepStream Version: 5.0 GA
• JetPack Version (valid for Jetson only): 4.4
• TensorRT Version: 7.1.3
• Issue Type( questions, new requirements, bugs): questions

Dot file:

Simplified pipeline:

                       / [queue] ! [...] ! [videosink]
[...] ! nvdsosd ! tee !  
                       \ [queue] ! [...] ! [filesink]

Issue: I want to play the output to the screen and save to a .mp4 file, the output play properly but the .mp4 output file is corrupted: The file contain no playable streams.

I would appreciate any advice on how to solve this issue.

We have the implementation in deepstream-app. Please refer to development guide.

Hi @DaneLLL,

Thank you for the link, I’m aware of the deepstream-app. For my application, I can’t use the deepstream-app directly because my camera is not supported (not V4L2 or CSI), therefore I had to use a different plugin for the source element. At first, I think of modifying the deepstream-app for my need but the source code for the deepstream-app is quite large with many files in apps-common & deepstream-app folders and I don’t know where to begin, therefore I opted for building a pipeline based on the various deepstream test apps. I would appreciate your guidance on how to modify the deepstream-app to add support for my camera. It’s a Basler camera and the plugin I used for the source is gst-pylonsrc.

This pipeline linkage may help you implement your usecase:

Hi @DaneLLL,

Thank you for the suggestion!

I should have specify this in my original post, in my current pipeline, my source is from a camera, when I try to save the output to a .mp4 file, the file is saved and its size is not zero but when I tried to open it, the file is not playable (i.e., contain no playable streams)

In my pipeline, I already included nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc ! h264parse ! qtmux ! filesink (as can be seen in my .dot graph), the only difference I notice is the stream format at the capfilter ( NV12 vs. I420), I doubt it will make a difference, but I will try it out and update you on the result.

For using qtmux, you would need to set num-buffers to source so that it sends EoS to end the encoding. If you would like to end with Ctrl+C, you can try matroskamux to get mkv files.