Please provide complete information as applicable to your setup.
• Hardware Platform : DGPU
• DeepStream Version : 6.2.0 **
• TensorRT Version : 8.5.2.2
• NVIDIA GPU Driver Version : 530.30.02
Requirement:
Hi,
I have a Mp4 file with audio and video, Using the deepstream pipeline have to inference using the video frames, and encode the processed frames.
Output should contain processed frames plus audio
Could you suggest a pipeline in which we can do this?
It is a normal GStreamer pipeline. Clocks and synchronization in GStreamer
gst-launch-1.0 -e filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! nvv4l2decoder num-extra-surfaces=2 ! m.sink_0 nvstreammux batch-size=1 width=1280 height=720 name=m ! nvinfer batch-size=1 config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt ! nvstreamdemux name=d d.src_0 ! queue ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! queue ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=new.mp4 enable-last-sample=0 demux.audio_0 ! queue ! mux.audio_0
Hi Fiona.Chen ,
Thanks for the command , Its working !!
This command works well for the .mp4 files with audio.
But mp4 files without audio its getting frozen.
Can this command line be modified in a such a way it can handle .mp4 file without audio ?
@Shreyas.Ashwath
It has nothing to do with DeepStream. Can you google by yourself?
Or you need to spend some time to learn the basic concepts and knowledge with GStreamer. GStreamer: open source multimedia framework
The basic logic is that if there is no audio in the media file, you can remove the audio related elements and branch from the pipeline directly.
Hi,
For video encoding and decoding I have :
gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264_15fps.mp4 ! m.sink_0 nvstreammux name=m width=1920 height=1080 batch-size=1 ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test0.mp4
For video processing and audio encoding i can use :
gst-launch-1.0 -e filesrc location=videoplayback.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! nvv4l2decoder num-extra-surfaces=2 ! m.sink_0 nvstreammux batch-size=1 width=1280 height=720 name=m ! nvstreamdemux name=d d.src_0 ! queue ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! queue ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=new.mp4 enable-last-sample=0 demux.audio_0 ! queue ! mux.audio_0
Requirement is, I need to have single pipeline which can handle .mp4 file with or without audio.
Currently using
gst-launch-1.0 -e filesrc location=videoplayback.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! nvv4l2decoder num-extra-surfaces=2 ! m.sink_0 nvstreammux batch-size=1 width=1280 height=720 name=m ! nvstreamdemux name=d d.src_0 ! queue ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! queue ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=new.mp4 enable-last-sample=0 demux.audio_0 ! queue ! mux.audio_0
we need to provide mp4 file with audio else its failing,
The qtmux sink pads(video_%x, audio_%x) and qtdemux src pads (video_%x, audio_%x) are all “pads on request”. You can put them in one pipeline. Request and Sometimes pads (gstreamer.freedesktop.org)
This is DeepStream forum, we need to focus on DeepStream related topics here.
system
Closed
June 28, 2023, 8:55am
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.