Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use h264_nvenc in ffmpegOptions #78

Open
DucThanh1997 opened this issue Feb 22, 2021 · 1 comment
Open

How to use h264_nvenc in ffmpegOptions #78

DucThanh1997 opened this issue Feb 22, 2021 · 1 comment

Comments

@DucThanh1997
Copy link

I'm trying to build electron app in jetson nano to stream a camera. Unfortunately, with default ffmpeg options. it take all 4 threads with 90% percentage
image

So I tried to let gpu handle it with this command and it ran smoothly

 ffmpeg -i rtsp://admin:meditech123@10.68.10.96:554 -f mpegts -c: h264_nvenc -codec:v mpeg1video -r 20 -f mpegts -

but when i implement it to node-rtsp-stream with this ffmegOptions

stream = new Stream({
        name: "name",
        streamUrl:
            "rtspURL"
        wsPort: 9999,
        ffmpegOptions: {
            "-r": 20, // options with required values specify the value after the key
            "-f": "mpegts",
            "-c": "h264_nvenc"
        },
    });

it returned an error

Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c h264_nvenc' will be used.
Unknown encoder 'h264_nvenc'
RTSP stream exited with error
Can't read /proc/cpuinfo: Operation not permitted
Can't read /proc/cpuinfo: Operation not permitted
../../third_party/swiftshader/src/Reactor/LLVMReactor.cpp:241 WARNING: ASSERT(ok): llvm::sys::getHostCPUFeatures returned false

My ffmpeg version is 4.3.2 and node-rtsp-stream is 0.0.9. Could you sort it out for me. Thank you

@nileshtn13
Copy link

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants