Guest User

mormot2-runredirect-multiprocess

a guest
Apr 9th, 2026
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.75 KB | None | 0 0
  1. mORMot2 FFmpeg Multi-Process Demo
  2. 2.4.14669 4
  3. > FFmpeg detected: \mORMot2\ex\external-process\exe\ffmpeg.exe
  4. ffmpeg version 2026-04-06-git-7fd2be97b9-essentials_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers
  5.  
  6. =============================================================
  7.  Demo 1: Single FFmpeg instance - graceful "q" stdin shutdown
  8. =============================================================
  9.  
  10. > Command:
  11.   \mORMot2\ex\external-process\exe\ffmpeg.exe -y -hide_banner -loglevel info -re -f lavfi -i testsrc=size=640x480:rate=30 -t 15 -c:v libx264 -preset ultrafast -f null -
  12.  
  13. > Started pid=11912 - letting it encode for 2 seconds...
  14. > collected 1200 bytes of stderr output so far:
  15.  
  16.     Side data:
  17.       CPB properties: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  18. frame=   45 fps= 29 q=15.0 size=N/A time=00:00:01.50 bitrate=N/A speed=0.974x elapsed=0:00:01.54
  19.  
  20. > Sending "q"#10 to FFmpeg stdin for graceful shutdown...
  21. 264 @ 00000249fcb785c0] frame I:1     Avg QP:20.00  size: 13202
  22. [libx264 @ 00000249fcb785c0] frame P:76    Avg QP:15.34  size:   814
  23. [libx264 @ 00000249fcb785c0] mb I  I16..4: 100.0%  0.0%  0.0%
  24. [libx264 @ 00000249fcb785c0] mb P  I16..4:  2.5%  0.0%  0.0%  P16..4:  6.8%  0.0%  0.0%  0.0%  0.0%    skip:90.7%
  25. [libx264 @ 00000249fcb785c0] coded y,u,v intra: 3.6% 2.4% 2.0% inter: 1.1% 1.1% 0.9%
  26. [libx264 @ 00000249fcb785c0] i16 v,h,dc,p: 82%  4%  1% 12%
  27. [libx264 @ 00000249fcb785c0] kb/s:234.06
  28.  
  29. > Result:
  30.   exit code: 0 (0 = clean graceful exit)
  31.   total time: 2250 ms
  32.  
  33. =============================================================
  34.  Demo 2: THREE concurrent FFmpeg instances, stopped one by one
  35. =============================================================
  36.  
  37.   [Deck1-testsrc pid=11660 started]
  38.   [Deck2-smptebars pid=28068 started]
  39.   [Deck3-mandelbrot pid=6800 started]
  40.  
  41. > Letting all 3 decks encode for 2 seconds...
  42.  
  43. > Stopping Deck2 gracefully (q#10)...
  44.   [Deck2 exited with code=0]
  45.   Deck1 running=1  Deck3 running=1
  46.  
  47. > Remaining decks keep running for 1 more second...
  48.  
  49. > Stopping Deck1 gracefully (q#10)...
  50.   [Deck1 exited with code=0]
  51.   Deck3 running=1
  52.  
  53. > Stopping Deck3 gracefully (q#10)...
  54.   [Deck3 exited with code=0]
  55.  
  56. > All 3 decks stopped independently - sibling isolation confirmed
  57.  
  58. =============================================================
  59.  Demo 3: Graceful "q" vs hard Terminate()
  60. =============================================================
  61.  
  62. > Run A: graceful "q" shutdown...
  63.   exit code = 0  (expect 0)
  64.   OK: FFmpeg printed final encoding summary (clean flush)
  65.  
  66. > Run B: hard Terminate() without "q"...
  67.   exit code = 255  (usually non-zero: hard kill)
  68.   no final summary - encoder did not flush (expected for hard kill)
  69.  
  70. === All FFmpeg demos complete ===
  71. Press Enter to exit...
Advertisement
Add Comment
Please, Sign In to add comment