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

burek burek at teamnet.rs
Thu Dec 26 03:05:02 EET 2019


[00:00:04 CET] <kepstin> no, 6 bits per second isn't high enough to do anything resembling video :)
[00:00:24 CET] <kepstin> (maybe you mean -b:v 6M for 6 megabits/s?)
[00:00:28 CET] <a8_> oh
[00:00:29 CET] <a8_> ues
[00:00:31 CET] <a8_> sorry
[00:01:08 CET] <a8_> how to convert an entire folder and have the output be in another folder
[00:01:44 CET] <kepstin> for best results (closest to the desired target bitrate, and consistent quality over the length of the video), you should run that command twice - first with "-pass 1" and again with "-pass 2"
[00:01:55 CET] <kepstin> if you have audio, you probably want to add "-c:a copy" as well
[00:02:13 CET] <kepstin> to convert an entire folder, write a shell or batch script loop
[00:03:10 CET] <a8_> thanks! i was googleing about passes and it keeps the first pass too?  how would i tell it to not keep the first pass
[00:03:51 CET] <kepstin> when you run the second pass, you normally overwrite the output file from the first pass
[00:04:04 CET] <a8_> ok, thanks
[00:05:03 CET] <kepstin> (ffmpeg writes an extra log file that stores the information from the first pass for the second pass to read, you might want to delete it when you're done)
[00:05:30 CET] <a8_> ok, whats the name of the log file going to be?
[00:06:15 CET] <kepstin> "ffmpeg2pass-N.log" where N is the stream number within the file that the log is for
[00:06:33 CET] <kepstin> you can override the prefix with the -passlogfile option, look for it in the docs
[00:06:49 CET] <a8_> thanks
[00:07:03 CET] <kepstin> (don't run two ffmpegs at the same time using the default log filename, they'll write to the same file and mess everything up)
[00:07:19 CET] <kepstin> at the same time in the same directory*
[00:13:31 CET] <a8_> ffmpeg -i /h264/h264Input.mp4 -c:v libx265  -b:v 6M -c:a copy -output /h265/h265output.mp4 -pass 1
[00:13:43 CET] <a8_> can  i tell ffmpeg to output to folders like that?
[00:13:53 CET] <k4m3nk0> is there a way to convert videos to 1080p or 720p to be h265 .mkv  i'm looking for good ffmpeg command that wont take a long time on my specifications https://i.imgur.com/MokBs0V.png
[00:14:01 CET] <a8_> and replace /h264/ with the full path*
[00:14:20 CET] <a8_> h265 is mp4 i think @k4m3nk0
[00:21:55 CET] <kepstin> a8_: output options go before the output filename, and there is no option named "-output"
[00:22:49 CET] <k4m3nk0> also can i do -pass 2
[00:22:52 CET] <k4m3nk0> ??
[00:22:57 CET] <kepstin> k4m3nk0: there is no way to encode h265 quickly on your computer
[00:23:00 CET] <k4m3nk0> for two pass encoding
[00:23:21 CET] <a8_> k4m3nk0 you need to run command with -pass 1 first
[00:23:37 CET] <Hello71> >h265 is mp4
[00:23:40 CET] <Hello71> yeesh
[00:23:44 CET] <a8_> is it not?
[00:23:50 CET] <a8_> can it not be*
[00:23:53 CET] <kepstin> mp4 is one container that you can put h265 video into
[00:24:00 CET] <kepstin> but that's not the only codec you can put into mp4 files
[00:24:38 CET] <a8_> ffmpeg -i h264Input.mp4 -c:v libx265  -b:v 6M -c:a copy  h265output.mp4 -pass 1 -threads 2 -preset veryslow
[00:24:43 CET] <a8_> does that work? i think i fixed it
[00:24:46 CET] <k4m3nk0> why ni -pass 2
[00:24:53 CET] <kepstin> a8_: output options go before the output filename
[00:25:04 CET] <kepstin> a8_: move the output filename to the end after all the other options
[00:25:14 CET] <a8_> ffmpeg -i h264Input.mp4 -c:v libx265  -b:v 6M -c:a copy  -pass 1 -threads 2 -preset veryslow h265output.mp4
[00:25:21 CET] <a8_> like this?
[00:25:34 CET] <kepstin> a8_: should work now.
[00:25:37 CET] <a8_> thanks
[00:27:09 CET] <a8_> i get this
[00:27:10 CET] <a8_> [NULL @ 0x7ffc3802bc00] Unable to find a suitable output format for '6M'
[00:27:10 CET] <a8_> 6M: Invalid argument
[00:28:08 CET] <kepstin> k4m3nk0: actually, hmm, the celeron N3350 might have the intel quicksync h265 encoder.
[00:28:40 CET] <kepstin> k4m3nk0: run "vainfo" and see if there's a line that says "VAProfileHEVCMain               :	VAEntrypointEncSlice"
[00:30:04 CET] <kepstin> k4m3nk0: note that the results using the hardware encoder won't be particularly great, depending on what your input files are it might be better to leave them as-is rather than re-encode.
[00:30:16 CET] <kepstin> k4m3nk0: why do you want them in hevc anyways?
[00:31:04 CET] <a8_> can i just do -pass 2 instead of -pass 1 and then do -pass 2
[00:31:37 CET] <kepstin> a8_: no
[00:31:47 CET] <kepstin> a8_: pass 2 works by reading the log file generated by pass 1
[00:31:52 CET] <a8_> ok
[00:31:56 CET] <k4m3nk0> i just did -pass 2 at the end
[00:31:58 CET] <k4m3nk0> and it works
[00:32:38 CET] <a8_> probs didnt work right
[00:32:55 CET] <kepstin> if you do -pass 2 at the end (after the output filename) it's ignored and does nothing.
[00:33:23 CET] <kepstin> (it will print a helpful warning "Trailing options were found on the commandline." if you do that)
[00:33:59 CET] <a8_> ok thanks
[00:34:03 CET] <a8_> im a noob with ffmpeg sorry
[00:34:05 CET] <a8_> but i get this
[00:34:09 CET] <a8_> [NULL @ 0x7ffc3802bc00] Unable to find a suitable output format for '6M'
[00:34:09 CET] <a8_> 6M: Invalid argument
[00:34:27 CET] <a8_> i think i did something wrong with -b:v 6M
[00:35:03 CET] <kepstin> you have a typo somewhere in your command line, yes
[00:35:45 CET] <kepstin> that usually means that you have an option before the -b:v which is missing its value, so it eats the -b:v as a value
[00:35:58 CET] <kepstin> then the 6M on its own is treated as an output filename
[00:36:11 CET] <a8_> all i have before -b:v is
[00:36:13 CET] <a8_> ffmpeg -i h264Input.mp4 -c:v libx265  
[00:36:37 CET] <kepstin> that can't be true, because if it was it would work :)
[00:36:40 CET] <kepstin> are you missing a space?
[00:36:41 CET] <a8_> my entire command is
[00:36:42 CET] <a8_> ffmpeg -i h264Input.mp4 -c:v libx265  -b:v 6M -c:a copy  -pass 1 -threads 2 -preset veryslow h265output.mp4
[00:37:25 CET] <kepstin> the command as you pasted it is correct.
[00:37:38 CET] <kepstin> try re-copying it from icr back to your terminal? :)
[00:37:41 CET] <kepstin> from irc*
[00:40:14 CET] <a8_> it calls my output an invalid argument
[00:40:26 CET] <a8_> not -output
[00:40:33 CET] <a8_> ok
[00:41:10 CET] <kepstin> i just copy/pasted your command into a terminal and ran it (after making a file named h264Input.mp4) and it worked perfectly.
[00:41:36 CET] <a8_> https://pastebin.com/eiVGxL7U
[00:41:39 CET] <kepstin> so if you have a problem, it's in the stuff that you're not sharing with us
[00:41:47 CET] <a8_> here is my entire thing
[00:42:08 CET] <kepstin> your output filename is missing the .mp4 extension
[00:42:20 CET] <a8_> oh
[00:42:22 CET] <a8_> thanks
[00:42:36 CET] <a8_> heyyy its working
[00:42:39 CET] <a8_> thanks so mutch
[00:43:55 CET] <a8_> im gonna change it to 4 threds as i have 4 core cpu
[00:45:11 CET] <kepstin> libx265 defaults to using all cpu cores if you don't pass the "-threads" option.
[00:45:25 CET] <a8_> i will put it there just to be safe
[00:46:27 CET] <kepstin> (actually, hmm, it doesn't actually manage to use all the cores/threads on my 16 thread ryzen box, but that's probably because my test video isn't high enough resolution)
[00:46:53 CET] <a8_> is there a way to make ffmpeg print a ETA of when it will be done? btw thanks for all the help so far
[00:47:45 CET] <kepstin> no, ffmpeg doesn't do etas (a mostly technical limitation, since filters and things can change the length of the video in ways that can't be determined in advance)
[00:48:09 CET] <kepstin> if you're doing a simple transcode you can figure it out yourself using the speed value if you know the length of the original file
[00:48:54 CET] <kepstin> hint: encoding h265 is very slow, so the eta will be far in the future :)
[00:57:40 CET] <a8_> it is 0.7% speed
[00:57:52 CET] <a8_> video is10min
[00:57:58 CET] <a8_> so 70min encode?
[01:09:37 CET] <Hello71> I don't think that's how math works
[01:15:53 CET] <a8_> 0.7 * 10 = 70
[01:16:01 CET] <a8_> oh
[01:16:08 CET] <a8_> so its 7 min encode?
[01:16:28 CET] <a8_> but i spent 22min on the encode
[01:18:00 CET] <a8_> and its still goin
[01:21:55 CET] <k4m3nk0> hi
[01:22:12 CET] <k4m3nk0> i made a script for converting all movies from folder using ffmpeg
[01:22:17 CET] <k4m3nk0> what you guys think
[01:22:23 CET] <k4m3nk0> #!/bin/bash           for name in *.mkv; do  ffmpeg -i "$name" -c:v libx265  -b:v 6M -c:a copy "${name%.*}.mp4" -pass 1 -threads 2 -preset veryslow ; ffmpeg -i "$name" -c:v libx265  -b:v 6M -c:a copy "${name%.*}.mp4" -pass 2 -threads 2 -preset veryslow ; done
[02:27:25 CET] <Hello71> > 0.7 * 10 = 70
[02:27:33 CET] <Hello71> we need that in the topic or something
[12:14:30 CET] <celebrate> Hey everyone
[12:14:49 CET] <celebrate> If anyone can help me translate this to fluent ffmpeg syntax i'd be forever greatful!
[12:14:50 CET] <celebrate> let command = ffmpeg()        .input(tempFilePath)        .size('640x?')        .input(watermarkFilePath)        .complexFilter([            "[0:v][1:v]overlay=W-w-20:H-h-20"        ])        .videoBitrate(2000)        .videoCodec('libx264')        .format('mp4')        .output(targetTempFilePath)
[12:15:26 CET] <celebrate> When trying to run it this way getting an error
[12:15:27 CET] <celebrate> ffmpeg exited with code 1: Filtergraph 'scale=w=640:h=trunc(ow/a/2)*2' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.-vf/-af/-filter and -filter_complex cannot be used together for the same stream
[12:16:09 CET] <JEEB> you do understand that any JS wrapper over the cli (or API) has nothing to do with FFmpeg itself?
[12:16:33 CET] <JEEB> anyways, that error just says that something in your thing is adding -vf or -af into the command line, and then you have a complex filter chain :P
[12:16:59 CET] <JEEB> which cannot be utilized together since vf is a simplified version of the complex filter chain, pretty much
[12:24:53 CET] <celebrate> yeah i get that
[12:25:15 CET] <celebrate> but what do you mean has nothing to do with the ffmpeg itself?
[12:25:35 CET] <celebrate> you're saying if i do the exact same "process" through the command string it won't work either?
[12:28:56 CET] <JEEB> celebrate: simple: the Javascript thingy you're seemingly using has *nothing* to do with FFmpeg itself
[12:29:05 CET] <JEEB> so nobody here can help you with that syntax
[12:29:37 CET] <JEEB> but yes if you just take the result of whatever wrapper that is outputting as arguments you will end up in the same thing :P since what that wrapper now has let you do is invalid
[12:30:00 CET] <JEEB> probably the scale part ends up as -vf (because in 99% of cases that's an easy way to scale all outputs to that size)
[12:30:29 CET] <JEEB> yet then you have the complex filter chain, and at that point the ffmpeg.c command line app goes "nope, that's not how you do it"
[12:31:21 CET] <JEEB> in other words, whatever you're trying to do within a vf/af should end up in the complex filter chain if you're doing a complex filter chain
[12:36:44 CET] <celebrate> ah i see
[12:38:26 CET] <celebrate> thanks jeeb :)
[12:51:21 CET] <celebrate> This is getting me an error
[12:51:22 CET] <celebrate> .complexFilter([            "[0:v]scale=320:-1[1:v]overlay=W-w-20:H-h-20"        ])
[12:51:35 CET] <celebrate> Invalid argument
[12:51:36 CET] <celebrate> ?
[12:53:19 CET] <JEEB> you should look up some examples of complex filter chains :P https://trac.ffmpeg.org/wiki/FilteringGuide f.ex.
[14:24:55 CET] <HickHoward> so
[14:25:12 CET] <HickHoward> i got into a emulation thread on 4chan's /vg/ board by accident
[14:26:42 CET] <HickHoward> fuck
[14:26:43 CET] <HickHoward> wrong thread
[19:50:42 CET] <bencc1> I'm capturing screen and pulseaudio with ffmpeg
[19:51:21 CET] <bencc1> mediainfo tells me that video has 30 constant fps and audio has 36.875 FPS
[19:51:22 CET] <bencc1> https://pastebin.com/raw/njgT1pRd
[19:51:31 CET] <bencc1> what does audio FPS means?
[19:51:54 CET] <JEEB> whatever mediainfo means with that :D
[19:52:01 CET] <bencc1> can it cause audio/video sync issues when editing in Adobe Premiere?
[19:52:21 CET] <bencc1> so how can I check with ffprobe?
[19:52:46 CET] <bencc1> I don't have Adobe Premiere and I don't know how to use it but a video editor told me that there is a audio/video sync issue
[19:52:59 CET] <bencc1> although I'm using constant framerate
[19:53: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
[19:53:48 CET] <bencc1> am I missing something for constant framerate or audio/video sync?
[19:54:06 CET] <JEEB> also that frame rate looking at that seems like it's just audio frames (decoder units) per second :P it says 1024 SPF there which means that the packets are 1024 samples
[19:55:14 CET] <JEEB> bencc1: it can be a whole lot of stuff. at the end of the day my intermediates are generally some lossless format in AVI (Ut Video generally). it gets big, but you can mitigate it a bit in transfer.
[19:55:37 CET] <JEEB> bencc1: like it could just dislike edit lists which are used to handle b-frames or encoder delay
[19:56:04 CET] <JEEB> and that's not "edit lists are evil" but rather "ugh why do these people let these borked implementations out here"
[19:56:18 CET] <JEEB> it could of course be something like "it doesn't like b-frames pronto"
[19:57:06 CET] <bencc1> most of my users don't need to edit so I don't serve raw
[19:57:24 CET] <JEEB> yea, I wonder people conflate lossless with raw :P
[19:57:38 CET] <JEEB> last time I asked for a lossless copy for a thing I got rar'd raw RGB in mov
[19:57:44 CET] <bencc1> sorry, lossless
[19:58:25 CET] <JEEB> anyways, the main thing would be able to iterate on it :P
[19:58:30 CET] <JEEB> and you can't unless you have the editor at hand
[19:58:42 CET] <JEEB> otherwise you can at most start guesstimating and have no idea if it helps or not
[19:58:56 CET] <bencc1> I'll try installing a trial and make simple edits
[19:59:16 CET] <bencc1> sure but there are probably common parameters to check
[19:59:28 CET] <JEEB> you wish
[19:59:42 CET] <bencc1> when I view the mp4 in vlc the a/v sync is fine
[19:59:46 CET] <JEEB> nobody in that side seems to actually want to know the "common requirements" of this crap
[19:59:53 CET] <JEEB> instead the whack at buttons and see if something works
[19:59:58 CET] <JEEB> which I understand, but it's unfortunate
[19:59:59 CET] <JEEB> :P
[20:00:20 CET] <JEEB> and it probably even depends on the version of the editor in the worst case
[20:00:34 CET] <JEEB> which corporation's licensed demux/decoding stuff it uses etc
[20:04:53 CET] <bencc1> ffmpeg -i input.mp4 -vf vfrdet -f null -
[20:05:02 CET] <bencc1> VFR:0.000000 (0/257532)
[20:05:25 CET] <bencc1> that means that I have perfect constant framerate?
[20:05:40 CET] <JEEB> you can check that with any MP4 thing, like L-SMASH's boxdumper with its timestamp dumping option
[20:05:45 CET] <JEEB> or ffprobe's show_packets
[20:05:57 CET] <JEEB> but I will guesstimate that your timestamps are OK :P
[20:05:58 CET] <bencc1> check what? how?
[20:06:23 CET] <bencc1> check each packet with "ffprobe show_packets"?
[20:06:28 CET] <bencc1> manually? :)
[20:06:41 CET] <JEEB> last time I checked it was with -of json and a short python script
[20:06:53 CET] <JEEB> which looked at the timestamps and checked how they raised
[20:07:19 CET] <bencc1> I'll search
[20:07:34 CET] <bencc1> but the problem is probably somewhere else
[20:07:42 CET] <JEEB> I would guesstimate that your timestamps are OK
[20:07:58 CET] <JEEB> unless there indeed are some random differences
[20:08:13 CET] <JEEB> like a large diff between initial timestamps or something
[20:11:38 CET] <bencc1> if I have random differences it will make the video editor angry
[20:11:50 CET] <JEEB> sure
[20:12:22 CET] <JEEB> but at most I think you would have different start times of the time line, and possibly inability the piece of shit of handling edit lists
[20:12:49 CET] <JEEB> but yea, better check if you have the editor available what sort of desync it is first of all
[20:12:58 CET] <JEEB> might give hints on wtf it's not handling
[20:13:28 CET] <bencc1> all answers I can find are just about how to get the fps metadata
[20:13:44 CET] <bencc1> I thought that this "ffmpeg -i input.mp4 -vf vfrdet -f null -" is a good way to verify
[20:13:58 CET] <bencc1> it actually check all frames
[20:14:50 CET] <JEEB> vfrdet I think it was to detect VFR content in a CFR stream or so
[20:15:15 CET] <JEEB> you want the actual timestamps in the container, which is either L-SMASH's boxdumper, or ffprobe's -show_packets -of json
[20:15:55 CET] <bencc1> ok
[20:16:03 CET] <bencc1> maybe I need asyncts during capture
[20:16:31 CET] <JEEB> you're thinking too much
[20:16:42 CET] <JEEB> stop, and wait until you have the means to repro
[20:17:02 CET] <bencc1> I still not sure how to repro
[20:17:14 CET] <JEEB> having the editor and seeing how it ends up desync?
[20:17:39 CET] <JEEB> then just validate that the timestamps in the mp4 are OK, and after that pretty much *any* source with similar output parameters should be possible to get to desync
[20:18:19 CET] <JEEB> but I see no reason to help you further until you can easily pass things through some test which gives you green or red light on the A/V sync
[20:18:37 CET] <JEEB> you have been given the tools to check the timestamps, to validate them with two tools at least
[20:18:41 CET] <JEEB> boxdumper and ffprobe
[20:19:22 CET] <bencc1> ffprobe gives me the frame timestamps. I still need to find a script that verify the framerate
[20:19:46 CET] <JEEB> ffprobe -i BLAH.mp4 -of json -show_packets > BLAH.json
[20:20:05 CET] <JEEB> then `from json import load` (I think load is "load file" and loads is "load string")
[20:20:13 CET] <JEEB> then you have a dictionary
[20:21:04 CET] <_Fremen_> hello everyone
[20:21:39 CET] <JEEB> it will have packets for all streams there so you can have like a dictionary or whatever for each stream_index there and just make the script yell when the diff for a specific stream index is not static
[20:21:44 CET] <JEEB> also print out the initial PTS or so
[20:22:24 CET] <_Fremen_> I am sorry if this is on-topic for this channel but I wanted to ask this to a person with experience in mp3 or media files in general.
[20:23:04 CET] <bencc1> JEEB: thanks. I'll try it
[20:23:52 CET] <_Fremen_> I have two different mp3 files of the same music and their properties seems to same on Smplayer information tab, but their sizes is different. What could be the cause of this and is it usually the better choice to keep larger one?
[20:25:06 CET] <_Fremen_> This question can be applied to every media format, same properties and etc. but different sizes.
[20:25:17 CET] <_Fremen_> will be back in 20 minutes
[20:36:24 CET] <_Fremen_> anyway, after better searching, I find mediainfo software and will try it out. Have a nice day
[23:15:46 CET] <mindlight> Hi all. Downloaded nightly for Windows. Trying to deinterlae with "-vf yadif" but the resulting video file runs nicely but after a while (less than a minute) it just freezes the video. The audo continues. I have tried to google but can't find anything about yadif problems like this. I have tried with only "-vf yadif" and it still freezes.
[23:16:36 CET] <mindlight> any known problems or things to think about when doing deinterlace / yadif?
[23:20:24 CET] <JEEB> mindlight: nope
[23:22:05 CET] <mindlight> thanks JEEB.... and of course... 2 hours of googling and 3 minutes after I wrote here I found a clue to what's causing this. Testing parameters now. Most likely I will be looking like an idiot in a short while... :-)
[23:23:41 CET] <mindlight> Yeah... the "-t 00:00:30" parameter was specified before the -i. The resulting file was running perfectly for 30 secs and then with frozen video and ok audio for another 30 secs...Solution: move the "-t" parameter to after the "-i" :-)
[00:00:00 CET] --- Thu Dec 26 2019


More information about the Ffmpeg-devel-irc mailing list