Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading form stdout pip will not make sanjuuni process more frames #29

Open
Commandcracker opened this issue Sep 30, 2024 · 1 comment

Comments

@Commandcracker
Copy link

import subprocess

p = subprocess.Popen([
    "./sanjuuni",
    "-i", "/home/red/Desktop/in.mp4",
    "--raw",
    "--streamed",
    "--width=51",
    "--height=19",
    "-o", "-"
], stdout=subprocess.PIPE)

while True:
    print(p.stdout.read(1).decode(), end="")
$ python3 test.py
|----------------.------------------------------------------------------------|
| Device ID    0 | NVIDIA GeForce RTX 3070                                    |
|----------------'------------------------------------------------------------|
|----------------.------------------------------------------------------------|
| Device ID      | 0                                                          |
| Device Name    | NVIDIA GeForce RTX 3070                                    |
| Device Vendor  | NVIDIA Corporation                                         |
| Device Driver  | 555.42.02                                                  |
| OpenCL Version | OpenCL C 1.2                                               |
| Compute Units  | 46 at 1755 MHz (5888 cores, 20.666880 TFLOPs/s)            |
| Memory, Cache  | 8083 MB, 1288 KB global / 48 KB local                      |
| Buffer Limits  | 2020 MB global, 64 KB constant                             |
|----------------'------------------------------------------------------------|
32Vid 1.1
0
!CPC026CAAAAABkABgAAAAAAAAAAAJIBkwGLAYcBgwGTAYcBiwGCAYMBgQKDAYIBhwGDCYEBnwGDAYsBggGJAY8CggGPAogBjgGDAYQBgQGIAYEBjwGEAY8BggGMAY8BjQGPAYICiwGMAZABIAKPASACjwEgAY8BIAOfAY8BkAGfAY8BkQGDASABnwGcAYEBhAGWAYsBlAGDAYIBgwGJAYICgwKPAYMBjwGDAYsBgwGHAY0BhQGLASABjwKQAo8BggGSAYMBnAGDAZwBgwGTAZwBjAGCAZwBkwGDApEBgwKWAYMBjwKQAY8BhwGLAYwBiwKMAYIBgwGBAowBjQGOAYwEjQGCAYQBjAEQAQMBgwEIA4MBCAh4AQgGhwEIAoABAgFAAQcBCAGAAXABBwFwAgcBcAEHBYABBwGAAQcCcAKAAYcDIQEIAYACCAGAAggBgAEIAYADCAKAAQgCgAMIAYACgwGAAQEBAgGAE2gCeAGGAWgBeAEWAXgBcAEHAYMBBwF4AXABCAEHAXABOAEHAQgCBwF4AQMBCAGAAggBgAMIAiABCBDr6evp5+rq6Orq6Ovp6Orq6Ovq6erq6evr6Ovr6Ovr6Ovr6Ovr6Ovr6evr6evp5uo=bde8c92f
@Commandcracker
Copy link
Author

I guess its because sanjuuni is not using an muxer
https://ffmpeg.org/ffmpeg.html#Detailed-description
https://ffmpeg.org/ffmpeg-formats.html#Muxers

 _______              ______________
|       |            |              |
| input |  demuxer   | encoded data |   decoder
| file  | ---------> | packets      | -----+
|_______|            |______________|      |
                                           v
                                       _________
                                      |         |
                                      | decoded |
                                      | frames  |
                                      |_________|
 ________             ______________       |
|        |           |              |      |
| output | <-------- | encoded data | <----+
| file   |   muxer   | packets      |   encoder
|________|           |______________|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant