Storing camera footage in jpeg files with format

Hello,

I can successfully store frames of camera stream into a jpg file using the following command:

gst-launch-1.0 nvcamerasrc sensor-id=1 num-buffers=1 ! "video/x-raw(memory:NVMM),width=1948,height=1096" ! nvjpegenc ! filesink location=test.jpg

I was wondering if its possible to store the stream to jpg files with a specific format? for example lets say if we want to store 10 frames per second into jpeg files with unix time names:
1540336804.1.jpg
1540336804.2.jpg

1540336805.0.jpg

or something to that effect.
Thanks

Please try

$ gst-launch-1.0 nvcamerasrc num-buffers=60 ! nvvidconv ! video/x-raw,format=I420 ! nvjpegenc ! multifilesink location=snapshot-%05d.jpg

Great, that works thanks!
Just one question, is there any way I can change the formatting to timestamps rather than counter? for since I’ll be recording multiple frames per second I’m looking for unixtime with milli seconds.
Thanks

You may try something like this:

gst-launch-1.0 nvcamerasrc num-buffers=60 ! nvvidconv ! 'video/x-raw,format=I420' ! nvjpegenc ! multifilesink location=snapshot-$( date --iso-8601=seconds )_%05d.jpg

# OR
gst-launch-1.0 nvcamerasrc num-buffers=60 ! nvvidconv ! 'video/x-raw,format=I420' ! nvjpegenc ! multifilesink location=snapshot-$( date --iso-8601=ns )_%05d.jpg