Closed istranic closed 4 years ago
did you try running your second pipeline with the thermal camera? videoconvert should handle the conversion from GRAY8 to I420
@istranic looks like a cool usage case. Could you share a little more about your use case? Are you prototyping or you are building an app using GStreamer KVS plugin?
@chehefen is this what you're referring to?
gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
I get an error related to the internal data stream. I can post a full log if that helps?
If I run the command above with video0(non thermal) instead of video1, it works fine.
Can you pls help me understand the command above. Is I420 the format of the input video, or that is format at the output of the encoder?
@MushMal I'm prototyping right now, but my goal is to build a piece of hardware that will take a visible and IR video and stream it to the cloud. I'd really appreciate any advice on how to do this. My approach was to use Kinesis Video and somehow figure out how to stream from multiple cameras. First, I'm figuring out how to stream from the visible and IR cameras separately, and then I'll have to figure out how to do it together.
can you do export GST_DEBUG=4
and then try this?
gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
If it didn't work, you can send us the log to kinesis-video-support@amazon.com
In your second pipeline, I420 is the format of input video to the encoder. however, your source video can be other format and videoconvert will handle the conversion to I420.
@istranic very cool scenario. There are two parts to your producer side. 1) How to extract and encode the frames and 2) How to stream to KVS.
You can certainly prototype using kvs plugin with gst-lunch-1.0 but I would recommend putting together an application that would construct the pipeline either with kvs plugin or without - in which case you would have some sort of an app sink that will feed the frames into kvs producer SDK (similar to KVS plugin or gstreamer sample application).
@chehefen It didn't work and I send you the log via email
@MushMal Your comment make sense, though the implementation is a bit outside of my area of expertise. Would you be interested in helping with this. If so, we can connect via email.
@istranic we received your log and will look through it to see what could cause GStreamer error - most likely an issue with the unexpected format in the encoder.
Regarding the help. We would gladly help you by answering questions related to issues with KVS or the KVS SDK in general. It will be hard for us to help with your application though.
Recommend taking a look at the samples and see if you can replicate. If, however, you are not an expert in native code development then perhaps the GStreamer KVS plugin with gst-launch-1.0 tool might fit the bill.
in the log there was this line:
0:00:01.251925453 4123 0x812d80 INFO v4l2 gstv4l2object.c:3927:gst_v4l2_object_get_caps:<v4l2src0> probed caps: video/x-raw, format=(string)UYVY, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)BGR, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)BGR, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)RGB16, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ sRGB }, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY8, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)I420, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)I420, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)YV12, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)YV12, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)RGB, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)RGB, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY16_LE, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY16_LE, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1
It stated the supported format of your camera. As you can see, the camera don't support resolution 640x480, you can either drop the resolution or you can add videoscale in the pipeline like such:
gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
Hi chehefen,
I forgot to mention previously that I tried 160x120, which is the resolution of the thermal camera. Attached are the logs for the lower resolution method or the scaling method.
On Thu, Feb 13, 2020 at 4:23 PM chehefen notifications@github.com wrote:
in the log there was this line: 0:00:01.251925453 4123 0x812d80 INFO v4l2 gstv4l2object.c:3927:gst_v4l2_object_get_caps:
probed caps: video/x-raw, format=(string)UYVY, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)BGR, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)BGR, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)RGB16, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ sRGB }, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY8, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)I420, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)I420, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)YV12, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)YV12, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)RGB, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)RGB, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY16_LE, width=(int)160, height=(int)122, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1; video/x-raw, format=(string)GRAY16_LE, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)9/1 It stated the supported format of your camera. As you can see, the camera don't support resolution 640x480, you can either drop the resolution or you can add videoscale in the pipeline like such:
gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/343?email_source=notifications&email_token=AFOQTV2NROVBST6LSDUXYZTRCW26RA5CNFSM4KUVMWC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELWVFCA#issuecomment-585978504, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOQTVZNIGZE45B33M3UV6LRCW26RANCNFSM4KUVMWCQ .
-- Ivo Stranic Stanford University
COMMAND gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=160,height=120,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=llllllll secret-key=llllllllllllllllll aws-region="us-east-1"
LOG
0:00:00.000492393 4430 0x33ee00 INFO GST_INIT gst.c:510:init_pre: Initializing GStreamer Core Library version 1.10.4
0:00:00.000770621 4430 0x33ee00 INFO GST_INIT gst.c:511:init_pre: Using library installed in /usr/lib/arm-linux-gnueabihf
0:00:00.000848381 4430 0x33ee00 INFO GST_INIT gst.c:522:init_pre: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l
0:00:00.002404935 4430 0x33ee00 INFO GST_INIT gstmessage.c:126:_priv_gst_message_initialize: init messages
0:00:00.005490542 4430 0x33ee00 INFO GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
0:00:00.007645426 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.008263235 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.008341464 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.008516567 4430 0x33ee00 INFO GST_REGISTRY gstregistry.c:1738:ensure_current_registry: reading registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.120280368 4430 0x33ee00 INFO GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/pi/.cache/gstreamer-1.0/registry.arm.bin in 0.111650 seconds
0:00:00.120565367 4430 0x33ee00 INFO GST_REGISTRY gstregistry.c:1594:scan_and_update_registry: Validating plugins from registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.133202379 4430 0x33ee00 INFO GST_REGISTRY gstregistry.c:1696:scan_and_update_registry: Registry cache has not changed
0:00:00.133266025 4430 0x33ee00 INFO GST_REGISTRY gstregistry.c:1773:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.133299150 4430 0x33ee00 INFO GST_INIT gst.c:720:init_post: GLib runtime version: 2.50.3
0:00:00.133332274 4430 0x33ee00 INFO GST_INIT gst.c:722:init_post: GLib headers version: 2.50.3
0:00:00.133360347 4430 0x33ee00 INFO GST_INIT gst.c:723:init_post: initialized GStreamer successfully
0:00:00.133490503 4430 0x33ee00 INFO GST_PIPELINE gstparse.c:325:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=160,height=120,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=lllllllllllllllll secret-key=llllllllllllllllllllllll aws-region=us-east-1 '
0:00:00.144581274 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideo4linux2.so" loaded
0:00:00.144665701 4430 0x33ee00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "v4l2src"
0:00:00.147910422 4430 0x33ee00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseSrc@0x4a60a0 adding pad 'src'
0:00:00.148898906 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideoconvert.so" loaded
0:00:00.148988801 4430 0x33ee00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "videoconvert"
0:00:00.149765516 4430 0x33ee00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0x4ae260 adding pad 'sink'
0:00:00.149834838 4430 0x33ee00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0x4ae260 adding pad 'src'
0:00:00.154648509 4430 0x33ee00 INFO x264enc gstx264enc.c:2741:plugin_init: x264 build: 148
0:00:00.155046840 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstx264.so" loaded
0:00:00.155113715 4430 0x33ee00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "x264enc"
0:00:00.155978398 4430 0x33ee00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x4b4200 adding pad 'sink'
0:00:00.156108970 4430 0x33ee00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x4b4200 adding pad 'src'
0:00:00.232034065 4430 0x33ee00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/Kinesis/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/libgstkvssink.so" loaded
0:00:00.232126513 4430 0x33ee00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kvssink"
0:00:00.232919789 4430 0x33ee00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.233226350 4430 0x33ee00 INFO GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVideoConvert named videoconvert0 (0/0) with caps "(NULL)"
0:00:00.233285412 4430 0x33ee00 INFO GST_ELEMENT_PADS gstutils.c:1633:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element videoconvert0:(any)
0:00:00.233326402 4430 0x33ee00 INFO GST_PADS gstutils.c:933:gst_pad_check_link: trying to link v4l2src0:src and videoconvert0:sink
0:00:00.233398797 4430 0x33ee00 INFO GST_PADS gstpad.c:4112:gst_pad_peer_query:
COMMAND gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=llllllllllllll storage-size=128 access-key=llllllllllll secret-key=llllllllllllllllllllllllllllll aws-region="us-east-1"
LOG
0:00:00.000492236 4477 0xba4e00 INFO GST_INIT gst.c:510:init_pre: Initializing GStreamer Core Library version 1.10.4
0:00:00.000867026 4477 0xba4e00 INFO GST_INIT gst.c:511:init_pre: Using library installed in /usr/lib/arm-linux-gnueabihf
0:00:00.001059525 4477 0xba4e00 INFO GST_INIT gst.c:522:init_pre: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l
0:00:00.002689307 4477 0xba4e00 INFO GST_INIT gstmessage.c:126:_priv_gst_message_initialize: init messages
0:00:00.005833923 4477 0xba4e00 INFO GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
0:00:00.008015108 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.008714219 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.008840520 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.009063383 4477 0xba4e00 INFO GST_REGISTRY gstregistry.c:1738:ensure_current_registry: reading registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.134726751 4477 0xba4e00 INFO GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/pi/.cache/gstreamer-1.0/registry.arm.bin in 0.125502 seconds
0:00:00.135002010 4477 0xba4e00 INFO GST_REGISTRY gstregistry.c:1594:scan_and_update_registry: Validating plugins from registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.147756153 4477 0xba4e00 INFO GST_REGISTRY gstregistry.c:1696:scan_and_update_registry: Registry cache has not changed
0:00:00.147826986 4477 0xba4e00 INFO GST_REGISTRY gstregistry.c:1773:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.147862663 4477 0xba4e00 INFO GST_INIT gst.c:720:init_post: GLib runtime version: 2.50.3
0:00:00.147898652 4477 0xba4e00 INFO GST_INIT gst.c:722:init_post: GLib headers version: 2.50.3
0:00:00.147926777 4477 0xba4e00 INFO GST_INIT gst.c:723:init_post: initialized GStreamer successfully
0:00:00.148071151 4477 0xba4e00 INFO GST_PIPELINE gstparse.c:325:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=llllllllllllllll secret-key=llllllllllllllllllllllllllllll aws-region=us-east-1 '
0:00:00.159030305 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideo4linux2.so" loaded
0:00:00.159113742 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "v4l2src"
0:00:00.162282421 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseSrc@0xd0c0a0 adding pad 'src'
0:00:00.163242988 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideoconvert.so" loaded
0:00:00.163321321 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "videoconvert"
0:00:00.164161160 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0xd14260 adding pad 'sink'
0:00:00.164236212 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0xd14260 adding pad 'src'
0:00:00.165258289 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideoscale.so" loaded
0:00:00.165352455 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "videoscale"
0:00:00.166028857 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0xd1c2d8 adding pad 'sink'
0:00:00.166279741 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0xd1c2d8 adding pad 'src'
0:00:00.171527210 4477 0xba4e00 INFO x264enc gstx264enc.c:2741:plugin_init: x264 build: 148
0:00:00.171857729 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstx264.so" loaded
0:00:00.171934603 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "x264enc"
0:00:00.172824650 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0xd1e8f8 adding pad 'sink'
0:00:00.172964181 4477 0xba4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0xd1e8f8 adding pad 'src'
0:00:00.246810877 4477 0xba4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/Kinesis/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/libgstkvssink.so" loaded
0:00:00.246903064 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kvssink"
0:00:00.247749882 4477 0xba4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.248112120 4477 0xba4e00 INFO GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVideoConvert named videoconvert0 (0/0) with caps "(NULL)"
0:00:00.248175557 4477 0xba4e00 INFO GST_ELEMENT_PADS gstutils.c:1633:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element videoconvert0:(any)
0:00:00.248221390 4477 0xba4e00 INFO GST_PADS gstutils.c:933:gst_pad_check_link: trying to link v4l2src0:src and videoconvert0:sink
0:00:00.248300660 4477 0xba4e00 INFO GST_PADS gstpad.c:4112:gst_pad_peer_query:
log says it couldn't identify /dev/video1
0:00:00.560516079 4430 0x33ee00 INFO GST_ERROR_SYSTEM gstelement.c:1890:gst_element_message_full_with_details:<v4l2src0> posting message: Cannot identify device '/dev/video1'.
can you try run gst-device-monitor-1.0
and see what it prints?
Hi,
I'm so sorry for the mistake. I accidentally unplugged the camera. This time it's plugged in, and i verified that the came works works by displaying a feed on my screen using gstreamer.
Attached are the error logs for when I try to stream to KVS using the commands discussed previously.
On Thu, Feb 13, 2020 at 4:54 PM chehefen notifications@github.com wrote:
log says it couldn't identify /dev/video1 0:00:00.560516079 4430 0x33ee00 INFO GST_ERROR_SYSTEM gstelement.c:1890:gst_element_message_full_with_details:
posting message: Cannot identify device '/dev/video1'. can you try run gst-device-monitor-1.0 and see what it prints? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/343?email_source=notifications&email_token=AFOQTV25IWF3PMAFGHTQAATRCW6QRA5CNFSM4KUVMWC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELWYCEQ#issuecomment-585990418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOQTV7RRCYHEGXC75PVMQDRCW6QRANCNFSM4KUVMWCQ .
-- Ivo Stranic Stanford University
COMMAND gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=160,height=120,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=lllllllllllllllll secret-key=lllllllllllllllllll aws-region="us-east-1"
LOG
0:00:00.000404267 4813 0xed4e00 INFO GST_INIT gst.c:510:init_pre: Initializing GStreamer Core Library version 1.10.4
0:00:00.000725202 4813 0xed4e00 INFO GST_INIT gst.c:511:init_pre: Using library installed in /usr/lib/arm-linux-gnueabihf
0:00:00.000810879 4813 0xed4e00 INFO GST_INIT gst.c:522:init_pre: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l
0:00:00.002469044 4813 0xed4e00 INFO GST_INIT gstmessage.c:126:_priv_gst_message_initialize: init messages
0:00:00.005530844 4813 0xed4e00 INFO GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
0:00:00.007714109 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.008426656 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.008507906 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.008668321 4813 0xed4e00 INFO GST_REGISTRY gstregistry.c:1738:ensure_current_registry: reading registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.150725087 4813 0xed4e00 INFO GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/pi/.cache/gstreamer-1.0/registry.arm.bin in 0.141943 seconds
0:00:00.150988783 4813 0xed4e00 INFO GST_REGISTRY gstregistry.c:1594:scan_and_update_registry: Validating plugins from registry cache: /home/pi/.cache/gstreamer-1.0/registry.arm.bin
0:00:00.163471347 4813 0xed4e00 INFO GST_REGISTRY gstregistry.c:1696:scan_and_update_registry: Registry cache has not changed
0:00:00.163543222 4813 0xed4e00 INFO GST_REGISTRY gstregistry.c:1773:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.163578742 4813 0xed4e00 INFO GST_INIT gst.c:720:init_post: GLib runtime version: 2.50.3
0:00:00.163612701 4813 0xed4e00 INFO GST_INIT gst.c:722:init_post: GLib headers version: 2.50.3
0:00:00.163641971 4813 0xed4e00 INFO GST_INIT gst.c:723:init_post: initialized GStreamer successfully
0:00:00.163787908 4813 0xed4e00 INFO GST_PIPELINE gstparse.c:325:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=160,height=120,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=lllllllllll secret-key=lllllllllllllllllllll aws-region=us-east-1 '
0:00:00.350634917 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideo4linux2.so" loaded
0:00:00.350721062 4813 0xed4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "v4l2src"
0:00:00.353788331 4813 0xed4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseSrc@0x10400a0 adding pad 'src'
0:00:00.354688689 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideoconvert.so" loaded
0:00:00.354744418 4813 0xed4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "videoconvert"
0:00:00.355524776 4813 0xed4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0x1046260 adding pad 'sink'
0:00:00.355591026 4813 0xed4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstBaseTransform@0x1046260 adding pad 'src'
0:00:00.358998605 4813 0xed4e00 INFO x264enc gstx264enc.c:2741:plugin_init: x264 build: 148
0:00:00.359191364 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstx264.so" loaded
0:00:00.359236832 4813 0xed4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "x264enc"
0:00:00.359966515 4813 0xed4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x104b008 adding pad 'sink'
0:00:00.360033493 4813 0xed4e00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x104b008 adding pad 'src'
0:00:00.431759111 4813 0xed4e00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/Kinesis/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/libgstkvssink.so" loaded
0:00:00.431851402 4813 0xed4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kvssink"
0:00:00.432661396 4813 0xed4e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.433003945 4813 0xed4e00 INFO GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVideoConvert named videoconvert0 (0/0) with caps "(NULL)"
0:00:00.433066966 4813 0xed4e00 INFO GST_ELEMENT_PADS gstutils.c:1633:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element videoconvert0:(any)
0:00:00.433108580 4813 0xed4e00 INFO GST_PADS gstutils.c:933:gst_pad_check_link: trying to link v4l2src0:src and videoconvert0:sink
0:00:00.433186756 4813 0xed4e00 INFO GST_PADS gstpad.c:4112:gst_pad_peer_query:
COMMAND gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=lllllllllllllll secret-key=llllllll aws-region="us-east-1"
PARTIAL LOG (I couldn't see the start of the log in the terminal)
0:00:00.329321681 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "x264enc"
0:00:00.330073552 4846 0x129de00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x1418798 adding pad 'sink'
0:00:00.330135843 4846 0x129de00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x1418798 adding pad 'src'
0:00:00.404396020 4846 0x129de00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/Kinesis/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/libgstkvssink.so" loaded
0:00:00.404488102 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kvssink"
0:00:00.405328306 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.405671898 4846 0x129de00 INFO GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVideoConvert named videoconvert0 (0/0) with caps "(NULL)"
0:00:00.405728252 4846 0x129de00 INFO GST_ELEMENT_PADS gstutils.c:1633:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element videoconvert0:(any)
0:00:00.405771116 4846 0x129de00 INFO GST_PADS gstutils.c:933:gst_pad_check_link: trying to link v4l2src0:src and videoconvert0:sink
0:00:00.405843981 4846 0x129de00 INFO GST_PADS gstpad.c:4112:gst_pad_peer_query:
Hi chehefen,
Any chance you've had an opportunity to look at the logs from my previous note.
Thanks, Ivo
On Thu, Feb 13, 2020 at 5:14 PM Ivo Stranic istranic@gmail.com wrote:
Hi,
I'm so sorry for the mistake. I accidentally unplugged the camera. This time it's plugged in, and i verified that the came works works by displaying a feed on my screen using gstreamer.
Attached are the error logs for when I try to stream to KVS using the commands discussed previously.
On Thu, Feb 13, 2020 at 4:54 PM chehefen notifications@github.com wrote:
log says it couldn't identify /dev/video1 0:00:00.560516079 4430 0x33ee00 INFO GST_ERROR_SYSTEM gstelement.c:1890:gst_element_message_full_with_details:
posting message: Cannot identify device '/dev/video1'. can you try run gst-device-monitor-1.0 and see what it prints? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/343?email_source=notifications&email_token=AFOQTV25IWF3PMAFGHTQAATRCW6QRA5CNFSM4KUVMWC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELWYCEQ#issuecomment-585990418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOQTV7RRCYHEGXC75PVMQDRCW6QRANCNFSM4KUVMWCQ .
-- Ivo Stranic Stanford University
-- Ivo Stranic Stanford University
COMMAND gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName3 storage-size=128 access-key=lllllllllllllll secret-key=llllllll aws-region="us-east-1"
PARTIAL LOG (I couldn't see the start of the log in the terminal)
0:00:00.329321681 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "x264enc"
0:00:00.330073552 4846 0x129de00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x1418798 adding pad 'sink'
0:00:00.330135843 4846 0x129de00 INFO GST_ELEMENT_PADS gstelement.c:668:gst_element_add_pad:GstVideoEncoder@0x1418798 adding pad 'src'
0:00:00.404396020 4846 0x129de00 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/home/pi/Kinesis/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/libgstkvssink.so" loaded
0:00:00.404488102 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kvssink"
0:00:00.405328306 4846 0x129de00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.405671898 4846 0x129de00 INFO GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVideoConvert named videoconvert0 (0/0) with caps "(NULL)"
0:00:00.405728252 4846 0x129de00 INFO GST_ELEMENT_PADS gstutils.c:1633:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element videoconvert0:(any)
0:00:00.405771116 4846 0x129de00 INFO GST_PADS gstutils.c:933:gst_pad_check_link: trying to link v4l2src0:src and videoconvert0:sink
0:00:00.405843981 4846 0x129de00 INFO GST_PADS gstpad.c:4112:gst_pad_peer_query:
I'm trying to stream thermal camera temperature data from a Rasperry Pi + USB camera (FLIR Lepton3.5 + PureThermal2) to Kinesis Video in GRAY8 or GRAY16_LE format. Could you please help me figure out how to structure the gstreamer command to make this work?
FYI, when I use the normal Raspberry pi camera, I am able to create a stream using either of the commands below. gst-launch-1.0 -v v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=5/1 ! omxh264enc periodicty-idr=5 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName access-key="YourAccessKey" secret-key="YourSecretKey"
gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=5/1 ! x264enc bframes=0 key-int-max=5 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
However, when I try to change the format (GRAY8 vs I420) and source (video1 vs video0), I can't get it to work. I suspect my command is no longer compatible with the encoder. In addition, I can successfully display the thermal camera feed when I run the command below, so I know my thermal camera is working.
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! ximagesink