[Ffmpeg-devel-irc] ffmpeg.log.20180512

burek burek021 at gmail.com
Sun May 13 03:05:02 EEST 2018


[00:57:03 CEST] <wfbarksdale> random question, do hardware encoders ever have support for doing a YUV -> RGB conversion as part of the decoding process?
[00:57:19 CEST] <wfbarksdale> erm, decoders i meant
[00:57:55 CEST] <JEEB> yes, that's why f.ex. mpv's manual has tons of warnings about that
[00:58:14 CEST] <JEEB> they might or might not get it correct, and their historical quality in chroma upscaling before the conversion could be either OK or less OK
[00:58:30 CEST] <JEEB> which is why generally it is preferred if a hwdec interface gives you the original YCbCr
[00:58:46 CEST] <JEEB> that also enables you to verify that the decoder correctly decodes things against reference files etc
[00:58:50 CEST] <c_14> Isn't that the point of hardware decoders? that they return frames in gpu memory for "immediate" display?
[00:59:00 CEST] <JEEB> they can be in GPU memory
[00:59:02 CEST] <c_14> or is the download/upload not performance relevant?
[00:59:06 CEST] <JEEB> but they don't have to be RGB
[00:59:33 CEST] <JEEB> dxva2/d3d11va/vaapi all have interoperability with direct3d or opengl
[01:00:20 CEST] <wfbarksdale> i see, also it from googling it looks like the encoders sometimes will handle the reverse RGB -> YUV for you also
[01:00:29 CEST] <JEEB> yes
[01:00:30 CEST] <wfbarksdale> could be something worth trying out for my app
[01:00:52 CEST] <JEEB> by now most most likely use BT.709? or maybe not?
[01:00:56 CEST] <JEEB> fun game of guessing
[01:01:32 CEST] <wfbarksdale> seems like there is always a lot of probing that you have to do to get hardware support working
[01:01:43 CEST] <wfbarksdale> bleh
[01:03:01 CEST] <JEEB> hw decoding has surely gotten better at least on desktop APIs than it was before. but it's still a mess on a larger scale with APIs that let you get interoperability but then force you into RGB etc
[01:03:35 CEST] <JEEB> I just wish everything standardized on VAAPI on linux. Windows is nice because MS just mandates DXVA2 and D3D11VA interfaces :P
[01:17:26 CEST] <wfbarksdale> One more question: I have a processing pipeline pulling both video and audio streams from mp4 files. It is preferable to have the packets be read out in order of their pts, irrespective of which stream the packets are in. I have started work on Demuxer component which i imagined would read packets consecutively, buffering packets as needed when interleaved packets are read. But I was wondering is there a canonical way to achieve
[01:17:26 CEST] <wfbarksdale> this with avformat? essentially having two separate file pointers advancing within the different streams?
[01:18:09 CEST] <JEEB> not sure of lavf's exact logic but it should give you packets in a usable order
[01:18:11 CEST] <wfbarksdale> (c++ API)
[01:18:18 CEST] <JEEB> it's C, actually
[01:18:21 CEST] <JEEB> but usable from C++ as well
[01:18:28 CEST] <wfbarksdale> meant C :)
[01:18:35 CEST] <wfbarksdale> using it from C++
[01:19:11 CEST] <JEEB> but yea, it has just one file pointer but it should be giving you the things A->B in a relatively sane order
[01:19:23 CEST] <JEEB> anyways, sleep :P
[01:19:43 CEST] <wfbarksdale> what I have seen is that I can read frames, but they are interleaved. So a client of the demuxer says, "I want the next Audio Packet", so the demuxer will read a packet, and if it a video packet, it will have to keep reading, buffering the video packets, until it gets to an audio packet
[01:20:15 CEST] <wfbarksdale> demxuer = my c++ demuxer component, not avformat
[01:20:55 CEST] <wfbarksdale> i need to buffer the video packets, because the video stream is also being consumed
[01:21:13 CEST] <wfbarksdale> just wondered if this use case was accomadated int avformat and I could avoid having to write the logic myself
[01:36:51 CEST] <klaxa> hmm, so i've found out that i need a bitstreamfilter for mp4 -> mkv with aac, when i compile remuxing.c from doc/examples it does that automatically
[01:37:13 CEST] <klaxa> is it because my output is not seekable? :S
[01:40:45 CEST] <klaxa> hmm even when writing to pipe it works properly
[01:40:57 CEST] <c_14> maybe check that AVFMT_FLAG_AUTO_BSF is set?
[01:42:48 CEST] <c_14> the mkv muxer has the automatic bitstream filter checking function since b287d7 (2015) so it should work
[01:43:39 CEST] <klaxa> yeah i looked at those commits
[01:43:49 CEST] <klaxa> (thanks for all these pointers again btw)
[01:46:08 CEST] <ariyasu_> can someone help me dumping frames from hevc video
[01:46:41 CEST] <ariyasu_> i use this command "ffmpeg.exe -ss 50 -i test.ts -r 1 out.bmp" to dump 1 frame 50 seconds into a video
[01:47:02 CEST] <ariyasu_> it works great for everything except hevc where the frame is messed up
[01:47:16 CEST] <ariyasu_> console output = https://pastebin.com/gE8w3hpg
[01:47:26 CEST] <ariyasu_> example of a dumped frame = https://i.imgur.com/UcHwy0I.jpg
[02:24:31 CEST] <ariyasu_> no one got any ideas?
[02:25:27 CEST] <klaxa> can you play the file even?
[02:26:25 CEST] <ariyasu_> yeah it plays fine
[02:26:43 CEST] <ariyasu_> using mpc or vlc to dump a frame also works fine
[02:26:55 CEST] <c_14> you probably want -frames:v 1 instead of -r 1
[02:27:02 CEST] <c_14> it looks like your keyframe is corrupt though
[02:27:40 CEST] <c_14> maybe trie -ss 50 as an output option instead of an input option?
[02:27:42 CEST] <c_14> *try
[02:28:13 CEST] <ariyasu_> doing "-frames:v 1" produces the same result
[02:28:39 CEST] <c_14> yeah, it should just get rid of the other error/warning
[02:28:44 CEST] <c_14> but switching the seek type might fix it
[02:30:25 CEST] <ariyasu_> moving -ss 50 to output, stalls ffmpeg
[02:30:36 CEST] <c_14> yeah, it'll take a while
[02:30:38 CEST] <c_14> but it should get there
[02:30:45 CEST] <c_14> it's seeking after decoding instead of before now
[02:30:59 CEST] <ariyasu_> frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x
[02:31:11 CEST] <ariyasu_> shows this constantly and i have to kill it with ctrl + c
[02:31:20 CEST] <c_14> just wait for it
[02:31:23 CEST] <ariyasu_> ok i will leave it going
[02:31:36 CEST] <c_14> might take ~50 seconds or more depending on how fast your cpu can decode hevc
[02:32:33 CEST] <ariyasu_> https://i.imgur.com/wqFhYCL.jpg
[02:32:38 CEST] Action: ariyasu_ buys c_14 a beer
[02:32:54 CEST] <ariyasu_> tyvm, i will move the value to 5 now instead of 50
[02:33:15 CEST] <ariyasu_> i like to dump 1 frame before encoding that i can examing to work out if i need to crop or not
[02:33:36 CEST] <c_14> np, ffmpeg probably just messed up getting the last keyframe somehow
[07:33:18 CEST] <jaggz> how would I flip a video horizontally then add it back to itself to make it horizontally seamless?
[07:35:47 CEST] <jaggz> oh.. cool.. I just did it in blender by flipping a uv mapping
[17:22:43 CEST] <ronald> hello
[17:22:56 CEST] <ronald> do you guys do support here, i dont know how to use ffmpeg right
[17:23:14 CEST] <JEEB> just ask and maybe someone replies
[17:23:57 CEST] <ronald> i have a folder full of videos and i want ffmpeg to only convert the .webm ones into .mp4, i tried writing the code but it doesnt work
[17:24:00 CEST] <ronald> for file in ("*videos/*.webm") do ffmpeg -i -threads 1.5 -crf 50 "%%a" -i "outputs\%%a.mp4"
[17:24:06 CEST] <ronald> anyone know where the error is
[17:24:13 CEST] <sfan5> you're missing a ;
[17:24:27 CEST] <ronald> where
[17:24:31 CEST] <JEEB> I recommend you look at the bash looping tutorial :)
[17:24:37 CEST] <sfan5> well that doesn't look like bash...
[17:24:43 CEST] <JEEB> http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html
[17:24:47 CEST] <JEEB> ah
[17:24:48 CEST] <ronald> sfan5, where
[17:24:49 CEST] <JEEB> then batch
[17:25:32 CEST] <JEEB> https://ss64.com/nt/for.html
[17:25:36 CEST] <sfan5> ronald: which os are you running?
[17:25:36 CEST] <ronald> where is the ; missing
[17:25:40 CEST] <JEEB> seems to be an OK documentation on the for looping
[17:25:42 CEST] <ronald> w7 64
[17:25:46 CEST] <JEEB> sfan5: that's most likely windows so batch
[17:25:59 CEST] <sfan5> then ignore my colon about semicolons
[17:26:05 CEST] <sfan5> s/colon/comment/
[17:26:25 CEST] <JEEB> ronald: take a look at the examples in the page I linked
[17:26:32 CEST] <JEEB> this is a general batch thing
[17:27:08 CEST] <ronald> am i supposed to do it in multiple lines or only one
[17:27:35 CEST] <JEEB> I think you can do multiple as well, but this is a general batch scripting question rather than an FFmpeg question
[17:27:41 CEST] <JEEB> start by echoing the values in a loop first
[17:27:50 CEST] <JEEB> then when that looks like working
[17:27:55 CEST] <ronald> man i only know some python
[17:27:56 CEST] <JEEB> then you stop echoing and start using FFmpeg
[17:27:59 CEST] <ronald> no idea what batch even is
[17:28:03 CEST] <JEEB> then use python?
[17:28:07 CEST] <JEEB> you can install python3 on windows
[17:28:21 CEST] <JEEB> batch is a very crappy scripting language from ages before
[17:28:38 CEST] <ronald> i can just write a python script in the bat?
[17:28:56 CEST] <JEEB> no, just write a python script that listdir()s and executes
[17:29:17 CEST] <JEEB> and then run the script instead of the batch
[17:31:04 CEST] <JEEB> but you can use either, just that if you are more used to python - use python
[17:31:23 CEST] <JEEB> also means you can use the same thing outside of windows, if you should ever want to
[18:53:04 CEST] <djk> anyone know a change with facebook live that would cause "RTMP_ReadPacket, failed to read RTMP packet header"
[19:16:55 CEST] <djk> I had a stream working with ffmpeg but now it is erroring
[20:33:13 CEST] <alone-x> hello, anyone know, why i can't use
[20:33:20 CEST] <alone-x> -to 100:00:00
[20:33:22 CEST] <alone-x> ?
[20:33:37 CEST] <alone-x> -to 99:00:00 - working.
[20:33:47 CEST] <alone-x> my file more then 105:00:00
[20:33:52 CEST] <alone-x> ...
[20:34:05 CEST] <BtbN> because the format only has two digits there
[20:34:13 CEST] <alone-x> yes yes
[20:34:22 CEST] <alone-x> i am guessing so
[20:34:26 CEST] <alone-x> but, what i need to do?
[20:34:44 CEST] <BtbN> I guess convert to seconds
[20:35:15 CEST] <alone-x> thank yo
[20:35:18 CEST] <alone-x> thank you
[20:49:54 CEST] <Mindless`> Trac won't let me sign up -- https://i.imgur.com/lkzCgGd.png
[20:50:41 CEST] <BtbN> recaptcha broke, not much to be done on your end.
[20:53:03 CEST] <Mindless`> BtbN: could you submit a bug report for me?  it's very simple
[20:53:29 CEST] <BtbN> pretty sure there is one?
[20:54:30 CEST] <Mindless`> no, I mean, I was signing up to submit a bug report, but it won't let me, so could you submit one for me?
[21:00:04 CEST] <BtbN> not right now, but I'm sure someone can
[21:02:18 CEST] <sfan5> you can put yuvj420p into H.264, right?
[21:15:07 CEST] <furq> sfan5: you can but you're supposed to use yuv420p and -color_range jpeg nowadays
[21:15:31 CEST] <sfan5> i meant format-wise, so that's a yes
[21:15:57 CEST] <BtbN> there is no difference format wise
[21:16:05 CEST] <BtbN> it's just how the colors are interpreted
[21:16:23 CEST] <BtbN> putting it in there might not be the best idea though, as there is a good chance the decoding site will misinterpret them
[21:16:24 CEST] <sfan5> maybe the spec mandates limited color range, who knows..
[21:16:59 CEST] <JEEB> AVC and HEVC just have flags
[21:55:48 CEST] <The-Present> Hi, ffmpeg removed -timeout option?
[21:56:12 CEST] <The-Present> for me it shows unrecognized option. I am trying to stream to rtmp server
[21:56:13 CEST] <JEEB> I think some options moved to rw_timeout, although I don't think the old ones got removed yet?
[21:56:22 CEST] <JEEB> it's a protocol-specific option though
[21:56:25 CEST] <JEEB> I wonder if RTMP ever had it
[21:56:58 CEST] <JEEB> wow
[21:57:01 CEST] <The-Present> ok interesting about protocol-specific. I thought they are global options
[21:57:09 CEST] <JEEB> yea, you wish :P
[21:57:17 CEST] <JEEB> that's why we had different types of numbers for timeouts
[21:57:22 CEST] <The-Present> any way to set some sort of timeout option for rtmp
[21:57:23 CEST] <JEEB> some took in microseconds, others seconds
[21:57:24 CEST] <JEEB> etc
[21:57:47 CEST] <JEEB> there's actually still an option for rtmp protocol called "timeout", but it is actually a "listen timeout"
[21:57:48 CEST] <The-Present> yep JEEB  I agree with that :) ffmpeg is now very huge
[21:58:02 CEST] <JEEB> `"timeout", "Maximum timeout (in seconds) to wait for incoming connections. -1 is infinite. Implies -rtmp_listen 1"`
[21:58:16 CEST] <JEEB> but that's for listening for RTMP connections
[21:58:18 CEST] <JEEB> not for sending
[21:58:30 CEST] <The-Present> oh what a pitty :{
[21:59:06 CEST] <The-Present> so not for sending
[21:59:07 CEST] <furq> The-Present: -rw_timeout should work apparently
[21:59:18 CEST] <furq> https://ffmpeg.org/ffmpeg-protocols.html#Protocols
[21:59:24 CEST] <furq> at least the docs claim it works for all protocols
[21:59:25 CEST] <The-Present> furq, that can be used during sending
[21:59:29 CEST] <JEEB> right, that might be on a different level in lavf
[22:00:38 CEST] <JEEB> yes, libavformat/avio.c has rw_timeout
[22:00:39 CEST] <JEEB> {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM }
[22:00:47 CEST] <JEEB> which is both for input and output
[22:01:41 CEST] <The-Present> ok that didn't work
[22:01:57 CEST] <The-Present> or ok sorry my bad
[22:04:39 CEST] <The-Present> ok i will try that. Thanks for the heads up JEEB and furq . very much appreciated :)
[22:21:02 CEST] <flat20> I'm trying to pipe in PCM, which only produces audio output every now and then, to create a wav file in realtime, but I can't get it to work. ffmpeg always condenses the silent gaps in the final .wav file.
[22:21:07 CEST] <flat20> I've tried: ffmpeg -re -y -f s16le -ar 48000 -ac 2 -i pipe:0 out.wav
[22:21:28 CEST] <flat20> I've also tried using anullsrc for silence like this: ffmpeg -re -y -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -f s16le -ar 48000 -ac 2 -i pipe:0 out.wav
[22:22:31 CEST] <flat20> Even tried looping a silent .wav file, but it seems that if I no data is coming in from the pipe, ffmpeg just pauses until more data comes.
[22:23:32 CEST] <djk> is there a way to specific a window instead of screen area for ffmpeg to stream. OBS lets you select a window name which good for avoiding private thing showing up on the stream
[00:00:00 CEST] --- Sun May 13 2018


More information about the Ffmpeg-devel-irc mailing list