We used the v4l2src, not nvcamerasrc. Do you have any cmd based on v4l2src?
Or please provide the cmd to test the video based on nvcamerasrc. since need to confirm the video input first.
Hi BalajiNP, it should work if you replace nvcamerasrc with v4l2src ! ‘video/x-raw, width=1920, height=1080, framerate=30/1, format=UYVY’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=I420’
Not sure what you mean with abrupt of execution, and if I correctly understand your problem.
From the log, it seems it successfully records 10 seconds of video and audio as expected (300 frames from camera at 30 fps and 1000 centiseconds of audio).
If you want to get more than 10 seconds, you may increase num-buffers for nvcamerasrc and alsasrc, or remove them and manually send ctrl-c for stopping, but be aware that it may fill your disk if you don’t stop it soon enough. Saving mp4 file on a different disk than rootfs would be safer.
With buffers deletion it seems to record the file without abruption on 10 seconds, but the file doesn’t appear to be playable. It wont open in video player.
Totem returns : File contain no playable streams.
nvidia@tegra-ubuntu:~$ gst-launch-1.0 -e alsasrc ! voaacenc ! queue ! qtmux name=mux ! filesink location=a.mp4 nvcamerasrc ! omxh264enc ! queue ! mux.
Setting pipeline to PAUSED ...
Available Sensor modes :
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 1 WxH = 2592x1458 FrameRate = 30.000000 ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
Redistribute latency...
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
===== MSENC blits (mode: 1) into tiled surfaces =====
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:07.466645325
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
nvidia@tegra-ubuntu:~$ mplayer a.mp4
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing a.mp4.
libavformat version 56.40.101 (external)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f7d4b9608]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: audio (aac), -aid 0, -alang eng
[lavf] stream 1: video (h264), -vid 0
VIDEO: [H264] 640x480 24bpp 3000.000 fps 4267.4 kbps (520.9 kbyte/s)
Clip info:
major_brand: qt
minor_version: 537199360
compatible_brands: qt
creation_time: 2018-01-30 07:07:49
Load subtitles in ./
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/4.53% (ratio: 15999->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar YV12
A: 5.5 V: 5.8 A-V: -0.317 ct: -0.006 0/ 0 46% 1% 1.3% 0 0