Change recorded stream Video name and folder

cheinan

Member
Hello

In the config flashphoner.properties file i see:
# record - Folder for record audio from calls. If empty then recording will be disabled
# record_filename_template - Template for file name of record. Default: {id}-{date}
it says only: record audio from calls.

Can i change the folder of the video + audio recorded webcam stream?
Can i determine the file name of the recorded stream?

Thanks
Cheinan
 

Max

Administrator
Staff member
Hello
Can i change the folder of the video + audio recorded webcam stream?
Yes you can.
Once the file is recorded, WCS will run WCS_HOME/bin/on_record_hook.sh script
You can modify this script and copy recorded file to any folder.
Please read this article to see how it works:
https://flashphoner.com/recording-webrtc-video-stream-from-webcams-browser-with-on-amazon-s3/
Can i determine the file name of the recorded stream?
Yes you can set
Code:
stream_record_policy=streamName
in the flashphoner.properties
Then record name will be exactly as stream name.
For example if you stream
Code:
session.createStream({name:'stream1'}).publish();
then filename will be stream1.mp4
If you use this policy make sure your stream names are unique, because you can't publish two streams with the same name simultaneously.
 
Top