I run the program(tegra_multimedia_api/samples/10_camera_recording),but cannot record the video from...

I run the the camera recording on the tx1 board.The program location is tegra_multimedia_api/samples/10_camera_recording.The failing information is as follows,pls tell me how can i solve the problem,thank you!

root@tegra-ubuntu:/home/ubuntu/tegra_multimedia_api/samples/10_camera_recording# ls
camera_recording main.cpp main.o Makefile output.h264
root@tegra-ubuntu:/home/ubuntu/tegra_multimedia_api/samples/10_camera_recording# ./camera_recording
Set governor to performance before enabling profiler
NvPclHwGetModuleData: Misc Driver v4l2_focuser_stub already exists. Avoiding duplicate drivers
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
Failed to query video capabilities: Bad address
NvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
create vidoe encoder return true
CONSUMER: Waiting until producer is connected…
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Sensor_GetV4LPixelType: pixel type 0x101 invalid

Hello, haijun:
Do you fully flash your Jetson board with Jetpack 2.3?
Can you check the file output.h264? that’s the encoded stream from camera.
when the program is running, logs like

CONSUMER: Acquired Frame. 1828717908
CONSUMER: Released frame. 1828717899

will be printed.

In the end, if you see

CONSUMER: Released frame. 1828717902
CONSUMER: Got EOS, exiting...
PRODUCER: Done -- exiting.

and that means the program exit correctly.

For the log you’ve pasted, they are just some warnings, and should not have bad effects.


The probles was solved,thank you very much!

Haijun how did you solve this issue ? I see the same error

I forgot the solving steps!

hello dear haijun.I have the same problem.could you help me to solve my problem. i dont understand it.thanks.

I did not note the solving steps,now I forgot it! I think it is not hard to solve it ,because at that times I did not waste so much time to solve it!

Hello, Beshan and Iman_Roosta:
I’m not sure what issues you’ve met.
All apps in tegra_multimedia_api have been verified.

Flash the device by latest NV release through Jetpack.
Verify the on-board camera first by a simple GST pipeline like:

gst-launch-1.0 nvcamerasrc ! tee ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1920, height=1080, format=(string)I420' ! nvoverlaysink

if it still fails to run, please paste the full log of application, together with syslog as well.



I’m having the same problem. When trying to run the video encoder sample I’m getting “Failed to query video capabilities: Bad address”:

01_video_encode$ ./video_encode ../../data/video/sample_outdoor_car_1080p_10fps.h264 1920 1080 H264 out.h264
Failed to query video capabilities: Bad address
NvMMLiteOpen : Block : BlockType = 4 
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
===== MSENC blits (mode: 1) into tiled surfaces =====
Could not read complete frame from input file
File read complete.
App run was successful

The output of syslog shows:

May  6 07:02:00 tegra-ubuntu kernel: [ 4917.714628] nvmap_alloc_handle: PID 23713: video_encode: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Plase pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.

I’m using a fresh install of JetPack 2.3.1 on a Jetson TX1, 64-bit install. The gstreamer test in jachen’s post does work.


Hi Visionear,
You have run it successfully as it shows ‘App run was successful’. However, you don’t run it correctly. The input has to be YUV420, but you put h264 stream sample_outdoor_car_1080p_10fps.h264. Please give 1920x1080 YUV420 input and try again.

Thanks for you reply.

I also tried the 640x480 YUV420 example video file parking.avi. I’m still getting the same error and the output looks like noise/static when I view it with vlc.

01_video_encode $ ./video_encode ~/VisionWorks-1.5-Samples/data/parking.avi 640 480 H264 out.h264

I added some debug information to video_encode_main.cpp and the line of code that reports the error is

330:    ctx.enc = NvVideoEncoder::createVideoEncoder("enc0");

I don’t understand how the input file color space would have anything to do with creating the video encoder instance. I didn’t think H264 was a color model. Would you please explain and let me know which input video file works for you?

Many Thanks,

Please run the command to get yuv420:
gst-launch-1.0 videotestsrc num-buffers=30 ! ‘video/x-raw,width=1920,height=1080,format=I420’ ! filesink location=input.yuv

Hi Jachen and DaneLLL

I am facing similar issue with argus samples. I am working on SD card.

I posted the problem in this link


