Jetson Nano/Gstreamer/Example Pipelines/Encoding: Difference between revisions
(→OMX) |
No edit summary |
||
Line 8: | Line 8: | ||
== OMX == | == OMX == | ||
=== | === H264 Encoding from videotestsrc === | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1920, height=1080 ! omxh264enc ! qtmux ! perf ! filesink location=test.mp4 | gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1920, height=1080 ! omxh264enc ! qtmux ! perf ! filesink location=test.mp4 | ||
</pre> | </pre> | ||
=== | === H264 Encoding from camera === | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! nvvidconv ! omxh264enc ! qtmux ! filesink location=test.mp4 -e | gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! nvvidconv ! omxh264enc ! qtmux ! filesink location=test.mp4 -e | ||
Line 33: | Line 33: | ||
FILE_B=filenameB.mp4 | FILE_B=filenameB.mp4 | ||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_A streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_B | gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_A streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_B | ||
</pre> | |||
=H.265= | |||
== OMX == | |||
=== H265 Encoding from camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE=filename.mp4 | |||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE -e | |||
</pre> | |||
=== Dual H264 Encoding from Camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE_A=filenameA.mp4 | |||
FILE_B=filenameB.mp4 | |||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_A streams. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_B | |||
</pre> | |||
==V4L2== | |||
=== H265 Encoding from Camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE=filename.mp4 | |||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE -e | |||
</pre> | |||
=== Dual H265 Encoding from Camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE_A=filenameA.mp4 | |||
FILE_B=filenameB.mp4 | |||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! tee name=streams streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_A streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_B | |||
</pre> | |||
=VP8= | |||
==OMX== | |||
=== VP8 Encoding from Camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE=filename.mkv | |||
gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxvp8enc ! matroskamux ! filesink location=$FILE -e | |||
</pre> | |||
==V4L2== | |||
=== VP8 Encoding from Camera === | |||
<pre style="background:#d6e4f1"> | |||
FILE=filename.mkv | |||
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2vp9enc bitrate=8000000 ! matroskamux ! filesink location=$FILE -e | |||
</pre> | </pre> | ||
Revision as of 00:18, 28 June 2019
NVIDIA®Jetson Nano™ | |||
---|---|---|---|
Introduction | |||
|
|||
Development | |||
|
|||
GStreamer | |||
|
|||
Contact Us |
H.264
OMX
H264 Encoding from videotestsrc
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420, width=1920, height=1080 ! omxh264enc ! qtmux ! perf ! filesink location=test.mp4
H264 Encoding from camera
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1' ! nvvidconv ! omxh264enc ! qtmux ! filesink location=test.mp4 -e
V4L2
H264 Encoding from Camera
FILE=filename.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2h264enc bitrate=8000000 ! h264parse ! qtmux ! filesink location=$FILE
Dual H264 Encoding from Camera
FILE_A=filenameA.mp4 FILE_B=filenameB.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_A streams. ! omxh264enc bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=$FILE_B
H.265
OMX
H265 Encoding from camera
FILE=filename.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE -e
Dual H264 Encoding from Camera
FILE_A=filenameA.mp4 FILE_B=filenameB.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! tee name=streams streams. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_A streams. ! omxh265enc bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! qtmux ! filesink location=$FILE_B
V4L2
H265 Encoding from Camera
FILE=filename.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE -e
Dual H265 Encoding from Camera
FILE_A=filenameA.mp4 FILE_B=filenameB.mp4 gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! tee name=streams streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_A streams. ! nvv4l2h265enc bitrate=8000000 ! h265parse ! qtmux ! filesink location=$FILE_B
VP8
OMX
VP8 Encoding from Camera
FILE=filename.mkv gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxvp8enc ! matroskamux ! filesink location=$FILE -e
V4L2
VP8 Encoding from Camera
FILE=filename.mkv gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvv4l2vp9enc bitrate=8000000 ! matroskamux ! filesink location=$FILE -e