Stream snapshot rotation numbers increment

smartbet

New Member
I see that snapshot numbers incrementing what is the limit? Is it possible to stay on same name for example if i set rotation 24 frames naming will stay always 1 - 24 (.png)
1596185374351.png
 

Max

Administrator
Staff member
Good day.
I see that snapshot numbers incrementing what is the limit? Is it possible to stay on same name for example if i set rotation 24 frames naming will stay always 1 - 24 (.png)
The limit of snapshot number is 2147483647 (maximum signned integer in Java). You can set snapshots auto retention, but their numbers stlill will increase. Moreover, if snapshots for a stream are in snapshots folder then numbering will be continued when you puablish the stream with the same name.
 

smartbet

New Member
Good day.

The limit of snapshot number is 2147483647 (maximum signned integer in Java). You can set snapshots auto retention, but their numbers stlill will increase. Moreover, if snapshots for a stream are in snapshots folder then numbering will be continued when you puablish the stream with the same name.
So whats happen if snapshot reaches 2147483647 limit?
 

Max

Administrator
Staff member
So whats happen if snapshot reaches 2147483647 limit?
The counter will probably become negative, so you should aware this in your scripts.
Please note that automatic snapshot feature is not intended for long term streams, REST API or WebSDK is more preferrable way in this case.
 

smartbet

New Member
The counter will probably become negative, so you should aware this in your scripts.
Please note that automatic snapshot feature is not intended for long term streams, REST API or WebSDK is more preferrable way in this case.
The issue is that REST and WEBSDK is not suitable because they do not provide resize for snapshot and size of snapshot is too big if we could have size value it would be cool.
 

Max

Administrator
Staff member
The issue is that REST and WEBSDK is not suitable because they do not provide resize for snapshot and size of snapshot is too big
The snapshot is always taken at stream picture size, including automatic snapshots. To take snapshots in desired size you should transcode stream to the suitable resolution, for example, using REST API
Code:
POST /rest-api/transcoder/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
 
{
    "uri": "transcoder://tcode1",
    "remoteStreamName": "original_stream",
    "localStreamName": "resized_stream",
    "encoder": {
        "width": 640,
        "height": 480
    }
}
Then you can take a snapshots of resized_stream.
 

smartbet

New Member
The snapshot is always taken at stream picture size, including automatic snapshots. To take snapshots in desired size you should transcode stream to the suitable resolution, for example, using REST API
Code:
POST /rest-api/transcoder/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json

{
    "uri": "transcoder://tcode1",
    "remoteStreamName": "original_stream",
    "localStreamName": "resized_stream",
    "encoder": {
        "width": 640,
        "height": 480
    }
}
Then you can take a snapshots of resized_stream.
Thank you for this info but I don't think its good idea to transcode all stream just to get snapshot maybe we can set another solution for example separate plugin to do this without transcoding?
 
Last edited:

Max

Administrator
Staff member
Thank you fro this info but I don't think its good idea to transcode all stream just to get snapshot maybe we can set another solution for example separate plugin to do this without transcoding?
Stream resolution can be changed via transcoding only. There is the ticket WCS-2454 to implement snapshot taking on client side in browser, but in this case transcoding just moved to browser.
 
Top