viseron icon indicating copy to clipboard operation
viseron copied to clipboard

yuv420p & h264_nvmpi missing

Open dadaloop82 opened this issue 2 years ago • 16 comments

I have a Jetson Nano 2Gb and about 5 months ago I successfully ran Viseron - which I think is one of the best NVR programs with facial recognition. Then I had to uninstall it to make space for new projects.

Now, however, I could use it but whatever version I download tells me I'm missing a decoder. I haven't followed all the comments, so excuse me for asking a question that has already been asked. Is there anything I can do to fix this and get it working? Thanks!

I would like to stay at the moment on the stable and released version, but I wanted to try also the 2.0 out of curiosity

roflcoopter/jetson-nano-viseron:latest roflcoopter/jetson-nano-viseron:dev

[2022-02-15 15:10:29] [ERROR   ] [viseron.camera.stream.soggiorno] - [h264_nvmpi @ 0x55cca66ff0] Invalid Pix_FMT for NVMPI Only yuv420p is supported
[2022-02-15 15:10:29] [ERROR   ] [viseron.camera.stream.soggiorno] - Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[2022-02-15 15:10:29] [ERROR   ] [viseron.camera.soggiorno] - FFmpeg process has exited

Version 2.0 roflcoopter/aarch64-viseron:modularize [2022-02-15 11:34:55] [ERROR ] [viseron.components.ffmpeg.stream.soggiorno] - Unknown decoder 'h264_nvmpi'

dadaloop82 avatar Feb 15 '22 14:02 dadaloop82

I am refactoring the Nano image, as the current one is very hacky and thus unstable. To solve this temporarily you can add codec: h264 to the camera to run without hardware acceleration.

I need someone to run some tests for me on the new builds, could you be of help?

roflcoopter avatar Feb 18 '22 06:02 roflcoopter

I need someone to run some tests for me on the new builds, could you be of help?

Absolutely yes, helpful and happy to help you! As I said, I have an Nvidia Jetson Nano Developer Kit 2gb with the original Jetpack operating system. Here the Features of my Device: https://developer.nvidia.com/embedded/jetson-nano-developer-kit

Do I have to subscribe to a particular channel/thread ?

dadaloop82 avatar Feb 18 '22 07:02 dadaloop82

Great! Ill just ping you in this issue.

Could you run this and show me the output? ~~docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:test ffmpeg -hwaccels~~

Scratch that, can you try this image instead? docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -hwaccels

roflcoopter avatar Feb 18 '22 07:02 roflcoopter

[ ... ]

Digest: sha256:6066604c713f6c21c7fb3e07c01193389eb606d66c9d3591df114208327b6b85
Status: Downloaded newer image for roflcoopter/jetson-nano-base:1.3
ffmpeg version n4.2.2-15-g6878ea5a44 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs='-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils' --extra-cflags='-I /usr/src/jetson_multimedia_api/include/'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
Hardware acceleration methods:

dadaloop@dadaloop-desktop:~$

dadaloop82 avatar Feb 18 '22 08:02 dadaloop82

Interesting. What about this? docker run -it --rm --runtime=nvidia --privileged roflcoopter/jetson-nano-base:1.3 ffmpeg -hwaccels

And this: docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -codecs

roflcoopter avatar Feb 18 '22 08:02 roflcoopter

docker run -it --rm --runtime=nvidia --privileged roflcoopter/jetson-nano-base:1.3 ffmpeg -hwaccels

ffmpeg version n4.2.2-15-g6878ea5a44 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs='-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils' --extra-cflags='-I /usr/src/jetson_multimedia_api/include/'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
Hardware acceleration methods:

dadaloop@dadaloop-desktop:~$

docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -codecs codecs.txt

dadaloop82 avatar Feb 18 '22 08:02 dadaloop82

And this? docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -decoders

roflcoopter avatar Feb 18 '22 09:02 roflcoopter

is attached :) decodecs.txt

dadaloop82 avatar Feb 18 '22 12:02 dadaloop82

