jetson-ffmpeg icon indicating copy to clipboard operation
jetson-ffmpeg copied to clipboard

Instant segmentation fault

Open dlueth opened this issue 3 years ago • 3 comments

./ffmpeg.nvmpi -i rtp://some-h264-rtp-stream -vf deblock -c:v h264_nvmpi -c:a copy -f null -

leads to

Segmentation fault (core dumped)

in 99% of cases instantly. Compiled on Jetson Nano exactly from README.md on JetPack 4.4.1. This is just a stripped-down example to check if it works at all.

Edit 1: Just gave it a try with a local file (mp4) and it seems to be OK - so the rtp input is problematic. But, this exact stream works perfectly fine on a static ffmpeg build without hw-acceleration.

Edit 2: Just grabbed a small testfile directly from the rtp and saved it as direct copy ts. Does not work but has same issues as rtp directly

Edit 3: It seems that the MP4 file works fine. The TS file works from time to time, but tends to crash after half a minute or so. The RTP stream crashes directly most of the time and only very rarely "works" for some seconds until it crashes. If I use a static build with libx264 support instead it works flawlessly, 100%.

Any idea what's wrong?

dlueth avatar Jan 13 '21 08:01 dlueth

Try the second nvmpi patch in #69

GavinDarkglider avatar Jan 25 '21 23:01 GavinDarkglider

That patch is a quick and dirty fix that allows apps that arent ffmpeg that allow you to define the decoder used to use the decoder, even if the player isnt setting the pix_fmt, because it is assumed it is set in the codec init.

GavinDarkglider avatar Jan 25 '21 23:01 GavinDarkglider

@GavinDarkglider sorry for the late reply. The second patch does not work as well. Not segfaulting but as soon as I start encoding I get broken pipe.

dlueth avatar Feb 16 '21 07:02 dlueth