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

burek burek021 at gmail.com
Sun Jul 1 03:05:02 EEST 2018


[02:04:15 CEST] <dscully> temp: see line 1783 of https://github.com/FFmpeg/FFmpeg/blob/master/fftools/ffmpeg.c
[02:35:09 CEST] <fa0> Hello
[02:36:01 CEST] <fa0> I'm using ffmpeg-3.4.2, and I'm taking larger videos and re-encoding them, so they will be smaller, I'm running this in a script;
[02:36:02 CEST] <fa0> urxvt -g 120x32 -e ffmpeg -i "$i" -c:v libx264 -preset veryfast -crf 20 -c:a copy "$OUTPUT/${i%.*}.mkv"
[02:37:13 CEST] <fa0> If I use Handbrake 1.1.0 and set it as VeryFast 720p30 which also and make it the same -preset veryfast -crf 20, I end up with Handbrake producing video sizes around 50MB smaller...
[02:37:47 CEST] <fa0> I'm not sure what I can do, so the video size will be comparable, but ffmpeg producing larger, I don't get what Handbrake setting is giving better compression
[02:47:03 CEST] <fa0> I guess just doing, '-c:v libx264 -preset veryfast -crf 20 -c:a copy' isn't producing best compression, need some other option(s), or this is as good as it gets?
[02:47:40 CEST] <DHE> -crf is a generic one-pass quality selector, with lower numbers being higher quality (obviously at higher file size)
[02:48:07 CEST] <DHE> I don't use handbrake, but for x264 there's two main modes of operation: crf and fixed bitrate. (and variants thereof)
[03:00:53 CEST] <Trel> I don't have a windows machine handy to check on at the moment, but does the windows builds support stdin for input?
[03:01:13 CEST] <Trel> or pipes in general?
[03:03:28 CEST] <iive> fa0, is the resolution of both files the same? same fps ? also both are using libx264 so check what versions are using and what options are the providing to it
[03:03:54 CEST] <iive> also, deinterlace?
[03:10:52 CEST] <fa0> same rez,fps, x264
[03:12:41 CEST] <fa0> Handbrakes has these filters set; 'Interlace Detection' - Fast  'Deinterlace: Decomb'
[03:12:43 CEST] <fa0> hmm
[03:19:11 CEST] <fa0> Well there's only so much time in the day, LOL, maybe I better stick to handbrake for the more complex, and stick to myffmpeg for simple jobs...
[03:19:12 CEST] <fa0> hmm
[03:21:33 CEST] <fa0> DHE: thanks
[03:22:20 CEST] <fa0> I was watching Mr Robot last night, and they were using ffmpeg LOL
[03:22:51 CEST] <fa0> ffmpeg was on TV! :P
[12:49:20 CEST] <wpwpwpwp> hi
[12:49:35 CEST] <wpwpwpwp> I got a bunch of WAV files and I want to combine/merge + convert them all into a single MP3 file.
[12:49:56 CEST] <wpwpwpwp> Ideally by just selecting them in Windows Explorer, in context menu hitting "combine to mp3"
[12:50:09 CEST] <wpwpwpwp> this would be cool - are there any tools like this / frontends / GUIs for ffmpeg? or lame?
[12:58:49 CEST] <DHE> while you can do it in a single ffmpeg command, it requires a small amount of scripting. either the concat demuxer (which should make a temp file on disk listing all .wav files) or the concat filter can assemble it all together
[12:59:00 CEST] <DHE> see also the ffmpeg wiki page on concatenation
[13:01:31 CEST] <wpwpwpwp> DHE: ffmpeg is very good in understand audio/video formats, right?
[13:01:41 CEST] <wpwpwpwp> DHE: can it also concatenate audio files without affecting quality? (re-encoding)?
[13:02:09 CEST] <DHE> well converting wav files to mp3 isn't possbile without reencoding
[13:02:39 CEST] <wpwpwpwp> DHE: so FFMPEG can concatenate + convert in single step?
[13:02:47 CEST] <wpwpwpwp> DHE: right, converting to MP3 is re-encoding :D
[13:02:59 CEST] <wpwpwpwp> DHE: is there a little nifty command line command I can run for this?
[13:03:35 CEST] <remlap> yes, there is
[13:03:59 CEST] <furq> for f in *.wav; do printf "file %q\n"; done | ffmpeg -f concat -protocol_whitelist file,pipe -safe 0 -i - -q:a 0 out.mp3
[13:04:01 CEST] <remlap> https://rg3.github.io/youtube-dl/supportedsites.html
[13:04:28 CEST] <wpwpwpwp> thx
[13:04:37 CEST] <DHE> your printf needs some love, but that works on linux, and maybe windows with bash?
[13:04:43 CEST] <wpwpwpwp> furq: this may sound obscene, but can I run this also in Batch?
[13:04:48 CEST] <furq> nope
[13:04:50 CEST] <wpwpwpwp> ah ok
[13:04:55 CEST] <wpwpwpwp> I will run it on WSL then
[13:04:59 CEST] <remlap> how many files are there
[13:05:05 CEST] <wpwpwpwp> about 6 max
[13:05:06 CEST] <furq> if you have wsl then yeah that'll work fine
[13:05:23 CEST] <remlap> read the url i listed it wont take long to do them manually
[13:05:36 CEST] <DHE> this command just writes out the list of files into a pipe. making it a text file and then running ffmpeg on the text file is probably most straight-forward, but requires a temporary file be created
[13:05:37 CEST] <furq> why are you telling him to use youtube-dl to concat wavs
[13:05:45 CEST] <remlap> shit sake
[13:05:47 CEST] <remlap> wrong url
[13:05:51 CEST] <wpwpwpwp> lol
[13:05:51 CEST] <remlap> linux paste buffers ugh
[13:05:56 CEST] <remlap> https://trac.ffmpeg.org/wiki/Concatenate
[13:05:57 CEST] <wpwpwpwp> OK, I installed ffmpeg on WSL and run it there
[13:06:06 CEST] <furq> i mean yeah it's good to read that anyway
[13:06:12 CEST] <furq> to understand the one-liner i just pasted
[13:06:16 CEST] <wpwpwpwp> there is no windows tool or simple tool for this :(
[13:06:19 CEST] <remlap> thanks for noticing furq
[13:06:38 CEST] <remlap> I have ctrl+v on one button of my mouse and middle click on another
[13:06:42 CEST] <remlap> so easy confuse myself
[13:07:04 CEST] <remlap> I need better paste buffer management
[13:07:12 CEST] <wpwpwpwp> Unrecognized option 'protocol_whitelist'.
[13:07:20 CEST] <furq> how old is this ffmpeg
[13:07:23 CEST] <DHE> older version of ffmpeg then
[13:07:29 CEST] <wpwpwpwp> aha
[13:07:32 CEST] <wpwpwpwp> can I still run it?
[13:07:33 CEST] <wpwpwpwp> plssss
[13:07:38 CEST] <furq> just remove that and it'll work i guess
[13:07:41 CEST] <wpwpwpwp> thx
[13:07:56 CEST] <wpwpwpwp> [concat @ 0x2305420] Impossible to open ''
[13:07:57 CEST] <wpwpwpwp> hmmm
[13:08:00 CEST] <furq> DHE: is there any login shell people actually use that doesn't support printf %q
[13:08:21 CEST] <furq> oh lol nvm i see
[13:08:26 CEST] <DHE> :)
[13:08:32 CEST] <furq> wpwpwpwp: printf "file %q\n" "$f"
[13:09:29 CEST] <wpwpwpwp> alright, some stuff happened apparently
[13:09:47 CEST] <wpwpwpwp> wow that was fast
[13:09:51 CEST] <wpwpwpwp> I had to check
[13:10:01 CEST] <wpwpwpwp> ok, bonus points: can I add a 2second pause between each? :D
[13:10:11 CEST] <DHE> yes...
[13:10:35 CEST] <remlap> if its six why not simply write the six files in a txt file and then ffmpeg -f concact -i file.txt out.mp3
[13:10:56 CEST] <remlap> not like theres a 100 files or something silly
[13:11:17 CEST] <wpwpwpwp> remlap: hm, I could try to make a windows batch file out of it and then add a context menu handler to registry
[13:11:26 CEST] <wpwpwpwp> DHE: is there a "pause" or "empty" filter? :D
[13:11:46 CEST] <remlap> how often you planning to do this
[13:11:50 CEST] <remlap> so its not a one time thing?
[13:11:55 CEST] <DHE> wpwpwpwp: anullsrc
[13:12:00 CEST] <wpwpwpwp> indeed, it hapens more often
[13:12:09 CEST] <remlap> then I understand
[13:12:10 CEST] <wpwpwpwp> hmmm, I use an android audio recorder that creates wav for each recording
[13:12:16 CEST] <wpwpwpwp> I want to combine them often to mp3 for sending
[13:12:26 CEST] <wpwpwpwp> DHE: how can I add annullsrc into the command? :D
[13:13:07 CEST] <DHE> wpwpwpwp: lavfi with anullsrc to the spec matching the WAVs, and setting the duration to 2 seconds
[13:13:38 CEST] <remlap> be easier to use audacity at that point
[13:13:54 CEST] <remlap> but again not automatic
[13:13:58 CEST] <remlap> im thinking shit today
[13:13:59 CEST] <DHE> https://ffmpeg.org/ffmpeg-formats.html#concat-1   the docs for the concat inputs
[13:15:42 CEST] <wpwpwpwp> OK, any nice android app (it can even cost a bit) that can record voice + then save to mp3 in the end? :)
[13:20:28 CEST] <furq> wpwpwpwp: make an empty 2-second wav and then printf "file %q\nfile 'silence.wav'\n" "$f"
[13:20:37 CEST] <furq> that's the least annoying way i can think of
[13:21:00 CEST] <DHE> that also works...
[13:21:20 CEST] <furq> you can't use lavfi sources in the concat demuxer can you
[13:21:24 CEST] <furq> that would make life simpler
[13:21:39 CEST] <remlap> til there is no stock audio recorder on android
[13:21:41 CEST] <remlap> good god
[13:21:45 CEST] <DHE> well why not? use `lavfi` as the format rather than `file`
[13:22:00 CEST] <furq> does that work
[13:22:20 CEST] <DHE> hmm.... let me check
[13:22:30 CEST] <furq> i don't see lavfi listed as a directive
[13:23:32 CEST] <DHE> well never mind me then...
[16:01:19 CEST] <phot0n> is there a way to get the average bitrate of a bunch of videos located in a folder? with either ffmpeg or ffprobe
[16:02:12 CEST] <DHE> ffprobe can provide its estimate on each individual video. the rest is up to you though
[16:02:45 CEST] <phot0n> i see, and for each individual video, is there a specific option I need to invoke for it to tell me the average bitrate?
[16:02:52 CEST] <phot0n> with ffprobe I mean
[16:03:16 CEST] <DHE> just run it on the video, there's a bitrate printed out. if you want something more machine parsable you'll want additional options.
[16:04:10 CEST] <phot0n> but is that bitrate for the video stream, or everything, including audio and muxing overhead?
[16:04:17 CEST] <phot0n> because that's something that always confused me
[16:04:18 CEST] <DHE> everything
[16:04:29 CEST] <phot0n> ugh
[16:04:30 CEST] <DHE> you might get bitrates on the individual streams as well, depending
[16:04:38 CEST] <phot0n> depending on...?
[16:04:54 CEST] <DHE> mainly the codec. some are fixed bitrate, some are not
[16:05:14 CEST] <phot0n> well, if it's fixed bitrate, whatever option that reports average bitrate will just give me that fixed bitrate, I assume
[16:05:23 CEST] <DHE> figuring out each stream's bitrate reliably requires reading the whole file and actually counting
[16:05:29 CEST] <phot0n> I see
[16:05:42 CEST] <DHE> but yes, a fixed bitrate codec is easily measured with a short sample
[16:05:49 CEST] <phot0n> i mean yeah that's sensible, it needs to see how big the video stream is and then what its duration is
[16:05:56 CEST] <phot0n> and then calculate
[16:06:09 CEST] <DHE> well the duration is usually easily measured. that's how the whole-file bitrate is calculated so quickly
[16:06:15 CEST] <phot0n> right
[16:06:31 CEST] <DHE> but if you want to split it into audio, video, and container overheads, you have to do it the hard way
[16:06:48 CEST] <phot0n> heh and what is this hard way? o.o
[16:08:34 CEST] <DHE> I like to use ffmpeg -i FILE_TO_TEST -c copy -f null /dev/null   just let it run, look at the statistics at the end
[16:08:46 CEST] <DHE> some math required though
[16:08:55 CEST] <phot0n> nice
[16:08:58 CEST] <phot0n> all right I'll give that a go
[16:55:57 CEST] <pagios> hi all, how can i convert an rtsp stream to rtmp please? any example?
[16:56:07 CEST] <pagios> only transmuxing
[17:12:47 CEST] <anickname> hey
[17:13:00 CEST] <anickname> I want to build ffmpeg from source using Cygwin
[17:13:12 CEST] <anickname> the only thing I'm going to be doing is converting mp4 / mp3 / flac files to wav
[17:13:19 CEST] <anickname> I want it to be static binary
[17:13:21 CEST] <anickname> how do I do this
[17:14:41 CEST] <BtbN> You're not going to get a static binary from cygwin
[17:14:49 CEST] <BtbN> it will at the very least always need the cygwin libraries
[17:15:57 CEST] <CoreX> best to just use what is online and compiled already
[17:16:11 CEST] <CoreX> for that type of task
[17:16:53 CEST] <anickname> I know
[17:17:05 CEST] <anickname> I want it to be a static binary that depends on Cygwin
[17:17:26 CEST] <anickname> because the paths that are being passed to ffmpeg are POSIX and it doesn't work with the windows binary
[17:18:08 CEST] <anickname> so I need to compile a static binary via cygwin
[17:18:37 CEST] <DHE> well you always depend on the cygwin.dll
[17:18:52 CEST] <BtbN> cygwin straight up does not support static binaries
[17:19:07 CEST] <BtbN> you probably mean "without external dependencies". Which you will get if you just build it.
[17:19:21 CEST] <BtbN> Not with a lot of features, but the basics will be there.
[17:19:24 CEST] <anickname> that's what I mean, without external dependencies :P
[17:19:42 CEST] <anickname> I want to depend on the cygwin.dll in order to support POSIX input paths :P
[17:19:58 CEST] <BtbN> Just use cygpath with a norla binary?
[17:20:14 CEST] <anickname> huh?
[17:20:33 CEST] <anickname> Basically I'm running commands like this
[17:20:33 CEST] <BtbN> cygpath -w gives you the windows path for any cygwin aware path
[17:20:44 CEST] <CoreX> best to check out https://ffmpeg.org/platform.html and you might find the anwser there
[17:20:45 CEST] <anickname> really
[17:20:58 CEST] <BtbN> And winpty also helps with cli applications to behave properly
[17:21:02 CEST] <anickname> well
[17:21:05 CEST] <anickname> you're awesome
[17:21:12 CEST] <anickname> thank you, I needed that :)
[17:21:33 CEST] <BtbN> cygpath isn't even a cygwin tool, as weird as that seems with its name
[17:21:55 CEST] <anickname> it's not?
[17:21:58 CEST] <anickname> what is it
[17:23:52 CEST] <anickname> oh also I know this isn't a cygwin channel
[17:24:34 CEST] <anickname> but you know how cygwin built binaries require other dlls, like it'll say Missing openblas.dll or whatever, if you include that .dll, will you also have to include any of its dependencies
[17:33:03 CEST] <TheWild> hello
[17:42:27 CEST] <TheWild> well, okay. I wanted to report a trouble with my video that I have uploaded to drivehq through ftp... but well, I have puzzle for you: what could go wrong?
[17:42:53 CEST] <TheWild> the hint is that it happened during upload and it's a drivehq fault
[17:45:02 CEST] <pagios> hi all, how can i convert an rtsp stream to rtmp please? any example?
[22:33:50 CEST] <kubast2> Hey can someone run me through utilising hardware vp9 encoder in kaby lake(nvidia optimus) ?
[22:34:42 CEST] <kubast2> gonna check first
[22:34:46 CEST] <kubast2> if I can do it actually
[22:37:25 CEST] <kubast2> ok got hevc to work
[22:39:30 CEST] <kubast2> Kaby Lake 	gen9.5 	VP9 profile 2 decode; VP9, H.265 Main10 encode.
[22:39:38 CEST] <kubast2> VP9 encode :think:
[22:40:03 CEST] <kubast2> maybe pixel format ?
[22:42:08 CEST] <kubast2> my guess is that format= needs to be changed ince p010 is 10bit ?
[22:44:40 CEST] <atomnuker> yep, p010 is usually what hardware deals with
[22:45:12 CEST] <kubast2> vp8 works fine for nv12
[22:45:20 CEST] <kubast2> can't use vp9_vaapi with nv12
[22:45:30 CEST] <kubast2> *vp8_vaapi
[22:45:49 CEST] <kubast2> Failed to create encode pipeline configuration: 25 (an invalid/unsupported value was supplied).
[22:46:13 CEST] <kubast2> tried render device 129 since I also have that
[22:46:57 CEST] <kubast2> yeah device129/192 might be nvidia driver
[22:47:43 CEST] <kubast2> yeah I can input 10bit vp8_vaapi can't encode with vp9_vaapi on ubuntu 18.04
[22:47:50 CEST] <kubast2> with 8bit and 10bit
[22:51:35 CEST] <kubast2> I mean I guess hevc works
[22:51:40 CEST] <kubast2> http://dpaste.com/0PJKF98.txt atomnuker
[22:52:26 CEST] <pagios> anyone here?
[22:52:40 CEST] <pagios>  corrupted macroblock 18 31 (total_coeff=-1) getting distorted pictures when playing
[22:52:44 CEST] <pagios> lot of errors any idea?
[22:53:09 CEST] <pagios> ffmpeg -i rtsp://..../profile3 -threads 4 -f flv -r 10 -s 320x240 -an rtmp://localhost:1935/mytv/myStream
[22:53:18 CEST] <ChocolateArmpits> pagios, what version are you using ?
[22:53:20 CEST] <pagios> how can i improve on that?
[22:53:56 CEST] <pagios> ChocolateArmpits, ffmpeg version 3.4.2-2
[22:54:13 CEST] <pagios> ChocolateArmpits, if i try to play the rtsp in vlc it works fine
[22:55:30 CEST] <pagios> ChocolateArmpits, https://i.imgur.com/QDKwkfs.png
[22:56:31 CEST] <ChocolateArmpits> pagios, can you try forcing rtsp over tcp ?
[22:56:37 CEST] <ChocolateArmpits> -rtsp_transport tcp
[22:58:04 CEST] <pagios> ChocolateArmpits, same problem
[22:58:37 CEST] <pagios> ChocolateArmpits, https://i.imgur.com/5do5X3V.png
[22:59:58 CEST] <ChocolateArmpits> pagios, did you use rtsp_transport as an input option?
[23:00:34 CEST] <pagios> ChocolateArmpits, ffmpeg -i rtsp://.../profile3 -rtsp_transport tcp -f flv
[23:00:45 CEST] <ChocolateArmpits> you need to use it in front of the input -i
[23:00:50 CEST] <pagios> oh ok
[23:01:38 CEST] <ChocolateArmpits> the default if for rtsp to communicate over udp, which can result in lost packets, tcp should be more stable albeit at some slight latency.
[23:01:44 CEST] <ChocolateArmpits> is*
[23:02:33 CEST] <pagios> so ffmpeg rtsp_transport tcp -i rtsp://..
[23:03:03 CEST] <ChocolateArmpits> ye with the rest of command as you had previously specified
[23:03:12 CEST] <ChocolateArmpits> uh don't forget the dash
[23:03:14 CEST] <pagios> ChocolateArmpits, [NULL @ 0x5620e7883dc0] Unable to find a suitable output format for 'rtsp_transport'
[23:03:16 CEST] <ChocolateArmpits> in fron of the option
[23:03:19 CEST] <pagios> ok :)
[23:04:17 CEST] <pagios> it works :)))
[23:04:20 CEST] <pagios> Thanks ChocolateArmpits
[23:04:30 CEST] <ChocolateArmpits> np
[23:04:49 CEST] <pagios> i still get some stuff though [h264 @ 0x562353f0e060] SEI type 187 size 968 truncated at 77
[23:04:58 CEST] <ChocolateArmpits> :/
[23:05:21 CEST] <ChocolateArmpits> but it's not as bad?
[23:05:26 CEST] <pagios> no it is good
[23:06:00 CEST] <ChocolateArmpits> did you get on process initialization?
[23:06:03 CEST] <ChocolateArmpits> them&
[23:06:05 CEST] <ChocolateArmpits> them*
[23:06:10 CEST] <pagios> whats that
[23:06:16 CEST] <ChocolateArmpits> When starting transcoding
[23:06:42 CEST] <ChocolateArmpits> As in those errors only show up when starting the process and don't when it continues
[23:07:01 CEST] <pagios> ChocolateArmpits, https://i.imgur.com/DvEAI01.png
[23:08:48 CEST] <pagios> ChocolateArmpits, they stay there
[23:08:53 CEST] <pagios> in the middle too not only start
[23:09:03 CEST] <ChocolateArmpits> hmm
[23:11:33 CEST] <pagios> ChocolateArmpits, it is not very stable
[23:14:22 CEST] <pagios> ChocolateArmpits, i get from avplay: Invalid data found when processing input
[23:14:29 CEST] <pagios> and sometimes the stream doesnt start
[23:15:14 CEST] <ChocolateArmpits> pagios, is the network itself not overburdened?
[23:15:21 CEST] <pagios> no it is fine i guess
[23:22:06 CEST] <ChocolateArmpits> pagios, try adding -buffer_size 10M in front of -i
[23:22:13 CEST] <ChocolateArmpits> 10 megabits should be enough of a buffer
[23:22:37 CEST] <ChocolateArmpits> though you may want to scale it down if it fails
[23:22:43 CEST] <ChocolateArmpits> likely to -buffer_size 64k
[23:23:11 CEST] <ChocolateArmpits> I'm just looking at particular solutions
[00:00:00 CEST] --- Sun Jul  1 2018


More information about the Ffmpeg-devel-irc mailing list