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

burek burek021 at gmail.com
Tue Nov 24 02:05:01 CET 2015


[00:13:03 CET] <Mallot_> durandal_1707: ok, a bit of googling later, i'll be looking at hugin, which is a foss gui wrapper around the panorama tools libraries
[02:17:18 CET] <sebox> hello there, if any one can help me with ffmpeg and concat option i will be very glad for any tips. im trying to merge two video files, first one is a intro with 1 audio 1 video stream, second file have 2 audio (mic+game sounds) and 1 video stream. On the output i dont hear a mic in a movie. please tell me how to merge 2 files with 2 audio streams into 1 audio stream. this is my batch file i use. paste bellow
[02:17:24 CET] <sebox> ffmpeg -f concat -i mylist.txt -b 28500k -minrate 28000k -maxrate 29999k -bufsize 15000k -c:v libx264  -preset slow -threads 7 -acodec mp3 1.mp4
[02:18:54 CET] <c_14> You're going to need to use the concat filter, and probably an amix as well
[02:19:20 CET] <c_14> https://trac.ffmpeg.org/wiki/Concatenate#filter
[02:19:29 CET] <c_14> https://ffmpeg.org/ffmpeg-filters.html#amix
[02:20:31 CET] <sebox> thank you c_14 but i tryied this option with filter
[02:21:07 CET] <sebox> and problem is that -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" there is only 2 files and 2 streams
[02:21:46 CET] <c_14> Which is where the amix comes in (probably)
[02:21:49 CET] <sebox> when i tryiued to type more [1:a:0] [1:a:1] there is a error
[02:21:53 CET] <c_14> Do you want 2 audio streams in the output, or 1?
[02:22:00 CET] <sebox> only 1
[02:22:35 CET] <c_14> add a separate filterchain that uses amix to mix the two audio streams in the one file with two streams into one stream and use the output pad from that chain as input for the concat filter
[02:23:24 CET] <sebox> i tried this option ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT but he just stops on 1 video
[02:23:28 CET] <sebox> with no error
[02:24:01 CET] <c_14> 2 inputs
[02:24:07 CET] <c_14> Only mix the 2 streams in the one file with 2 streams
[02:24:14 CET] <c_14> Then use the output pad as input for the concat filter
[02:24:32 CET] <c_14> and scrap the duration, they should be of equal length
[02:24:43 CET] <c_14> If not, you'll probably want duration=longest or something
[02:27:07 CET] <sebox> you are good ... this works ffmpeg -i 10.avi -i 10.avi -filter_complex amix=inputs=2:duration=longest:dropout_transition=2 OUTPUT.mp4
[02:27:19 CET] <sebox> now i have 1 files merge 2 audio streams
[02:27:34 CET] <sebox> and now i need to merge this one with intro i will check now
[02:27:39 CET] <c_14> close, but not quite what I meant
[02:28:52 CET] <c_14> ffmpeg -i first.video -i second.video -filter_complex '[0:a:0][0:a:1]amix=duration=longest:dropout_transition=3[tmp];[0:v:0][tmp][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]' out.mkv
[02:29:04 CET] <c_14> all in one command
[02:29:12 CET] <sebox> i dont know why that ffmpeg -f concat cant do it already to merge streams
[02:29:13 CET] <c_14> Swap the ordering if the second video has the 2 audio tracks
[02:29:33 CET] <c_14> sebox: the concat demuxer only works under the assumption that all files are similar
[02:29:39 CET] <c_14> They have the same amount and type of streams etc
[02:35:19 CET] <sebox> c_14: invalid stream specifier: '[v]'.
[02:35:35 CET] <sebox> stream map ''[v]'' matches no streams
[02:35:45 CET] <c_14> It's the output pad of the concat filter...
[02:35:49 CET] <c_14> What's your command look like?
[02:36:00 CET] <sebox> <c_14> ffmpeg -i first.video -i second.video -filter_complex '[0:a:0][0:a:1]amix=duration=longest:dropout_transition=3[tmp];[0:v:0][tmp][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]' out.mkv
[02:36:06 CET] <sebox> that you give me
[02:36:28 CET] <sebox> but i think the problem is where the 1 file is ony 1 audio and 1 video
[02:36:38 CET] <sebox> second one i 2 audio and 1 video
[02:37:18 CET] <c_14> Swap the 0:s and the 1:s, so it's -filter_complex '[1:a:0][1:a:1] etc
[02:43:31 CET] <sebox> can you check this is good ? -filter_complex "[0:a:0][1:a:0]amix=duration=longest:dropout_transition=3[tmp];  [0:v:0][tmp][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]" -map '[v]' -map '[a]' out.mp4
[02:44:09 CET] <sebox> "[1:a:0][1:a:1]amix=duration=longest:dropout_transition=3[tmp];  [0:v:0][tmp][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]" -map '[v]' -map '[a]' out.mp4
[02:54:53 CET] <sebox> c_14 its working but another way
[02:55:17 CET] <sebox> i convert 2 files
[02:55:22 CET] <sebox> like you say ffmpeg -i 10.avi -i 10.avi -c:v copy -filter_complex amix=inputs=2:duration=longest:dropout_transition=2 10a.avi
[02:55:30 CET] <sebox> i conver intro and movie
[02:55:47 CET] <sebox> and then i do concat and he merges me my files
[02:56:10 CET] <sebox> so its working but now i know that i need to convert all files before i can merge them
[02:56:14 CET] <sebox> i didnt know that
[02:56:29 CET] <sebox> and i didnt saw that was writed in docu
[03:00:27 CET] <sebox> c_14 thank you for your help.
[06:24:33 CET] <louis_> I am setting profile:v high444 and qp=0 but I still get yuv420p as colorspace with libx264
[06:24:38 CET] <louis_> is there a way to get yuv422p ?
[06:24:44 CET] <louis_> or yuv444?
[08:06:16 CET] <dsl420> isnt it -pix_fmt yuv444p -profile:v high?
[08:07:25 CET] <dsl420> louis_
[08:12:13 CET] <louis_> dsl420: let me try that
[08:12:24 CET] <louis_> i think the issue here is a limitation of open broadcaster that has nothing to do with ffmpeg/x264
[08:12:57 CET] <dsl420> -pix_fmt yuv444p -profile:v high444 or only -profile:v high444.. seems works moth
[08:13:03 CET] <dsl420> both
[08:13:38 CET] <dsl420> ah
[09:41:39 CET] <DanteLA> http://ffmpeg.org/doxygen/trunk/group__lavc__picture.html#details <- AVPicture Functions are all deprecated, what replaces them?
[09:44:12 CET] <pepee> so, I found the root of the issue with mp4/aac (unrelated to mp4) made from still image + audio being longer than they should, the problem is aac itself:   ffmpeg -y -i /tmp/in.wav -v -c:a aac -strict -2  -ab 24k -ar 16000 "/tmp/1_$$.aac
[09:44:49 CET] <pepee> err, minus that double quote... is there any way to solve this?
[09:46:49 CET] <pepee> oh well, I'll bbl. bye
[14:26:22 CET] <DanteLA> I have: 'fmt = av_guess_format(NULL, filename, NULL);' but how do I actually select a format, like H.264?
[14:26:34 CET] <DanteLA> It seems to default to mpeg4 for .avi and .mp4 extensions
[14:31:48 CET] <waressearcher2> DanteLA: hallo
[14:32:32 CET] <DanteLA> waressearcher2: hi
[14:32:40 CET] <waressearcher2> DanteLA: wie geht's ?
[14:33:09 CET] <DanteLA> .. how do you assume I speak germany?
[14:33:58 CET] <waressearcher2> keine ahnung
[14:59:34 CET] <well0ne_> lol
[16:55:05 CET] <TheFuzzball> If I have two containers: a.webm and b.webm, and I want to take the video stream from a, and the audio stream from b, and create a new c.webm with the two streams. What command do I use?
[17:01:10 CET] <furq> -i a.webm -i b.webm -map 0:v -map 1:a -c copy c.webm
[17:09:58 CET] <TheFuzzball> furq: Awesome. Thanks :)
[17:10:14 CET] <TheFuzzball> One day I'll remember how to use ffmpeg.
[17:11:01 CET] <pepee> furq, I think I found what causes mp4 videos to be longer than they should
[17:11:11 CET] <furq> i saw that
[17:11:20 CET] <pepee> ah
[17:11:22 CET] <furq> it definitely happened to me with mp3 as well
[17:11:36 CET] <pepee> mp3 as input?
[17:11:41 CET] <furq> yeah
[17:11:45 CET] <furq> i wonder if it's just ffmpeg encoding the audio that causes it
[17:12:03 CET] <furq> and er, no, not mp3 as input
[17:12:04 CET] <pepee> apparently, this is well known:  https://trac.ffmpeg.org/ticket/110
[17:12:07 CET] <furq> flac as input encoded to mp3
[17:12:15 CET] <pepee> ah
[17:12:44 CET] <furq> it also happened with mkv
[17:23:20 CET] <pepee> there is another thread from 2013 https://ffmpeg.org/pipermail/ffmpeg-user/2013-September/thread.html#17495
[17:34:15 CET] <durandal_1707> you could trim start or end
[17:34:24 CET] <furq> i don't think it's an issue with the audio duration
[17:35:02 CET] <furq> i have a test file here which is out by 6 seconds, mediainfo reports the right duration for the audio stream
[17:36:58 CET] <furq> http://sprunge.us/iDUI
[17:40:25 CET] <pepee> do you have espeak in your system? let's try something
[17:44:33 CET] <pepee> try this:  http://sprunge.us/PYNe
[17:44:59 CET] <pepee> run espeak and encode the output wav file to aac
[17:46:23 CET] <pepee> err, forgot to mention the duration of the wav file... it's ~1 min
[17:47:57 CET] <furq> this is fun
[17:48:08 CET] <furq> image + flac encoded to aac -> 4:50
[17:48:19 CET] <furq> encode same flac to aac with same settings with ffmpeg, image + aac -> 4:46
[17:48:19 CET] <pepee> hah
[17:50:16 CET] <pepee> why doesn't ffmpeg simply copy the duration of the input? and how come there is no flag to tell ffmpeg to do that? is there?
[17:50:43 CET] <furq> that's what -shortest should do
[17:50:50 CET] <c_14> Have you tried -copyts ?
[17:52:00 CET] <pepee> I just tried it, it gave me the same duration for the output file,  00:03:19.68
[17:53:03 CET] <furq> no difference here either
[17:55:06 CET] <furq> c_14: http://sprunge.us/JYOS
[17:55:15 CET] <furq> the first one gives a duration of 4:50, the second one 4:46
[17:55:24 CET] <furq> the audio files have the same duration
[17:56:24 CET] <furq> and increasing -r reduces the offset
[17:58:17 CET] <c_14> I don't know, but it sounds fun.
[17:58:23 CET] <furq> it sure does
[17:59:15 CET] <furq> for my use case i can just work around by encoding the audio separately, but it sounds like that won't do for pepee
[18:00:01 CET] <pepee> I would have to read the read the duration of the input file and pass that with -t
[18:00:23 CET] <pepee> it's not a problem, but I guess I could help by reporting the bug
[18:14:07 CET] <durandal_1707> encoders can do that, its normal
[18:14:39 CET] <pepee> wait, I just noticed, the output file says "bitrate: 8 kb/s", but I used  -ab 24k
[18:50:25 CET] <BLZbubba_> hello, i am looking for the modern equivalent of the old "ts2ps" utility.  it would take a transport stream and a list of pids and output a presentation stream
[18:50:50 CET] <BLZbubba_> what is the easiest way to do this these days?
[19:39:47 CET] <pepee> so, should I report the bug?
[19:40:04 CET] <pepee> also, which bug should I report... ?
[20:15:35 CET] <Nosomy> hi, have any way to use expr in ffmpeg for some parameters beyond  force_key_frames ?
[20:18:19 CET] <Nosomy> something like this:  ffmpeg -i videoin.ext -g exp:fps/2 videout.exe
[20:18:40 CET] <Nosomy> *videout.ext
[20:18:42 CET] <llogan> not with -g
[20:18:47 CET] <llogan> you can script it
[20:19:32 CET] <Nosomy> have a "-g' equivalent can do this?
[20:26:28 CET] <Nosomy> yes, but the problem is  i'm doing some profiles for aTube Catcher (one ffmpeg gui), apparently I have to make one for each type of fps input.
[20:29:58 CET] <Nosomy> then..
[20:34:59 CET] <llogan> why do you need to change -g?
[20:38:22 CET] <Nosomy> https://support.google.com/youtube/answer/1722171?hl=en -> "Closed GOP. GOP of half the frame rate."
[20:38:49 CET] <Nosomy> the source can be 24 to 60 fps.
[20:39:42 CET] <llogan> eh, just use the default
[20:39:48 CET] <furq> it's youtube, they reencode it anyway
[20:40:14 CET] <Nosomy> furq for youtube, crf 16 or crf 18?
[20:40:21 CET] <Nosomy> which is better?
[20:40:37 CET] <furq> please define "better"
[20:40:46 CET] <llogan> can you tell a difference? 18 is probably good enough.
[20:40:56 CET] <furq> i've never used a crf value below 20 for anything
[20:41:16 CET] <furq> plus they're reencoding it anyway so anything that's high enough to survive their butchering is fine
[20:41:30 CET] <Nosomy> 21 is my personal limit, but the Atube Catcher profile is not for a personal use.
[20:41:53 CET] <Nosomy> *only my personal use
[20:42:56 CET] <llogan> unless your users are mostly dialup or something you'll be fine with ~18
[20:43:48 CET] <llogan> don't worry about trying to conform to those settings too much: I haven't seen a failed upload in a while.
[20:44:01 CET] <furq> i'm sort of amazed that this guide even exists
[20:44:33 CET] <furq> the last time i saw a youtube upload fail was 1fps x264 + flac in mkv
[20:44:43 CET] <Nosomy> well, an one test the this guide of youtube helps
[20:45:10 CET] <furq> what is going on with the recommended audio bitrates section
[20:45:33 CET] <furq> are most of their uploads using ac3 audio
[20:45:54 CET] <Nosomy> bitrate section can be ignored
[20:46:12 CET] <furq> i would argue that everything except the resolution and aspect ratio can be ignored
[20:46:31 CET] <TD-Linux> furq, seems reasonable bitrates for the old ffmpeg aac encoder :)
[20:47:14 CET] <furq> i guess it does mention using 96khz AAC-LC at the top
[20:47:34 CET] <furq> (not that i think that's a sensible recommendation)
[20:48:05 CET] <Nosomy> another thing to test is turn off scenecut, h264 streams without scenecut became very good in a test in youtube.
[23:35:17 CET] <pepee> should I report the bug (the duration of output files (aac) is longer than that of input files (wav, ogg, mp3))?
[23:38:48 CET] <pepee> ... which seems to affect the length of videos made from images, and probably many other things
[23:48:38 CET] <llogan> pepee: how to reproduce?
[23:49:22 CET] <furq> llogan: http://sprunge.us/JYOS
[23:49:52 CET] <furq> when i run that with a 4m45s audio stream, the first one has a duration of 4:50, the second one 4:56
[23:49:56 CET] <furq> s/4:56/4:46/
[23:50:14 CET] <furq> it's also not specific to aac or mp4
[23:50:29 CET] <pepee> llogan, http://sprunge.us/ZVIC
[23:50:34 CET] <furq> and also according to mediainfo it's the video stream which is too long, not the audio stream
[23:51:38 CET] <furq> and finally, increasing -r reduces the offset
[23:52:12 CET] <furq> i assume it's an issue with the image2 muxer, but i don't know for sure
[23:52:36 CET] <furq> and by for sure i of course mean at all
[23:54:11 CET] <pepee> in my case, the same happens if I convert the wav to ogg/mp3 then to aac, but, funnily enough, the length of the output audio files are all different
[23:54:35 CET] <furq> is this just with audio or audio+video
[23:54:39 CET] <llogan> impatient girlfriend waiting...i'll have to look tomorrow
[23:54:47 CET] <pepee> haha
[23:55:00 CET] <furq> great now i have to type all that out again
[23:55:27 CET] <pepee> let's make a bug report and copy paste everything we wrote :P
[23:55:45 CET] <furq> everyone loves bug reports which are copy-pasted irc conversations
[23:55:51 CET] <furq> wait, not loves. the other one
[23:56:16 CET] <pepee> I'm not saying we should only write that
[23:56:37 CET] <pepee> thing is, I don't know if this is just one bug, or many
[00:00:00 CET] --- Tue Nov 24 2015


More information about the Ffmpeg-devel-irc mailing list