iive has quit [Quit: They came for me...]
Vonter has quit [Ping timeout: 268 seconds]
ivanich has quit [Read error: Connection reset by peer]
Tinos has quit [Quit: Client closed]
Vonter has joined #ffmpeg
gchound has quit [Quit: WeeChat 4.1.2]
ivanich has joined #ffmpeg
ivanich has quit [Remote host closed the connection]
kurosu has quit [Quit: Connection closed for inactivity]
poorboy has quit [Read error: Connection reset by peer]
poorboy has joined #ffmpeg
bitbinge has quit [Ping timeout: 240 seconds]
Ogobaga has quit [Quit: Konversation terminated!]
bitbinge has joined #ffmpeg
Ogobaga has joined #ffmpeg
navi has quit [Quit: WeeChat 4.0.4]
lavaball has quit [Remote host closed the connection]
thilo has quit [Ping timeout: 246 seconds]
thilo has joined #ffmpeg
madwoota has quit [Ping timeout: 244 seconds]
madwoota has joined #ffmpeg
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
gvg has quit [Read error: Connection reset by peer]
LionEagle has joined #ffmpeg
gvg has joined #ffmpeg
LionEagle has quit [Ping timeout: 252 seconds]
minimal has quit [Quit: Leaving]
bitbinge has quit [Ping timeout: 240 seconds]
lemourin has quit [Read error: Connection reset by peer]
lemourin has joined #ffmpeg
FH_thecat has joined #ffmpeg
YuGiOhJCJ has joined #ffmpeg
Vonter has quit [Ping timeout: 260 seconds]
Vonter has joined #ffmpeg
jarthur has joined #ffmpeg
FH_thecat has quit [Remote host closed the connection]
bitbinge has joined #ffmpeg
emmanuelux has quit [Quit: au revoir]
tm512 has quit [Ping timeout: 252 seconds]
FH_thecat has joined #ffmpeg
ishan has quit [Ping timeout: 246 seconds]
atrius has joined #ffmpeg
Sakura`Kinomoto has quit [Read error: Connection reset by peer]
Sakura`Kinomoto has joined #ffmpeg
<atrius> Hi! I'm trying to live encode a numpy array to a compressed format (h264) to send down the wire. I opened ffmpeg as a subprocess with input/output piped, but I'm having a hang when trying to read stdout. Here's the code: https://gist.github.com/mjlbach/a4cbd2e5d2e08fec9962aa5052328fa9
AbleBacon has quit [Read error: Connection reset by peer]
<aaabbb> atrius: is the hanging the read() blocking?
<atrius> Yes
<atrius> aaabbb: yes*
ishan has joined #ffmpeg
\\Mr_C\\ has joined #ffmpeg
<aaabbb> atrius: if you have ffmpeg write to stdout with a redirect like >file does it still block? if the read is blocking it means that ffmpeg is not writing anything to stdout
<atrius> Ah I see what you mean, let me try that as a debugging step
<aaabbb> try running ffmpeg without using python, and take an input file with -i and write to an output file
<atrius> `cat output.mp4 | ffmpeg -y -f mp4 -r 30 -i - -c:v libx264 -pix_fmt yuv420p -movflags faststart+frag_keyframe+empty_moov -f mp4 pipe:1 > test3.mp4` works fine
<atrius> Didn't have a raw video stream laying around but I assume that would be mostly equivalent?
<aaabbb> i don't think you can use faststart when writing to stdout
waleee has quit [Ping timeout: 245 seconds]
<aaabbb> because ffmpeg has to do a second pass and re-read the file to move the moov atom to the start
<atrius> Ah got it, I can remove that one. It seems like it is blocking until stdin closes
<aaabbb> probably because it's trying to read from stdin and isn't able to, and when it closes it gives up (leaving the moov at the end)
<atrius> Why wouldn't it be able to read from stdin? I removed faststart
<aaabbb> because stdin is write only, like imagine a situation where it's piping to another process that only does read()
<atrius> I'm confused, because I can write to stdin and have it output an mp4. Why would changing the output to stdout affect the writeability of stdin?
<aaabbb> i meant stdout not stdin
<aaabbb> i meant that it's trying to read from stdout (because it has to read the file it just wrote in order to move the moov atom)
<atrius> Is there a way to tell it not to do that? Alternatively is there some solution everyone else is doing for encoding renderer outputs to a compressed video format before webrtc?
<aaabbb> by not using faststart, it won't have to do a second pass
<atrius> Right, I removed faststart and it's still hanging
<aaabbb> does it do that when you aren't using python, when you're just reading and writing to the fs?
<aaabbb> what you'll want to do is remove as many variables as you can to see if it's actually an ffmpeg issue
<atrius> No, it's just with python. It didn't hang with faststart on the command line but I assume that's because it first pipes to stdin, closes stdin (which also works in python
<aaabbb> if doing "cat file | ffmpeg $commands > output" works but the python equivalent doesn't, then i don't think i know how to help because i don't know much python
<atrius> No worries, I just wanted to better understand piping/ffmpeg to see if there was something unique about using named pipes in python that was causing the trip up
<atrius> pipes* not named pipes
Sakura`Kinomoto has quit [Ping timeout: 260 seconds]
Sakura`Kinomoto has joined #ffmpeg
emanuele6 has quit [Ping timeout: 245 seconds]
epony has quit [Remote host closed the connection]
bitoff has quit [Ping timeout: 245 seconds]
<atrius> aaabbb: I didn't solve it but I did figure out the issue
<atrius> read on python reads until EOF, there's no EOF until stdin is closed so it just tries to read indefinitely
bitbinge has quit [Ping timeout: 240 seconds]
bitoff has joined #ffmpeg
emanuele6 has joined #ffmpeg
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg
Vonter has quit [Ping timeout: 245 seconds]
Vonter has joined #ffmpeg
jarthur has quit [Quit: jarthur]
chymera has quit [Remote host closed the connection]
jagannatharjun has joined #ffmpeg
deetwelve has quit [Quit: null]
junaid_ has joined #ffmpeg
markizano has quit [Quit: Poweroff]
lusciouslover has quit [Ping timeout: 260 seconds]
rv1sr has joined #ffmpeg
deetwelve has joined #ffmpeg
rvalue has quit [Quit: ZNC - https://znc.in]
rvalue has joined #ffmpeg
kurosu has joined #ffmpeg
jagannatharjun has quit [Quit: Connection closed for inactivity]
ivanich has joined #ffmpeg
ivanich has quit [Remote host closed the connection]
jagannatharjun has joined #ffmpeg
lavaball has joined #ffmpeg
junaid_ has quit [Ping timeout: 246 seconds]
holgersson has quit [Quit: “Format C:........[Done]“]
holgersson has joined #ffmpeg
averne has joined #ffmpeg
averne has quit [Quit: quit]
averne has joined #ffmpeg
junaid_ has joined #ffmpeg
junaid_ has quit [Remote host closed the connection]
Kei_N_ has quit [Read error: Connection reset by peer]
Kei_N has joined #ffmpeg
MootPoot has joined #ffmpeg
junaid_ has joined #ffmpeg
BillTorvalds has joined #ffmpeg
Vonter has quit [Ping timeout: 268 seconds]
Vonter has joined #ffmpeg
navi has joined #ffmpeg
LionEagle has joined #ffmpeg
kus has joined #ffmpeg
bitbinge has joined #ffmpeg
lusciouslover has joined #ffmpeg
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
lemourin has joined #ffmpeg
lusciouslover has quit [Ping timeout: 245 seconds]
kurosu has quit [Quit: Connection closed for inactivity]
Kei_N_ has joined #ffmpeg
Kei_N has quit [Ping timeout: 256 seconds]
Magissia has quit [Ping timeout: 252 seconds]
kurosu has joined #ffmpeg
Magissia has joined #ffmpeg
junaid_ has quit [Remote host closed the connection]
lemourin8 has joined #ffmpeg
lemourin is now known as Guest1785
lemourin8 is now known as lemourin
BillTorvalds2 has joined #ffmpeg
BillTorvalds has quit [Ping timeout: 245 seconds]
epony has joined #ffmpeg
MootPoot has quit [Quit: Connection closed for inactivity]
MootPoot has joined #ffmpeg
Vonter has quit [Ping timeout: 245 seconds]
Vonter has joined #ffmpeg
jagannatharjun has quit [Quit: Connection closed for inactivity]
BillTorvalds2 has quit [Quit: Leaving]
minimal has joined #ffmpeg
Tano has quit [Quit: WeeChat 4.0.4]
Tano has joined #ffmpeg
Tano has quit [Quit: WeeChat 4.0.4]
Tano has joined #ffmpeg
BillTorvalds has joined #ffmpeg
waleee has joined #ffmpeg
noonien852 has joined #ffmpeg
noonien85 has quit [Ping timeout: 256 seconds]
noonien852 is now known as noonien85
kurosu has quit [Quit: Connection closed for inactivity]
rvalue has quit [Ping timeout: 264 seconds]
rvalue has joined #ffmpeg
bitoff has quit [Remote host closed the connection]
Kruppt has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Tinos has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
lavaball has joined #ffmpeg
Muimi has joined #ffmpeg
MootPoot has quit [Quit: Connection closed for inactivity]
MootPoot has joined #ffmpeg
countach202020 has joined #ffmpeg
countach202020 has quit [Ping timeout: 256 seconds]
countach202020 has joined #ffmpeg
epony has quit [Remote host closed the connection]
countach202020 has quit [Client Quit]
waeking8 has joined #ffmpeg
waeking has quit [Ping timeout: 256 seconds]
waeking8 is now known as waeking
epony has joined #ffmpeg
lavaball has quit [Quit: lavaball]
rv1sr has quit [Ping timeout: 255 seconds]
rv1sr has joined #ffmpeg
Haxxa has quit [Quit: Haxxa flies away.]
Haxxa has joined #ffmpeg
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Muimi has joined #ffmpeg
kasper93 has quit [Ping timeout: 256 seconds]
kasper93 has joined #ffmpeg
AbleBacon has joined #ffmpeg
SimAV has quit [Ping timeout: 240 seconds]
LionEagle has quit [Ping timeout: 252 seconds]
LionEagle has joined #ffmpeg
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
rv1sr has quit []
TheSashmo has quit [Quit: Leaving...]
lusciouslover has joined #ffmpeg
BillTorvalds has quit [Quit: Leaving]
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
LionEagle has quit [Quit: Leaving]
Muimi has joined #ffmpeg
user03 has joined #ffmpeg
user03 is now known as gchound
lusciouslover has quit [Ping timeout: 268 seconds]
lusciouslover has joined #ffmpeg
madwoota has quit [Ping timeout: 244 seconds]
ajshell1 has quit [Ping timeout: 276 seconds]
LionEagle has joined #ffmpeg
SuicideShow has quit [Ping timeout: 256 seconds]
SuicideShow has joined #ffmpeg
hussein1 has joined #ffmpeg
MootPoot has quit [Quit: Connection closed for inactivity]
Gaboradon has quit [Ping timeout: 256 seconds]
Vonter has quit [Ping timeout: 245 seconds]
Vonter has joined #ffmpeg