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

burek burek at teamnet.rs
Thu Dec 12 03:05:01 EET 2019


[00:08:22 CET] <bencc1> https://pastebin.com/raw/9JHyANXC
[00:09:23 CET] <bencc1> kepstin: I think it's because I've tried to capture audio but there was no audio from pulseaudio
[00:09:36 CET] <kepstin> bencc1: your input file is corrupt or truncated, yeah
[00:10:32 CET] <bencc1> kepstin: this is how I capture:
[00:10:35 CET] <bencc1> ffmpeg -f pulse -ac 2 -ar 48000 -i default -f x11grab -framerate 30 -i :0.0 -acodec aac -b:a 96k -vcodec libx264 -pix_fmt yuv420p -preset:v veryfast -crf 23 -vf fps=30 cap.nut
[00:10:52 CET] <bencc1> what can I do if I don't know in advance if I will have audio or not?
[00:12:16 CET] <bencc1> I didn't get an error when using the same commands with mkv but had the framerate wasn't constant
[00:15:15 CET] <kepstin> i'd expect that to be fine, how are you stopping it?
[00:15:35 CET] <kepstin> a single ctrl-c should be fine, and allow ffmpeg to finish and close all the files
[00:16:11 CET] <kepstin> and you have to describe "no audio" better. If ffmpeg tries to read audio from pulse and hangs, then it's not gonna make any progress (won't capture any video either)
[00:16:12 CET] <bencc1> from python: myproc.send_signal(signal.SIGINT)
[00:16:24 CET] <kepstin> if pulse provides silence, that's fine, no issue.
[00:16:34 CET] <bencc1> pulse provides silence
[00:17:21 CET] <bencc1> I don't wait after sending signal.SIGINT and before trying to convert nut to mp4
[00:17:27 CET] <bencc1> that's probably why it fails
[00:17:37 CET] <kepstin> yeah, you have to wait for the process to actually exit
[00:17:48 CET] <bencc1> how much time do I need to wait? how can I tell when it exited?
[00:17:52 CET] <kepstin> have to check my python apis, but it might be as simple as running "myproc.wait"
[00:18:00 CET] <bencc1> ok. checking
[00:18:41 CET] <kepstin> https://docs.python.org/3/library/subprocess.html#subprocess.Popen.wait yep
[00:19:39 CET] <kepstin> note that when using the libx264 encoder it can take a while for ffmpeg to finish shutting down, since it has to drain the threaded encoder (which can have several hundred frames) and finish writing the file.
[00:19:52 CET] <bencc1> I have:
[00:19:53 CET] <kepstin> shouldn't be more than a few seconds usually, tho
[00:20:08 CET] <bencc1> 1. subprocess.Popen(['ffmpeg', ...], stdout=subprocess.PIPE, shell=False)
[00:20:16 CET] <bencc1> 2. time.sleep(something)
[00:20:30 CET] <bencc1> 3. myproc.send_signal(signal.SIGINT)
[00:21:31 CET] <bencc1> not sure yet how to use Popen.wait(). I'll search for example
[00:22:23 CET] <bencc1> maybe just myproc.wait()
[00:23:52 CET] <kepstin> yeah, it's a method on the Pobject instance, same as send_signal
[00:23:57 CET] <kepstin> Popen*
[00:24:28 CET] <kepstin> (as a reminder, every process you start should always be wait()ed for at some point, otherwise it becomes a zombie)
[00:24:46 CET] <kepstin> (with some exceptions for things that you run in the background, daemonized)
[00:26:03 CET] <bencc1> myproc.wait() works
[00:26:18 CET] <bencc1> and thanks for the suggestion to ensure all processes ends
[00:41:19 CET] <bencc1> kepstin: I'm currently using NUT to capture and later convert to mp4
[00:41:40 CET] <bencc1> is there a reason not to use mp4 for capture and not use nut at all?
[00:44:45 CET] <durandal_1707> mp4/mov is awful format for capture
[00:46:23 CET] <bencc1> durandal_1707: so I'll stick with nut
[00:46:26 CET] <bencc1> can you explain why?
[00:47:45 CET] <durandal_1707> not designed for that
[00:48:34 CET] <bencc1> ok
[00:48:36 CET] <bencc1> thanks
[00:58:53 CET] <bencc1> 30fps is ok or is there a more 'standard' fps?
[00:59:13 CET] <bencc1> like 29.97
[00:59:36 CET] <bencc1> users will view mp4 only and maybe upload to youtube
[01:10:25 CET] <DHE> bencc1: whatever the framerate of your source is, try to avoid changing it. usually things are best when you modify as few things as possible
[01:13:59 CET] <bencc1> DHE: I'm capturing xvfb so I'm not sure if there is real source framerate
[19:28:09 CET] <klongwood3> Is it possible to split a stream to ffplay and ffprobe?
[19:34:53 CET] <c_14> not sure what you're trying to do, but tee muxer maybe
[19:52:54 CET] <lezsakdomi> Hi! ffmpeg says "Found duplicated MOOV Atom. Skipped it". How can I make ffmpeg parse it instead of skipping?
[19:53:49 CET] <JEEB> isn't duplicated moov kind of invalid? :P
[19:54:21 CET] <lezsakdomi> Context: I have a shitty scripts which outputs a bunch of very different mp4 files. I'd like to play them using ffplay or pipe through `ffmpeg - -f mp4 -`.
[19:54:45 CET] <JEEB> just use movie fragments?
[19:54:46 CET] <kepstin> "for file in *.mp4 ; do ffplay $file; done"
[19:55:12 CET] <lezsakdomi> JEEB: What do you mean by movie fragments?
[19:55:13 CET] <kepstin> or use mpv to play them, it can play multiple files in one command continuously in a single window :)
[19:55:48 CET] <JEEB> lezsakdomi: -movflags dash+negative_cts_offsets+delay_moov
[19:55:49 CET] <lezsakdomi> kepstin: Thanks, but unfortunately I have the raw mp4 data. I can manipulate it if I need to but I'd like to avoid that.
[19:56:26 CET] <kepstin> you don't have to manipulate anything? just put it in separate files on disk and play them
[19:56:27 CET] <lezsakdomi> hmm thanks I'll take a look both on mpv and those flags :)
[19:56:35 CET] <JEEB> the dash flag gives you fragmentation, empty moov, default base moof
[19:56:42 CET] <JEEB> and the rest are extra
[19:57:00 CET] <JEEB> like delay moov needed for various formats to get a proper moov written with fragmentation
[19:57:17 CET] <JEEB> and negative cts offsets just to get edit lists out
[20:01:38 CET] <klongwood3> c_14 i need stats of a stream. I mentioned this issue yesterday of trying to have a method to keep track of audio fram number, but apprently that was not a recommended approach. I am attempting to look at pts of the frames, but even doesnt seem consistent from the "sender" and "receiver"
[20:06:52 CET] <lezsakdomi> I belive I have the latest ffmpeg (4.2.1), but it says "Option movflags not found." :(
[20:06:57 CET] <lezsakdomi> Is it possible?
[20:07:33 CET] <lezsakdomi> I used the command `ffmpeg -movflags dash+negative_cts_offsets+delay_moov -i -`
[20:07:42 CET] <lezsakdomi> Or do I do it wrong?
[20:07:54 CET] <kepstin> lezsakdomi: it's an output option, not input
[20:08:10 CET] <lezsakdomi> oh hmm
[20:08:12 CET] <lezsakdomi> thanks
[20:09:03 CET] <kepstin> you can't pipe multiple individual mp4 files into ffmpeg without pre-processing them to make them fragmented.
[20:09:27 CET] <kepstin> but if you have multiple invidual mp4 files already, just play them with mpv, don't bother with anything else...
[21:08:37 CET] <Zusor> I'm trying to add add text to a downloaded twitch clip using ffmpeg-python. This is the command it generated which doesn't work. The original video does have audio but it doesn't find it. Here's the command https://pastebin.com/fPwF1Gbx
[22:01:58 CET] <ncouloute> Trying to understand the stream and exact_stream_id concat demuxer directives. I'm trying to specify which streams to use for video and audio. Not sure I have the syntax down. It seems every time I use the word stream it adds another stream so need to only declare it once? I either get a single audio stream or a error message.
[22:14:58 CET] <ncouloute> I got it now... I had the stream id wrong. Doesnt look I know where to get the stream ID exactly. Where it should be ffmpeg has the word (und). Media Info was able to get me the info.. Has to be a way to get it with the ff tools. =/
[22:32:21 CET] <ncouloute> only thing I can think of is that if the stream_id is not defined it just index them with a 1-based index. Although idk if thats true it fits the pattern so far.
[00:00:00 CET] --- Thu Dec 12 2019


More information about the Ffmpeg-devel-irc mailing list