I am able to execute all the samples if I work on flash memory rootfs(flashed with Jetpack 2.3.1 using Jetpack flashing method)

But I’m unable to execute samples related to EGLStreams like openglBox, userAutoExposure, userAutoWhiteBalance etc.

I’m facing the below error

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/argus/build/samples/openglBox$ ./argus_openglbox
    PRODUCER: Creating output stream
    PRODUCER: Launching consumer thread
    CONSUMER: Creating context.
    CONSUMER: Connecting to stream.
    Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/openglBox/main.cpp, threadInitialize:180 Unable to connect GL as consumer
    Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/utils/Thread.cpp, threadFunction:126 (propagating)
    Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/openglBox/main.cpp, execute:290 (propagating)
    Segmentation fault

It is happening only on SD card.

I installed Multimedia API alone with all dependencies(CUDA, CudNN, OpenCV4Tegra, TensorRT) via network using Jetpack(Complete Jetpack downloaded, but installed what I need on SD Card i.e Multimedia API)

Hello, alamuru:
For samples in ‘argus’ directory, please take a look at argus/README.TXT. there are a lot of dependencies. Have you ever installed those dependencies all correctly?

if issue still exists, you may debug that app by gdb and find out where crash happens.


Hi Jachen

Thank you very much for the reply.

I followed readme and built my samples. And all the dependencies are installed. I verified carefully.

Still I’m facing the above error.

When I run openglBox sample. I’m facing error at these particlar Lines of code.

ConsumerThread glConsumerThread(iStream->getEGLStream());

It is entering ConsumerThread::threadInitialize() function, but not coming out of it.

I debugged and unable to understand what could be the issue.

Any help is welcome.

Hello, alamuru:
At your comment @ #13, you mentioned that in EMMC root-fs, ALL argus samples work well, right?
So what do you mean ‘It is happening only on SD card.’?
Would you please describes the details about your steps? Flash the whole root-FS in SD card, or just copy the tegra_multimedia_api to SD card?



I’m also having a similar problem with the samples. If i run the video_encoder sample setting the output file to be on my NVME SSD filesystem, the output is snow. However, if the output file is sent to the Flash, /home/ubuntu/, then the correct video output is written.

Is the video encoder writing directly to the file system? Is the video encoder only able to write to the flash?

I’m using the test pattern generated by:

gst-launch-1.0 videotestsrc num-buffers=30 ! 'video/x-raw,width=1920,height=1080,format=I420' ! filesink location=input.yuv

(I now think I understand that the input to video_encode must be raw yuv frames. thanks!)

Hi Jachen

You are correct. It is installation problem.

Earlier I was installing only Multimedia API along with it’s dependencies.
Now I tried installing complete packages on SD card which already has a sample root file system.
Now that error is not coming.
All the samples are working fine.

Thanks for the support.

Hi Jachen

Flash memory is flashed with Jetpack 2.3.1 using this .run file came with JetPack Download - “JetPack-L4T-2.3.1-linux-x64.run”

Using the same .run file I tried to install Multimedia API along with it’s dependencies.

Approach 1:
Steps followed:

  1. In host ubuntu machine I executed the .run file.
  2. Cliked next, next. Then Selected Tx1 kit and Ubuntu Host machine. Then entered password.
  3. JetPack L4T Component Manager popped up. In that I cleared all the actions.
  4. Selected only Multimedia API and changed the no action to install24.2.1.
  5. Keep and applied all the dependencies and cliked next.
  6. Accepted all terms and conditions. Then Ok and Next.
  7. Entered the IP address, username and password of TX1 board.
  8. Installation completed.

By following Above steps I was facing the Unable to connect GL as consumer issue.

Next what I have done is. Followed the same steps till I reach JetPack L4T Component Manager i.e till step 3.
Then In the step 3:
Instead of clear actions and selecting Multimedia API.
I deselected the Flash OS option in Post install. i.e changing Flash OS from install to no action.
At this point:
TX1 board is connected and booted using SD Card.
There is nothing installed on SD Card. Sd card is flashed with R24.2.1 Sample root file system.

Then in JetPack L4T Component Manager, cliked Next and accepted all terms and conditions and entered IP address of TX1 , username and password.
Installation success.

All the samples are working without any issue.

Hello, alamuru:
Thanks for your update. It must be helpful.