Play while recording (PWR) feature

This feature allows to preview or even play out a media file while it is still being written to by another process. Playback while recording is available in both MFormats SDK and MPlatform SDK.


Playing while recording is good for:


  • Checking the quality of the output file (you can do it at any time during the recording process).
  • Making sure a sudden interruption of recording (such as due to power loss or computer breakdown) does not make the recorded file unreadable.
  • An alternative way of implementing time shifting.


The main idea is simple: you start capturing to file and you are able to play this file with any application that is based on MPlatform SDK or MFormats SDK.


Playback while recording in MFormats SDK


This feature is enabled/disabled directly in the capturing configuration of MFWriter object:


format='mp4' play_while_rec='true' video::codec='mpeg4' audio::codec='aac'


Or in system registry:


HKEY_CURRENT_USER\Software\Medialooks\MFormats\MFWriter

play_while_rec = true/false



You can try this feature with samples from MFormats SDK. Open the capturing application (Writer sample) and start capturing:


 


Open the playback application (File Playback sample) and start playing back the file that is being recorded:


 


Playback while recording in MPlatform SDK


Playback while recording is available in MPlatform SDK in combination with Encoder Lib and Decoder Lib add-ons.


To enable/disable this feature you should set "play_while_rec" property for MWriter object:


myWriter.PropsSet("play_while_rec", "true");


Or set it in system registry:


HKEY_CURRENT_USER\Software\Medialooks\MPlatform\MWriter

play_while_rec = true/false


With MPlatform SDK samples Play-While-Rec feature is demonstated in the following way. Open the capturing application (Writer sample) and start capturing:


 


Open the playback application (Playlist sample) and start playing back the file that is being recorded: