Repository navigation
Use rtsp stream to download video #370
|
Hi. I'm kinda new to Jaffree so maybe this question can be irrelevant, but I'm stuck. I'm using Jaffree in a project involving IP Cameras from Hikvision, but not directly. The way to communicate with the cams is through a middleware that acts as a rest server, receiving requests and sending the appropriate response depending on what you asked for, nothing magical here. Also, the middleware has a bunch of devices registered in order to group communications. This devices are NVR (network video recorders). I can stream live or recorded files without problem, but I also need to download files. The middleware offers a "way" to do this that's identical to a live streaming: it gives you an rtsp URI for download that has to be returned to the middleware again inside a json. The response to this is a data stream that I'm using as an InputStream for Jaffree using PipeInput.pumpFrom. The problem arrives with the output. A file is created sloooowly in the project folder structure. In fact, the download takes as much time as the video length. I've tried with multiple options for the output and the input, but nothing changes. So, what I'm doing wrong?. Some tests I've done:
My actual code: |
Replies: 1 comment 1 reply
|
@RafaJurado
From architecture perspective I think it's better to download data stream to local disk first, then to convert it as you need and store result on local disk too, and only after that upload result to wherever you want. |
@RafaJurado
-reoption doesn't fix the error, it just hides it.muxer does not support non seekable outputmessage)-c copywhich is useful when you only need to change media container, but not codec, framerate or cut video.-c copyis not compatible with-r 12-preset ultrafastand durationFrom architecture perspective I think it's better to download data stream to local disk first, then to convert it as you need and s…