@@ -66,11 +66,32 @@ impl Camera {
6666 + ".mp4\" " ;
6767
6868 #[ cfg( feature = "annotated_streams" ) ]
69+ let rtsp_string = "h264. ! queue ! h264parse config_interval=-1 ! video/x-h264,stream-format=byte-stream,alignment=au ! rtspclientsink location=rtsp://127.0.0.1:8554/" . to_string ( )
70+ + camera_name + "_annotated.mp4 " ;
71+ #[ cfg( feature = "annotated_streams" ) ]
6972 let output_string = "appsrc ! videoconvert ! " . to_string ( )
7073 + & h264_enc_pipeline ( 2048000 )
71- + " ! mpegtsmux ! rtspclientsink location=rtspt://127.0.0.1:8554/"
74+ // + " ! h264parse config_interval=-1 ! video/x-h264,stream-format=byte-stream,alignment=au"
75+ + " ! h264parse config_interval=-1 ! video/x-h264,stream-format=byte-stream,alignment=au !"
76+ + " rtspclientsink location=rtsp://127.0.0.1:8554/"
7277 + camera_name
7378 + "_annotated.mp4 " ;
79+ dbg ! ( & output_string) ;
80+ // pipeline_head(camera_path, camera_dimensions.0, camera_dimensions.1, 30)
81+ // "appsrc ! image/jpeg, width=480, height=640, framerate=30/1".to_string()
82+ // + " ! jpegdec ! tee name=raw "
83+ // + "raw. ! queue ! videoconvert ! videobalance brightness=0.0 ! appsink "
84+ // + "raw. ! queue ! videoconvert ! "
85+ // + &h264_enc_pipeline(2048000)
86+ // + " ! tee name=h264 "
87+ // + if rtsp { &rtsp_string } else { "" }
88+ // + "h264. ! queue ! mpegtsmux ! filesink location=\""
89+ // + filesink
90+ // .to_str()
91+ // .ok_or(anyhow!("filesink_dir is not a string"))?
92+ // + "/"
93+ // + camera_name
94+ // + "_annotated.mp4\" ";
7495
7596 let frame: Arc < Mutex < Option < Mat > > > = Arc :: default ( ) ;
7697 let frame_copy = frame. clone ( ) ;
@@ -152,7 +173,7 @@ fn pipeline_head(device_name: &str, width: u32, height: u32, framerate: u32) ->
152173 return format ! ( "mfvideosrc device-index={device_name} ! image/jpeg, width={width}, height={height}, framerate={framerate}/1" ) ;
153174
154175 #[ cfg( not( target_os = "windows" ) ) ]
155- return format ! ( "v4l2src device={device_name} exposure=30 ! image/jpeg, width={width}, height={height}, framerate={framerate}/1" ) ;
176+ return format ! ( "v4l2src device={device_name} exposure=50 ! image/jpeg, width={width}, height={height}, framerate={framerate}/1" ) ;
156177}
157178
158179fn h264_enc_pipeline ( bitrate : u32 ) -> String {
0 commit comments