Saving video in .mp4 via gstreamer

Hi all,

I am recording multiple videos from a camera on the TX2 but I want to save the videos to .mp4 instead of .mka. Does anyone know how to do this?

The encoding should be in h265. Also, changing the container via ffmpeg or similar after recording does not really solve the problem.

It’s supported from https://gstreamer.freedesktop.org/releases/gst-plugins-good/1.11.2.html

On the TX2 there is gstreamer0.10 or gstreamer1.0. It is supported on gstreamer above 1.0. Will upgrading to gstreamer 1.6 for example work as efficiently on the TX2? With the proper use of the hardware encoder?

Not sure you have to ‘upgrade’ to 1.6. I’m running L4T-R28.2-DP, but check what gives:

<b>gst-launch-1.0 --version</b>
gst-launch-1.0 version 1.8.3
GStreamer 1.8.3
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0

Not sure why you don’t want to use mkv, but you may also use MPEG-2 Transport Stream with mpegtsmux:

gst-launch-1.0 -e nvcamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480' ! omxh265enc ! mpegtsmux ! filesink location=a.mp2

Stop it with ctrl-C before it fills your disk. Right-click/Properties/Video on the file with nautilus (ubuntu file explorer) and you’ll see MP2TS as container.

AFAIK, you can only use matroska or mp2ts as container for h265 from gstreamer. For h264, you can also use quicktime container with qtmux.