Hi!
I’m new and I’m starting with Orthanc few months ago.
I’m using it as a storage server. I upload my videos into the orthanc server and from another app i would like to take them in “real video” (not dicom). I’m using the REST API.
Is this possible?
I’m having a lot of troubles, so I would appreciate a lot your help.
Thank you all,
Best wishes
Hello,
I have just added a section about downloading videos using the REST API in the Orthanc Book:
https://book.orthanc-server.com/users/rest.html#downloading-pdf-or-videos
Sébastien-
Hi Sébastien,
Thank you so much for your support.
I cannot download a mp4 by this way you explain in the documentation. I can only download the first frame of the video.
curl http://localhost:8042/instances/e465dd27-83c96343-96848735-7035a133-1facf1a0/frames/1/raw if I write like that (with a 1 in the number of the frame, it allows me to download the next frame in png) I’m not being able to download a mp4 video directly,
Do you know why I’m having this trouble?
Thank you all,
Cristina
This most probably means that your DICOM study does not embed MP4/MPEG2 file, but is a CINE sequence of individual 2D instances.
In this case, you have to download the individual frames and encode a MP4/MPEG2 from them. This can for instance be done using the “ffmpeg” or “avconv” command-line tools, or using the OpenCV module for Python, as explained on the following page:
https://theailearner.com/2018/10/15/creating-video-from-images-using-opencv-python/
The individual JPEG/PNG frames corresponding to the 2D instances can be easily retrieved using the REST API of Orthanc:
https://book.orthanc-server.com/users/rest.html#downloading-images
Sébastien-