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

burek burek021 at gmail.com
Thu Aug 9 03:05:01 EEST 2018


[05:53:57 CEST] <Wallboy> Hey all, i'm dealing with some arbitrary input videos that I need to concat an outro video onto the end of. Some of the input videos have audio streams that are several seconds longer than the video stream. I know the easiest way to fix this is `ffmpeg -i INPUT -c copy -shortest OUTPUT`. However I have a long complex filter chain so this -shortest option doesn't work in my case. Is there some
[05:53:57 CEST] <Wallboy> filter I can use to trim the audio to the length of the video within my filter_complex graph?
[06:07:29 CEST] <Wallboy> Hmm even testing with -shortest standalone the duration of the entire file remains the length of the longest stream
[06:07:35 CEST] <Wallboy> with and without -c copy
[06:08:36 CEST] <Wallboy> oh cause it works on multiple input streams... derp
[06:12:45 CEST] <Wallboy> Hmm would of thought -map 0:v -map 0:a would work, still doesn't
[06:26:53 CEST] <Wallboy> ahh got it: `ffmpeg -i INPUT -i INPUT -map 0:v -map 1:a -c copy -shortest OUTPUT` where both inputs are the same file
[06:27:23 CEST] <Wallboy> still would like to know how cut audio down to the same length WITHIN a filter graph if possible
[06:41:26 CEST] <kepstin> no way to do that right now (aside from using trim/atrim filters if you know the length in advance, i suppose).
[06:42:00 CEST] <kepstin> A filter that emulates the -shortest option is possible, it just hasn't been written
[06:44:07 CEST] <Wallboy> so the best solution is probably to ffprobe these input videos prior and use the above command to remux it correctly before inputting it into my complex ffmpeg command?
[06:45:01 CEST] <Wallboy> i do notice that most audio and video streams aren't EXACT, differing usually by ~50msecs
[06:46:19 CEST] <Wallboy> I have some input videos where the audio stream is also quite a bit shorter, but for these the concat filter that I used automatically takes care of that potential issue
[07:07:40 CEST] <wingrime> Hi! Does anyone alive here
[07:13:43 CEST] <wingrime> Hi all, does anyone can help with strange sync rtmp behavior
[08:57:09 CEST] <Yagiza> Hello again!
[08:57:41 CEST] <Yagiza> There are more than 12 hours passed, so I'll try again.
[08:57:57 CEST] <Yagiza> Are there RTP profi around?
[09:02:46 CEST] <poutine> Yagiza, You could always just ask your question, that's standard protocol for getting things answered
[09:08:42 CEST] <Yagiza> poutine, ok
[09:09:51 CEST] <Yagiza> Did anyone tried "sdp_flags=custom_io" option of RTSP demuxer? Does it really work?
[09:11:22 CEST] <Yagiza> I just couldn't make the option working. It seems to be accepted by avformat_open_input() but nothing happens.
[09:15:47 CEST] <poutine> not sure what "does it really work" means, https://www.ffmpeg.org/doxygen/4.0/rtsp_8c_source.html could do a search for custom_io here and see what it's doing
[09:34:36 CEST] <Yagiza> poutine, yes, I also found the source code for handling it.
[09:35:06 CEST] <Yagiza> poutine, but attempting to make it work I got no result.
[09:35:36 CEST] <Yagiza> poutine, option is accepted but seems to be ignored. Ir I'm doing something wrong.
[09:35:46 CEST] <Yagiza> *Or*
[12:21:19 CEST] <freedrull> uhhh -vf and -filter_complex are different right?
[12:22:06 CEST] <furq> yes
[12:25:00 CEST] <freedrull> what do the [0][1]s mean here? do they correspond to the inputs? ffmpeg -i test.mp4 -ignore_loop 0 -i loop.gif -filter_complex "[0][1]overlay=0:H-100" output.mp4
[12:28:18 CEST] <furq> yes
[12:28:31 CEST] <furq> in that case you don't need to explicitly wire up the inputs
[12:28:36 CEST] <furq> but it's good to be clear i guess
[12:29:04 CEST] <freedrull> ok i see thanks
[12:29:12 CEST] <freedrull> i've also seen [2:v], what is this ?ffmpeg  -i dogHouse-front.png -i 01\ Aho\ House.mp3  -ignore_loop 0  -i datacoin.gif -filter_complex "[2:v]scale=480:270 [ovrl],[2:v][ovrl]overlay=W-400:H-400:shortest=1" out.avi
[12:29:20 CEST] <freedrull> v for video , a for audio?
[12:29:23 CEST] <furq> the video stream from input 2
[12:29:52 CEST] <freedrull> then [ovrl] is just assigning a name for the next filter in the chain right
[12:30:03 CEST] <furq> well that filterchain appears to be wrong
[12:30:39 CEST] <freedrull> what is wrong about it ?
[12:31:08 CEST] <freedrull> if it helps, i'm trying to make a video with a still image combined with an mp3 and a scaled gif overlayed in the corner.
[12:32:12 CEST] <furq> the first 2:v should be 0:v then
[12:32:26 CEST] <furq> otherwise it's just going to overlay a smaller version of the gif on top of the gif
[12:32:44 CEST] <furq> wait, the second 2:v should be 0:v
[12:33:04 CEST] <freedrull> ahhhh i got it
[12:33:06 CEST] <furq> and also W and H should be the same dimensions that you're scaling the gif to
[12:33:20 CEST] <furq> also you would normally put a ; to separate those filters, not a ,
[12:33:40 CEST] <furq> it works in this case but normally if you have all the inputs explictly labelled, you use ;
[12:35:07 CEST] <freedrull> overlay's W and H are not the X and Y positions I want to position the gif at ?
[12:35:40 CEST] <furq> yeah, but it should presumably be W-480:H-270
[12:35:43 CEST] <furq> if you want it it in the bottom right corner
[12:36:19 CEST] <freedrull> ah, you're right. i wanted some padding i suppose. i will tweak that a bit.
[12:36:31 CEST] <freedrull> i got it to work with this ffmpeg  -i dogHouse-front.png -i 01\ Aho\ House.mp3  -ignore_loop 0  -i datacoin.gif -filter_complex "[2:v]scale=480:270 [ovrl];[0:v][ovrl]overlay=W-400:H-400:shortest=1" out.avi
[12:36:42 CEST] <freedrull> but the gif is not animated in the output video ...
[12:37:56 CEST] <freedrull> do i have to specify the framerate somewhere ?
[12:39:09 CEST] <furq> add -loop 1 -framerate 25 before -i doghouse-font.png
[12:46:04 CEST] <freedrull> furq: amazing thanks.....in this case the encoding doesn't seem to end ? need to move the position of the 'shortest' filter maybe?
[12:47:03 CEST] <furq> get rid of shortest in the filter and just use -shortest as an output option
[12:47:14 CEST] <furq> both video inputs loop indefinitely so -shortest will make it end when the audio stops
[12:49:32 CEST] <freedrull>  ffmpeg -loop 1 -framerate 25 -i dogHouse-front.png
[12:49:32 CEST] <freedrull>  -i 01\ Aho\ House.mp3  -ignore_loop 0   -i datacoin.gif -filter_complex "[2:v]scale=480:270 [ovrl];[0:v][o
[12:49:35 CEST] <freedrull> vrl]overlay=W-480:H-270" -shortest out.avi
[12:49:45 CEST] <furq> yeah
[12:50:11 CEST] <freedrull> sorry ill use pastebin https://pastebin.com/cz6Qta8e
[12:50:20 CEST] <freedrull> like this? the command is still running...
[12:50:58 CEST] <freedrull> are loop and framrate supposed to be output options ?
[12:51:30 CEST] <furq> that looks right to me
[12:52:11 CEST] <furq> is it definitely muxing the audio stream
[12:53:55 CEST] <freedrull> terminal output : https://pastebin.com/6rJYD1ak
[12:54:59 CEST] <furq> weird
[12:57:01 CEST] <freedrull>  speed=0.939x is it just slow to encode ?
[12:57:16 CEST] <furq> the mp3 is only 7 seconds long, right
[12:57:57 CEST] <furq> oh nvm 7 minutes
[12:58:05 CEST] <furq> maybe that's it then
[12:58:14 CEST] <furq> fwiw you probably don't want to use mpeg4 in avi
[12:59:02 CEST] <furq> add -c:a copy and change the output extension to mp4
[13:02:59 CEST] <freedrull> wow it worked though! awesome
[13:05:20 CEST] <freedrull> trying -c:a copy and mp4 output now, seems to be encoding slower however https://pastebin.com/3hc1NEF2
[14:35:10 CEST] <traumschule> i use "ffmpeg -ss 6s -t 20s -i $vin1 -ss 2s -t 2:10 -i $vin2 -filter:v "crop=1600:860:0:0" $vout" to splice two video files and cut each of them a bit (the first is 31s long, the 2nd 2:10s), does this make sense so far?
[14:36:29 CEST] <traumschule> the unexpected problem is that the final video is only 20s long. where is the error?
[14:37:59 CEST] <traumschule> oh and I crop the output video, but this should not make a change?
[14:38:42 CEST] <DHE> quite a few. two inputs, one output, no real specification of how you want them merged. if you just do it this way ffmpeg will select video and audio streams using a set of rules. (multiple inputs like this are usually for merging video from one, audio from another input)
[14:40:01 CEST] <traumschule> interesting. thanks DHE, now I know what to search for.
[14:53:43 CEST] <traumschule> maskedclamp seems most suitable in ffmpeg -filters|grep 'VV->'
[15:03:08 CEST] <traumschule> only in theory and with errors. better: ffmpeg -y -ss 6s -t 20s -i $vin1 -ss 2s -t 2:10 -i $vin2 -map 0:0 -map 1:0 -filter:v "crop=1600:860:0:0" $vout
[17:13:37 CEST] <jerichowasahoax> Can I have an example for using xcbgrab (NOT x11grab) to record a specific section of my screen? Google keeps giving me x11grab, which doesn't exist in ffmpeg 3.4.x
[17:18:14 CEST] <furq> aren't they the same thing
[17:18:30 CEST] <furq> just substitute x11grab for xcbgrab
[17:18:30 CEST] <jerichowasahoax> furq: x11grab was deprecated, and it looks like it's been removed
[17:18:43 CEST] <furq> https://github.com/FFmpeg/FFmpeg/commit/5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688
[17:18:49 CEST] <DHE> but xcbgrab was named x11grab to minimize user transition pain iirc
[17:19:01 CEST] <furq> yeah i though they were aliases
[17:19:08 CEST] <furq> but either way they're the same thing, it just got renamed
[17:19:13 CEST] <furq> so the x11grab examples should all still work
[17:19:33 CEST] <jerichowasahoax> alright then i need to ask #gentoo why "build with xcb" didn't actually build with xcb then
[17:20:42 CEST] <jerichowasahoax> unless there's some more esoteric reason for me to be getting "unknown format xcbgrab", but i'm pretty sure it just didn't get built with xcb correctly
[17:40:20 CEST] <BtbN> jerichowasahoax, because if you build with xcb, you get x11grab.
[17:40:37 CEST] <BtbN> The name never changed, it just switched to xcb from classic xlib
[17:42:17 CEST] <jerichowasahoax> BtbN: Someone needs to fix this guy's Stack Overflow answer then https://stackoverflow.com/a/44921300
[17:43:03 CEST] <BtbN> It's a stackoverflow anser, nobody here has any influence on that...
[17:43:34 CEST] <jerichowasahoax> i thought stackoverflow was one of those "anyone can edit" kind of sites
[17:43:51 CEST] <BtbN> ?
[17:43:56 CEST] <jerichowasahoax> like wikipedia
[17:44:03 CEST] <jerichowasahoax> anyone can edit answers
[17:44:25 CEST] <jerichowasahoax> or do you have to be SO staff to do that
[17:44:29 CEST] <jerichowasahoax> idk
[17:44:56 CEST] <BtbN> Just comment on it, maybe the author responds.
[19:03:43 CEST] <traumschule> I was able to process the input stream separatedly and concat them to [out]. Now to learn I try to do it in one step, but something is wrong with the syntax: ffmpeg -y -ss 6s -t 18s -i $vin1 -ss 2s -t 2:10 -i $vin2 -filter_complex "[0:v] [1:v] concat [out] crop='1600:860:0:0'" -map '[out]' $vout
[19:07:27 CEST] <traumschule> the error is: [AVFilterGraph @ 0x9ee400] Unable to parse graph description substring: "crop='1600:860:0:0'"
[19:32:00 CEST] <furq> traumschule: just -filter_complex concat,crop=...
[19:32:03 CEST] <furq> and get rid of -map
[19:40:45 CEST] <traumschule> furq: thanks, runs with "ffmpeg -y -ss 6s -t 18s -i $vin1 -ss 2s -t 2:10 -i $vin2 -filter_complex '[0:v][1:v]concat,crop=1600:860:0:0' $vout". Slowly I get the idea.
[19:43:36 CEST] <furq> you don't need to explicitly map the inputs either, but it doesn't hurt
[19:49:41 CEST] <Cracki> this failed because you always have [in...] filter [out...] [in...] filter [out...] ... and you didn't specify inputs for crop "[0:v] [1:v] concat [out] crop='1600:860:0:0'"
[20:04:41 CEST] <traumschule> in this case I choose 'ffmpeg $in -filter_complex "concat,crop='1600:860:0:0'" $vout'
[20:09:57 CEST] <traumschule> took me some hours but now i know more than if somebody had said s/:v "/_complex "concat,/
[20:59:21 CEST] <nifker> Im on debian with ffmpeg v4.0.2-1 but it isnt compiled with AV1 is that usual?
[21:02:43 CEST] <Cracki> you think a practically usable av1 codec exists already?
[21:03:12 CEST] <DHE> I don't think av1 has been safely spec-frozen yet
[21:03:13 CEST] <Cracki> ah it seems ffmpeg 4.0 supports it...
[21:03:36 CEST] <Cracki> here they claim it, but the url is just ffmpeg.org https://www.reddit.com/r/AV1/comments/8jslrx/ffmpeg_40_officially_supports_av1/
[21:03:49 CEST] <Cracki> >It takes around 40 seconds to encode one frame with normal presets.
[21:04:03 CEST] <Cracki> using reference codec
[21:04:19 CEST] <DHE> can confirm, encoded about 2 minutes of video in around 2 weeks
[21:04:21 CEST] <Cracki> nifker, why do you assume it is UNusual?
[21:04:29 CEST] <DHE> mind you it looked really good for 1080p at 1 megabit
[21:05:24 CEST] <relaxed> nifker: my builds have av1 support if you want to take it for a whirl, https://johnvansickle.com/ffmpeg/
[21:06:53 CEST] <nifker> relaxed: I could build it myself but I just wondered why debian didnt build it with VP1 - but I guess Cracki found a good reason why it might not have been used
[23:01:25 CEST] <SortaCore> heyo
[23:01:30 CEST] <SortaCore> flac compression level, is it a thing?
[23:01:47 CEST] <SortaCore> there's no explicit thing under flac on https://ffmpeg.org/ffmpeg-codecs.html
[23:02:06 CEST] <SortaCore> and the page doesn't even say whether 0 is best compression or fastest
[23:03:39 CEST] <furq> compression_level 12 is the best
[23:05:30 CEST] <SortaCore> seems to be going at the same speed as the default 5 though
[23:51:46 CEST] <SortaCore> hmm, maybe not
[00:00:00 CEST] --- Thu Aug  9 2018


More information about the Ffmpeg-devel-irc mailing list