CA
extended-salmon
Can I use streams to upload video to Apify storage?
I am using screen recorder (https://github.com/prasanaworld/puppeteer-screen-recorder) and I want to be able to save it upon finishing the run. Can I use Apify storage for it?
GitHub
GitHub - prasanaworld/puppeteer-screen-recorder
Contribute to prasanaworld/puppeteer-screen-recorder development by creating an account on GitHub.
11 Replies
@Vadym just advanced to level 1! Thanks for your contributions! 🎉
Hello @Vadym I have never tried it, but as long as you have a ReadStream and know the content-type, I don't see a reason why it should not be possible. 🙂
extended-salmonOP•2y ago
You should update the doc to mention that storage can accept any Readable
@Pepa J is there a directory on the host machine that I can write temp files to?
@Vadym I suggest you to use key-value store, when running locally it will write on your disk, when running on platform you'ill see id on the Output->KeyValue store tab.
extended-salmonOP•2y ago
My recording library does not work with streams, I have to write it out to a file first :C
Can you suggest a directory that I can save in on the host? @Pepa J
@Vadym
It seems it does, based on the docs https://github.com/prasanaworld/puppeteer-screen-recorder
and then save
pipeStream
to key-value store, something like:
otherwise try /tmp/
thenextended-salmonOP•2y ago
@Pepa J unfortunately, it does not work. The stream hangs up. Looks like a bug in the recorder. Can you point me to a temp dir on the container that actors have access to so that I can save to disk first?
Is /tmp/ as I sugested not working for you? Otherwise you may change the Dockerfile so you can have more control about the file system settings.
extended-salmonOP•2y ago
Oh, did not see the suggestion, thanks man!
@Pepa J is it
./tmp/
or /tmp/
?/tmp/
extended-salmonOP•2y ago
Gotcha!