pixelflux 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pixelflux might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pixelflux
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: A performant web native pixel delivery pipeline for diverse sources, blending VNC-inspired parallel processing of pixel buffers with flexible modern encoding formats.
5
5
  Home-page: https://github.com/linuxserver/pixelflux
6
6
  Author: Linuxserver.io
@@ -87,6 +87,9 @@ settings.output_mode = 1
87
87
  # Force CPU encoding and ignore hardware encoders
88
88
  capture_settings.use_cpu = False
89
89
 
90
+ # --- Debugging ---
91
+ settings.debug_logging = False # Enable/disable the continuous FPS and settings log to the console.
92
+
90
93
  # --- JPEG Settings ---
91
94
  settings.jpeg_quality = 75 # Quality for changed stripes (0-100)
92
95
  settings.paint_over_jpeg_quality = 90 # Quality for static "paint-over" stripes (0-100)
@@ -73,6 +73,9 @@ settings.output_mode = 1
73
73
  # Force CPU encoding and ignore hardware encoders
74
74
  capture_settings.use_cpu = False
75
75
 
76
+ # --- Debugging ---
77
+ settings.debug_logging = False # Enable/disable the continuous FPS and settings log to the console.
78
+
76
79
  # --- JPEG Settings ---
77
80
  settings.jpeg_quality = 75 # Quality for changed stripes (0-100)
78
81
  settings.paint_over_jpeg_quality = 90 # Quality for static "paint-over" stripes (0-100)
@@ -26,6 +26,7 @@ class CaptureSettings(ctypes.Structure):
26
26
  ("watermark_location_enum", ctypes.c_int),
27
27
  ("vaapi_render_node_index", ctypes.c_int),
28
28
  ("use_cpu", ctypes.c_bool),
29
+ ("debug_logging", ctypes.c_bool),
29
30
  ]
30
31
 
31
32
  WATERMARK_LOCATION_NONE = 0
