better-ffmpeg-progress 2.5.0__tar.gz → 2.5.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: better-ffmpeg-progress
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Run FFmpeg & see percentage progress + ETA.
5
5
  Home-page: https://github.com/CrypticSignal/better-ffmpeg-progress
6
6
  Author: GitHub.com/CrypticSignal
@@ -19,7 +19,8 @@ Requires-Dist: rich
19
19
  <div align="center">
20
20
 
21
21
  [![PyPI downloads](https://img.shields.io/pypi/dm/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
22
- [![PyPI downloads](https://img.shields.io/pypi/dw/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
22
+ [![PyPI downloads](https://img.shields.io/pypi/dd/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
23
+ ![PyPI - Version](https://img.shields.io/pypi/v/better-ffmpeg-progress)
23
24
  [![GitHub](https://img.shields.io/github/license/crypticsignal/better-ffmpeg-progress?label=License&color=blue)](LICENSE.txt)
24
25
 
25
26
  # Better FFmpeg Progress
@@ -30,7 +31,7 @@ FFmpeg outputs something like:
30
31
  ```
31
32
  frame= 692 fps= 58 q=28.0 size= 5376KiB time=00:00:28.77 bitrate=1530.3kbits/s speed=2.43x
32
33
  ```
33
- Better FFmpeg Process outputs something like:
34
+ Better FFmpeg Progress outputs something like:
34
35
  ```
35
36
  ⠏ Processing abc.webm ━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23% 0:00:04 00:15
36
37
  ```
@@ -163,3 +164,9 @@ The `run` method takes the following **optional** arguments:
163
164
  - [v2.4.0] Print FFmpeg stderr if better progress information cannot be shown.
164
165
  - [v2.4.0] Flush the stream when printing FFmpeg stderr to ensure that it is printed immediately.
165
166
  - [v2.5.0] Add an option to print FFmpeg stderr on a new line if better progress information cannot be shown.
167
+
168
+ [11/11/2024]
169
+ - [v2.5.1] Print the correct log file.
170
+
171
+ [12/11/2024]
172
+ - [v2.5.2] Drain any remaining FFmpeg stderr after the process ends.
@@ -1,7 +1,8 @@
1
1
  <div align="center">
2
2
 
3
3
  [![PyPI downloads](https://img.shields.io/pypi/dm/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
4
- [![PyPI downloads](https://img.shields.io/pypi/dw/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
4
+ [![PyPI downloads](https://img.shields.io/pypi/dd/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
5
+ ![PyPI - Version](https://img.shields.io/pypi/v/better-ffmpeg-progress)
5
6
  [![GitHub](https://img.shields.io/github/license/crypticsignal/better-ffmpeg-progress?label=License&color=blue)](LICENSE.txt)
6
7
 
7
8
  # Better FFmpeg Progress
@@ -12,7 +13,7 @@ FFmpeg outputs something like:
12
13
  ```
13
14
  frame= 692 fps= 58 q=28.0 size= 5376KiB time=00:00:28.77 bitrate=1530.3kbits/s speed=2.43x
14
15
  ```
15
- Better FFmpeg Process outputs something like:
16
+ Better FFmpeg Progress outputs something like:
16
17
  ```
17
18
  ⠏ Processing abc.webm ━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23% 0:00:04 00:15
18
19
  ```
@@ -144,4 +145,10 @@ The `run` method takes the following **optional** arguments:
144
145
  [31/10/2024]
145
146
  - [v2.4.0] Print FFmpeg stderr if better progress information cannot be shown.
146
147
  - [v2.4.0] Flush the stream when printing FFmpeg stderr to ensure that it is printed immediately.
147
- - [v2.5.0] Add an option to print FFmpeg stderr on a new line if better progress information cannot be shown.
148
+ - [v2.5.0] Add an option to print FFmpeg stderr on a new line if better progress information cannot be shown.
149
+
150
+ [11/11/2024]
151
+ - [v2.5.1] Print the correct log file.
152
+
153
+ [12/11/2024]
154
+ - [v2.5.2] Drain any remaining FFmpeg stderr after the process ends.
@@ -228,14 +228,15 @@ class FfmpegProcess:
228
228
  try:
229
229
  stderr = stderr_queue.get_nowait()
230
230
 
231
- if self._duration_secs is None:
232
- print(
233
- stderr,
234
- end="\n" if self._print_stderr_new_line else "\r",
235
- flush=True,
236
- )
237
-
238
- self._ffmpeg_stderr.append(stderr)
231
+ if stderr:
232
+ self._ffmpeg_stderr.append(stderr)
233
+
234
+ if self._duration_secs is None:
235
+ print(
236
+ stderr,
237
+ end="\n" if self._print_stderr_new_line else "\r",
238
+ flush=True,
239
+ )
239
240
  except Empty:
240
241
  pass
241
242
 
@@ -245,6 +246,23 @@ class FfmpegProcess:
245
246
  f"{"\n" if self._duration_secs is None else ""}[KeyboardInterrupt] FFmpeg process(es) killed."
246
247
  )
247
248
 
249
+ # After the process ends, drain any remaining stderr
250
+ while True:
251
+ try:
252
+ stderr = stderr_queue.get_nowait()
253
+
254
+ if stderr:
255
+ self._ffmpeg_stderr.append(stderr)
256
+
257
+ if self._duration_secs is None:
258
+ print(
259
+ stderr,
260
+ end="\n" if self._print_stderr_new_line else "\r",
261
+ flush=True,
262
+ )
263
+ except Empty:
264
+ break
265
+
248
266
  return process.returncode
249
267
 
250
268
  def run(
@@ -310,7 +328,7 @@ class FfmpegProcess:
310
328
  if error_handler:
311
329
  error_handler()
312
330
 
313
- ffmpeg_log_file = "ffmpeg_log.txt"
331
+ ffmpeg_log_file = log_file if log_file else "ffmpeg_log.txt"
314
332
 
315
333
  self._write_ffmpeg_output(
316
334
  "\n".join(self._ffmpeg_stderr), ffmpeg_log_file, is_error=True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: better-ffmpeg-progress
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Run FFmpeg & see percentage progress + ETA.
5
5
  Home-page: https://github.com/CrypticSignal/better-ffmpeg-progress
6
6
  Author: GitHub.com/CrypticSignal
@@ -19,7 +19,8 @@ Requires-Dist: rich
19
19
  <div align="center">
20
20
 
21
21
  [![PyPI downloads](https://img.shields.io/pypi/dm/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
22
- [![PyPI downloads](https://img.shields.io/pypi/dw/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
22
+ [![PyPI downloads](https://img.shields.io/pypi/dd/better-ffmpeg-progress?label=PyPI&color=blue)](https://pypistats.org/packages/better-ffmpeg-progress)
23
+ ![PyPI - Version](https://img.shields.io/pypi/v/better-ffmpeg-progress)
23
24
  [![GitHub](https://img.shields.io/github/license/crypticsignal/better-ffmpeg-progress?label=License&color=blue)](LICENSE.txt)
24
25
 
25
26
  # Better FFmpeg Progress
@@ -30,7 +31,7 @@ FFmpeg outputs something like:
30
31
  ```
31
32
  frame= 692 fps= 58 q=28.0 size= 5376KiB time=00:00:28.77 bitrate=1530.3kbits/s speed=2.43x
32
33
  ```
33
- Better FFmpeg Process outputs something like:
34
+ Better FFmpeg Progress outputs something like:
34
35
  ```
35
36
  ⠏ Processing abc.webm ━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23% 0:00:04 00:15
36
37
  ```
@@ -163,3 +164,9 @@ The `run` method takes the following **optional** arguments:
163
164
  - [v2.4.0] Print FFmpeg stderr if better progress information cannot be shown.
164
165
  - [v2.4.0] Flush the stream when printing FFmpeg stderr to ensure that it is printed immediately.
165
166
  - [v2.5.0] Add an option to print FFmpeg stderr on a new line if better progress information cannot be shown.
167
+
168
+ [11/11/2024]
169
+ - [v2.5.1] Print the correct log file.
170
+
171
+ [12/11/2024]
172
+ - [v2.5.2] Drain any remaining FFmpeg stderr after the process ends.
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as f:
5
5
 
6
6
  setuptools.setup(
7
7
  name="better-ffmpeg-progress",
8
- version="2.5.0",
8
+ version="2.5.2",
9
9
  author="GitHub.com/CrypticSignal",
10
10
  author_email="theaudiophile@outlook.com",
11
11
  description="Run FFmpeg & see percentage progress + ETA.",