We have a source camera that generates jpeg files. Depending on system temperature, the output resolution from the camera may be 1080p or it may be 1024x576.
When sending a video sequence that changes resolution the encoder will stop producing data.
Here’s an example of how to re-create the problem:
- Generate some HD content
gst-launch-1.0 videotestsrc num-buffers=48 pattern=1 ! 'video/x-raw,width=1920,height=1080,format=I420,framerate=24/1' ! jpegenc ! multifilesink location=/tmp/reschange.%03d.jpg
- Generate some SD content (file name continues on from HD sequence ending)
gst-launch-1.0 videotestsrc num-buffers=48 pattern=1 ! 'video/x-raw,width=1024,height=576,format=I420,framerate=24/1' ! jpegenc ! multifilesink location=/tmp/reschange.%03d.jpg index=48
- Send the resulting video through the video encoder
gst-launch-1.0 multifilesrc location=/tmp/reschange.%03d.jpg ! jpegdec ! nvvidconv ! nvv4l2h264enc ! video/x-h264,stream-format=byte-stream ! filesink location=/tmp/reschange.h264
Note that the result of part 3 is only the first 48 HD frames. The low res frames don’t even make it to the encoder.
I tried placing an identity after the jpeg decoder, after the nvvidconv, and after the encoder. You can see that frames make it through the jpeg decoder, though nvvidconv, but not through the encoder.