@@ -41,6 +41,9 @@ public class VideoEncoder
4141
4242 // Unique instance identifier to prevent conflicts between multiple instances
4343 private readonly string instanceId ;
44+
45+ // Control vertical mirroring of the video
46+ private readonly bool mirrorVertically ;
4447
4548 // if set to true, the encoding thread will pause adding new frames
4649 public bool IsPaused { get ; set ; }
@@ -52,11 +55,12 @@ public class VideoEncoder
5255 private volatile bool _stopRequest = false ;
5356 private volatile bool _stopRequestHandled = false ;
5457
55- public VideoEncoder ( int width , int height , int frameRate , int recordingDurationSeconds , string baseOutputDir = "Recording" )
58+ public VideoEncoder ( int width , int height , int frameRate , int recordingDurationSeconds , string baseOutputDir = "Recording" , bool mirrorVertically = false )
5659 {
5760 this . width = width ;
5861 this . height = height ;
5962 this . frameRate = frameRate ;
63+ this . mirrorVertically = mirrorVertically ;
6064
6165 // Create unique instance identifier and output directory
6266 this . instanceId = Guid . NewGuid ( ) . ToString ( "N" ) . Substring ( 0 , 8 ) ; // Use first 8 characters of GUID
@@ -135,6 +139,13 @@ public void StartEncoding()
135139 arguments . Add ( "-preset" ) ;
136140 arguments . Add ( presetName ) ;
137141 }
142+
143+ // Add vertical mirroring filter if enabled
144+ if ( mirrorVertically )
145+ {
146+ arguments . Add ( "-vf" ) ;
147+ arguments . Add ( "vflip" ) ;
148+ }
138149
139150 arguments . AddRange ( new [ ]
140151 {
0 commit comments