Thanks!

Do you have an h264 camera to test with? If so please see if this works or not (replace <INSERT CAMERA URL HERE> with ur camera URL: docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -c:v h264_nvv4l2dec -rtsp_transport tcp -i <INSERT CAMERA URL HERE> -f segment -segment_time 5 -segment_format mp4 -c copy -an test%d.mp4

If it doesnt work you can try with privileged docker run -it --rm --runtime=nvidia --privileged roflcoopter/jetson-nano-base:1.3 ffmpeg -c:v h264_nvv4l2dec -rtsp_transport tcp -i <INSERT CAMERA URL HERE> -f segment -segment_time 5 -segment_format mp4 -c copy -an test%d.mp4

roflcoopter avatar Feb 18 '22 13:02 roflcoopter

sudo docker run -it --rm --runtime=nvidia roflcoopter/jetson-nano-base:1.3 ffmpeg -c:v h264_nvv4l2dec -rtsp_transport tcp -i rtsp://[xxxx]:[xxxxx]@192.168.1.122:554/Streaming/Channels/101 -f segment -segment_time 5 -segment_format mp4 -c copy -an test%d.mp4

ffmpeg version n4.2.2-15-g6878ea5a44 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs='-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils' --extra-cflags='-I /usr/src/jetson_multimedia_api/include/'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
[rtsp @ 0x55918cb000] Missing PPS in sprop-parameter-sets, ignoring
Input #0, rtsp, from 'rtsp://[xxx]:[xxxx]@192.168.1.122:554/Streaming/Channels/101':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 25 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
[segment @ 0x55918fb740] Opening 'test0.mp4' for writing
Output #0, segment, to 'test%d.mp4':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, q=2-31, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[segment @ 0x55918fb740] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[segment @ 0x55918fb740] Opening 'test1.mp4' for writingrate=N/A speed=1.31x
[segment @ 0x55918fb740] Opening 'test2.mp4' for writingrate=N/A speed=1.18x
[segment @ 0x55918fb740] Opening 'test3.mp4' for writingrate=N/A speed=1.13x
[segment @ 0x55918fb740] Opening 'test4.mp4' for writingrate=N/A speed= 1.1x
[ .... ]

dadaloop82 avatar Feb 18 '22 13:02 dadaloop82

wow seems to be working(!)

roflcoopter avatar Feb 18 '22 13:02 roflcoopter

I’m glad. What was the problem? How can I solve ? Or do you have to solve at the code level ? Thank you!

dadaloop82 avatar Feb 18 '22 14:02 dadaloop82

This is using a new way of installing ffmpeg for the nano, so i need to fix it in the image. Will include it in v2 soon, ill ping you there when its ready

roflcoopter avatar Feb 18 '22 15:02 roflcoopter

Any Way to help? I used to run viseron on Jetson Nano 2G and now i am receiving the similar issues with some of the issues mainly at the moment : NvMMLiteOpen : Block : BlockType = 261 NVMEDIA: Reading vendor.tegra.display-size : status: 6 NvMMLiteBlockCreate : Block : BlockType = 261

eldadh avatar Feb 22 '22 09:02 eldadh

Any Way to help? I used to run viseron on Jetson Nano 2G and now i am receiving the similar issues with some of the issues mainly at the moment : NvMMLiteOpen : Block : BlockType = 261 NVMEDIA: Reading vendor.tegra.display-size : status: 6 NvMMLiteBlockCreate : Block : BlockType = 261

Sorry you're having issues as well. dadaloop82 offered to give me access to his Nano so i can run some tests

roflcoopter avatar Feb 22 '22 15:02 roflcoopter

if it helps i could to the same i guess, although i would prefer the "ping& pong" approach like we did in the early stages of the nano developent where you gave us instructions and viewed to corresponding logs.

eldadh avatar Feb 22 '22 16:02 eldadh

Closed in v2, you can use the gstreamer component instead of ffmpeg now

roflcoopter avatar Dec 19 '22 14:12 roflcoopter