@@ -317,6 +317,7 @@ struct CaptureSettings {
317
317
  WatermarkLocation watermark_location_enum;
318
318
  int vaapi_render_node_index;
319
319
  bool use_cpu;
320
+ bool debug_logging;
320
321
 
321
322
  /**
322
323
  * @brief Default constructor for CaptureSettings.
@@ -345,7 +346,8 @@ struct CaptureSettings {
345
346
  watermark_path(nullptr),
346
347
  watermark_location_enum(WatermarkLocation::NONE),
347
348
  vaapi_render_node_index(-1),
348
- use_cpu(false) {}
349
+ use_cpu(false),
350
+ debug_logging(false) {}
349
351
 
350
352
  /**
351
353
  * @brief Parameterized constructor for CaptureSettings.
@@ -374,7 +376,7 @@ struct CaptureSettings {
374
376
  bool capture_cursor = false,
375
377
  const char* wm_path = nullptr,
376
378
  WatermarkLocation wm_loc = WatermarkLocation::NONE,
377
- int vaapi_idx = -1, bool use_cpu_flag = false)
379
+ int vaapi_idx = -1, bool use_cpu_flag = false, bool debug_log = false)
378
380
  : capture_width(cw),
379
381
  capture_height(ch),
380
382
  capture_x(cx),
@@ -397,7 +399,8 @@ struct CaptureSettings {
397
399
  watermark_path(wm_path),
398
400
  watermark_location_enum(wm_loc),
399
401
  vaapi_render_node_index(vaapi_idx),
400
- use_cpu(use_cpu_flag) {}
402
+ use_cpu(use_cpu_flag),
403
+ debug_logging(debug_log) {}
401
404
  };
402
405
 
403
406
  /**
@@ -1743,6 +1746,7 @@ public:
1743
1746
  std::string watermark_path_internal;
1744
1747
  WatermarkLocation watermark_location_internal;
1745
1748
  bool use_cpu = false;
1749
+ bool debug_logging = false;
1746
1750
 
1747
1751
  std::atomic<bool> stop_requested;
1748
1752
  std::thread capture_thread;
@@ -1890,6 +1894,7 @@ public:
1890
1894
  capture_cursor = new_settings.capture_cursor;
1891
1895
  vaapi_render_node_index = new_settings.vaapi_render_node_index;
1892
1896
  use_cpu = new_settings.use_cpu;
1897
+ debug_logging = new_settings.debug_logging;
1893
1898
  std::string new_wm_path_str = new_settings.watermark_path ? new_settings.watermark_path : "";
1894
1899
  bool path_actually_changed_in_settings = (watermark_path_internal != new_wm_path_str);
1895
1900
 
@@ -1918,7 +1923,7 @@ public:
1918
1923
  h264_paintover_crf, h264_paintover_burst_frames,
1919
1924
  h264_fullcolor, h264_fullframe, h264_streaming_mode, capture_cursor,
1920
1925
  watermark_path_internal.c_str(), watermark_location_internal,
1921
- vaapi_render_node_index, use_cpu
1926
+ vaapi_render_node_index, use_cpu, debug_logging
1922
1927
  );
1923
1928
  }
1924
1929
 
@@ -2055,6 +2060,7 @@ private:
2055
2060
  std::string local_watermark_path_setting;
2056
2061
  WatermarkLocation local_watermark_location_setting;
2057
2062
  bool local_use_cpu;
2063
+ bool local_debug_logging;
2058
2064
 
2059
2065
  {
2060
2066
  std::lock_guard<std::mutex> lock(settings_mutex);
@@ -2079,6 +2085,7 @@ private:
2079
2085
  local_current_capture_cursor = capture_cursor;
2080
2086
  local_vaapi_render_node_index = vaapi_render_node_index;
2081
2087
  local_use_cpu = use_cpu;
2088
+ local_debug_logging = debug_logging;
2082
2089
  local_watermark_path_setting = watermark_path_internal;
2083
2090
  local_watermark_location_setting = watermark_location_internal;
2084
2091
  }
@@ -2271,6 +2278,66 @@ private:
2271
2278
  std::cout << "CPU cores available: " << num_cores << std::endl;
2272
2279
  int num_stripes_config = num_cores;
2273
2280
 
2281
+ int N_processing_stripes;
2282
+ if (local_capture_height_actual <= 0) {
2283
+ N_processing_stripes = 0;
2284
+ } else {
2285
+ if (local_current_output_mode == OutputMode::H264) {
2286
+ if (local_current_h264_fullframe) {
2287
+ N_processing_stripes = 1;
2288
+ } else {
2289
+ const int MIN_H264_STRIPE_HEIGHT_PX = 64;
2290
+ if (local_capture_height_actual < MIN_H264_STRIPE_HEIGHT_PX) {
2291
+ N_processing_stripes = 1;
2292
+ } else {
2293
+ int max_stripes_by_min_height =
2294
+ local_capture_height_actual / MIN_H264_STRIPE_HEIGHT_PX;
2295
+ N_processing_stripes =
2296
+ std::min(num_stripes_config, max_stripes_by_min_height);
2297
+ if (N_processing_stripes == 0) N_processing_stripes = 1;
2298
+ }
2299
+ }
2300
+ } else {
2301
+ N_processing_stripes =
2302
+ std::min(num_stripes_config, local_capture_height_actual);
2303
+ if (N_processing_stripes == 0 && local_capture_height_actual > 0) {
2304
+ N_processing_stripes = 1;
2305
+ }
2306
+ }
2307
+ }
2308
+ if (N_processing_stripes == 0 && local_capture_height_actual > 0) {
2309
+ N_processing_stripes = 1;
2310
+ }
2311
+ std::stringstream settings_ss;
2312
+ settings_ss << "Stream settings active -> Res: " << local_capture_width_actual << "x"
2313
+ << local_capture_height_actual
2314
+ << " | FPS: " << std::fixed << std::setprecision(1) << local_current_target_fps
2315
+ << " | Stripes: " << N_processing_stripes;
2316
+ if (local_current_output_mode == OutputMode::JPEG) {
2317
+ settings_ss << " | Mode: JPEG";
2318
+ settings_ss << " | Quality: " << local_current_jpeg_quality;
2319
+ if (local_current_use_paint_over_quality) {
2320
+ settings_ss << " | PaintOver Q: " << local_current_paint_over_jpeg_quality
2321
+ << " (Trigger: " << local_current_paint_over_trigger_frames << "f)";
2322
+ }
2323
+ } else {
2324
+ std::string encoder_type = "CPU";
2325
+ if (this->vaapi_operational) encoder_type = "VAAPI";
2326
+ else if (this->nvenc_operational) encoder_type = "NVENC";
2327
+ settings_ss << " | Mode: H264 (" << encoder_type << ")";
2328
+ settings_ss << (local_current_h264_fullframe ? " FullFrame" : " Striped");
2329
+ if (local_current_h264_streaming_mode) settings_ss << " Streaming";
2330
+ settings_ss << " | CRF: " << local_current_h264_crf;
2331
+ if (local_current_use_paint_over_quality) {
2332
+ settings_ss << " | PaintOver CRF: " << local_current_h264_paintover_crf
2333
+ << " (Burst: " << local_current_h264_paintover_burst_frames << "f)";
2334
+ }
2335
+ settings_ss << " | Colorspace: " << (local_current_h264_fullcolor ? "I444 (Full Range)" : "I420 (Limited Range)");
2336
+ }
2337
+ settings_ss << " | Damage Thresh: " << local_current_damage_block_threshold << "f"
2338
+ << " | Damage Dur: " << local_current_damage_block_duration << "f";
2339
+ std::cout << settings_ss.str() << std::endl;
2340
+
2274
2341
  std::vector<uint64_t> previous_hashes(num_stripes_config, 0);
2275
2342
  std::vector<int> no_motion_frame_counts(num_stripes_config, 0);
2276
2343
  std::vector<bool> paint_over_sent(num_stripes_config, false);
@@ -2342,6 +2409,7 @@ private:
2342
2409
  local_watermark_path_setting = watermark_path_internal;
2343
2410
  local_watermark_location_setting = watermark_location_internal;
2344
2411
  local_use_cpu = use_cpu;
2412
+ local_debug_logging = debug_logging;
2345
2413
  }
2346
2414
 
2347
2415
  bool current_watermark_is_actually_loaded_in_loop;
@@ -3060,7 +3128,7 @@ private:
3060
3128
  std::chrono::duration_cast<std::chrono::seconds>(
3061
3129
  current_output_time_log - last_output_time);
3062
3130
 
3063
- if (output_elapsed_time_log.count() >= 1) {
3131
+ if (local_debug_logging && output_elapsed_time_log.count() >= 1) {
3064
3132
  double actual_fps_val =
3065
3133
  (encoded_frame_count > 0 && output_elapsed_time_log.count() > 0)
3066
3134
  ? static_cast<double>(encoded_frame_count) / output_elapsed_time_log.count()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pixelflux
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: A performant web native pixel delivery pipeline for diverse sources, blending VNC-inspired parallel processing of pixel buffers with flexible modern encoding formats.
5
5
  Home-page: https://github.com/linuxserver/pixelflux
6
6
  Author: Linuxserver.io
@@ -87,6 +87,9 @@ settings.output_mode = 1
87
87
  # Force CPU encoding and ignore hardware encoders
88
88
  capture_settings.use_cpu = False
89
89
 
90
+ # --- Debugging ---
91
+ settings.debug_logging = False # Enable/disable the continuous FPS and settings log to the console.
92
+
90
93
  # --- JPEG Settings ---
91
94
  settings.jpeg_quality = 75 # Quality for changed stripes (0-100)
92
95
  settings.paint_over_jpeg_quality = 90 # Quality for static "paint-over" stripes (0-100)
@@ -53,7 +53,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
53
53
 
54
54
  setup(
55
55
  name="pixelflux",
56
- version="1.3.2",
56
+ version="1.3.3",
57
57
  author="Linuxserver.io",
58
58
  author_email="pypi@linuxserver.io",
59
59
  description="A performant web native pixel delivery pipeline for diverse sources, blending VNC-inspired parallel processing of pixel buffers with flexible modern encoding formats.",
File without changes
File without changes
File without changes
File without changes