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

burek burek021 at gmail.com
Fri Nov 6 02:05:01 CET 2015


[00:11:53 CET] <JamJams> I'll see how I go :/
[00:13:01 CET] <StephenS> which is better regarding quality, webm or mp4?
[00:20:04 CET] <JamJams> It's just the continer StephenS it wont have any effect on the quality.
[00:20:24 CET] <StephenS> hmm, ok so which one is better supprted on browsers?
[00:20:32 CET] <StephenS> should i make fallback with flash on mp4 or webm?
[00:21:14 CET] <JamJams> MP4 has the best support, however webm is a lot better in terms of a container.
[00:21:25 CET] <Mavrik> You'll need both anyway.
[00:21:28 CET] <JamJams> Anything modern should handle webm fine
[00:21:47 CET] <Mavrik> StephenS, I strongly suggest you read up on difference between container, (video/audio) format and a codec.
[00:22:02 CET] <Mavrik> It'll make it easier for you to ask the right questions :)
[00:22:09 CET] <Mavrik> And understand why some stuff breaks. :P
[00:22:21 CET] <Mavrik> (WebM and MP4 are only containers.)
[00:22:24 CET] <StephenS> Mavrik, I do have both, webm and mp4 and I have in source for html5 both set
[00:22:34 CET] <StephenS> but I cant set both for flash I guess, so I need to choose one
[00:22:39 CET] <JamJams> -i %03d.yuv is the correct format for a set of 000.yuv 001.yuv files right?
[00:23:07 CET] <Mavrik> StephenS, did flash ever support VP8/9 video in WebM?
[00:23:28 CET] <StephenS> dunno
[00:23:48 CET] <StephenS> Adobe has announced that it will support the VP8 video codec. WebM, however, is an umbrella term that means VP8 video, with Vorbis audio
[00:24:27 CET] <Mavrik> WebM is a container derived from Matroska.
[00:24:47 CET] <Mavrik> It __usually__ contains VP8 video with Vorbis audio... but lately VP9 isn't all that rare either :)
[00:25:12 CET] <Mavrik> VP8 and VP9 significantly differ in quality for the same size.
[00:25:25 CET] <Mavrik> That's why you got strange answers for the question which is better :)
[00:26:26 CET] <StephenS> yeah but which one is more supported?
[00:26:34 CET] <StephenS> on browsers, so I can put it in my flash fallback?
[00:26:59 CET] <StephenS> ogg is useless if I have those two containers I guess
[00:27:03 CET] <Mavrik> H.264 video is usually more widely supported and harware accelerated in most platforms.
[00:27:16 CET] <Mavrik> Use that primarily and have VP8 as fallback.
[00:27:30 CET] <Mavrik> I wouldn't really bother with flash anymore, but if you have to, feed it H.264.
[00:27:45 CET] <StephenS> ok so mp4
[00:32:08 CET] <JamJams> JEEB based on that thread there doesn't appear to be a way to flag an input as interlaced, which isn't good for me haha.
[00:32:51 CET] <furq> do you need to flag an input as interlaced if it's going straight to yadif
[00:35:09 CET] <JamJams> I have both the raw yuv frames after editing and the orginal input if I give ffmpeg the orginal input the fields are in the correct order after deinterlace
[00:35:25 CET] <JamJams> However if I use the raw yuv frames, the field order is incorrect
[00:35:42 CET] <JEEB> JamJams: uhh I did note the field_order option :P
[00:35:46 CET] <JEEB> does that not work?
[00:36:03 CET] <JamJams> -field_order 1 ?
[00:36:18 CET] <JEEB> look at the documentation I linked?
[00:36:27 CET] <JEEB> also I prefer the string-based options to random numbers :P
[00:38:32 CET] <JamJams> I tried that results in the same problem
[00:38:46 CET] <JEEB> before -i, right?
[00:38:53 CET] <JEEB> since it's an input option :P
[00:39:32 CET] <JamJams> Yep
[00:39:46 CET] <JamJams> Using showinfo, it still shows up as P
[00:39:47 CET] <JamJams> fmt:yuv420p sar:0/1 s:1920x1080 i:P
[00:40:58 CET] <JamJams> I have a felling setfield=mode=tff,yadif may work
[00:41:04 CET] <JamJams> feeling*
[00:43:44 CET] <JEEB> that's exactly the same thing as setting the parity in yadif itself :P
[00:43:49 CET] <JEEB> or well, the result is
[00:44:02 CET] <JEEB> if that filter works as I think it does :P
[00:44:19 CET] <JEEB> yadif=parity=tff if that's what you need
[00:44:29 CET] <JEEB> (like I noted quite a long time ago)
[00:47:34 CET] <JamJams> I tried that and the fields aren't put together properly lol
[00:48:21 CET] <JEEB> is your content tff really?
[00:48:30 CET] <JEEB> if not, then it's bff :P
[00:48:43 CET] <JamJams> I'm comparing it to avs yadif()
[00:48:46 CET] <JamJams> Same settings
[00:48:51 CET] <JamJams> Same input wrong result :P
[00:49:20 CET] <JEEB> create a short sample and report then, I guess
[00:49:23 CET] <JEEB> off to the trac for you
[00:51:34 CET] <JamJams> Yeahh probably gonna have to do that
[01:15:08 CET] <JamJams> I420 is yuv420p right?
[01:25:27 CET] <iive> JamJams: yes
[01:25:59 CET] <JamJams> Well I'm out of ideas then
[01:26:05 CET] <JamJams> Clearly a bug
[01:29:02 CET] <iive> JamJams: just to be clear, have you actually tried with bff?
[01:29:51 CET] <JamJams> I've got the same file open in avs using yadif(order=1) and it results in the correct field sequence. It's absolutely not that.
[01:30:45 CET] <iive> so the short answer is : no
[01:31:44 CET] <JamJams> The field order is tff, or avs would result in the same issue since the yadif implementations are identical
[01:33:50 CET] <iive> still: no
[01:34:40 CET] <JamJams> I'll try but it's most certainly a waste of time
[01:36:21 CET] <JamJams> That made it worse
[01:37:39 CET] <JamJams> It's a bug with ffmpeg it can't deinterlace raw.yuv input correctly.
[01:40:07 CET] <iive> i suspect you are missing something.
[01:40:40 CET] <iive> maybe mode=send_field?
[05:22:23 CET] <Prelude_Zzzzz> hey everyone
[05:23:18 CET] <Prelude_Zzzzz> good day to you... anyone know why when encoding video with ffmpeg ( i have it set to 30fps ) but when people are walking around there is sort of a motion stutter visible in their heads and body like the frame rate is like very low.. i dont know what to tweak to improve motion
[05:23:47 CET] <grublet> Prelude_Zzzzz: ffmpeg has a default framerate, i belive is 25, which you can change with the -r command line switch
[05:24:27 CET] <Prelude_Zzzzz> i do have it set to -r 30
[05:24:38 CET] <grublet> Prelude_Zzzzz: is 30 the fps of the original video?
[05:24:49 CET] <Prelude_Zzzzz> its being encoded as 30 fps.. but for some reason on the motion it still looks blury and stutters a tad
[05:24:59 CET] <Prelude_Zzzzz> ya original is 29.97
[05:25:15 CET] <grublet> is the source interlaced?
[05:25:29 CET] <Prelude_Zzzzz> not sure.. you think i have to deinterlace ? its an HD source
[05:25:53 CET] <grublet> Prelude_Zzzzz: if it's 1080 and 29.97 then its most likely interlaced, if thats the case you'd need to deinterlace
[05:25:59 CET] <Prelude_Zzzzz> any way to set the deinterlacer on only if interlaced ?
[05:26:30 CET] <Prelude_Zzzzz> if i turn on the " deinterlacer " it jacks up cpu usage and its fine but it does it to sources that don't need to be deinterlaced too
[05:26:39 CET] <Prelude_Zzzzz> any way to have it detect and use if necessary?
[05:27:20 CET] <grublet> Prelude_Zzzzz: http://ffmpeg.org/ffmpeg-all.html#idet
[05:27:37 CET] <grublet> i never did much work with ffmpeg for interlacing so at this point hopefully someone else can be more help
[05:34:30 CET] <Prelude_Zzzzz> ya.. i dont think its an interlace issue
[05:34:34 CET] <Prelude_Zzzzz> the lines is not what i see
[05:34:44 CET] <Prelude_Zzzzz> i see motion stutter really as if frame rates are very low
[05:34:48 CET] <Prelude_Zzzzz> and the system is trying to fill in to 30fps
[05:34:53 CET] <Prelude_Zzzzz> like duplicate frames or something
[05:35:08 CET] <Prelude_Zzzzz> more like a tremor on the image when peole move around the screen and stuff.
[05:35:18 CET] <Prelude_Zzzzz> image tremor ? that makes sense.. but on moving parts
[05:47:35 CET] <JamJams> Prelude_Zzzzz it may need to be restored to 23 fps
[05:47:46 CET] <JamJams> -vf "fieldmatch,decimate"
[05:47:48 CET] <Prelude_Zzzzz> no.. maybe vsync 2 ?
[05:47:56 CET] <Prelude_Zzzzz> instead of fill in frames just use whatever it gets
[05:48:01 CET] <Prelude_Zzzzz> could that help ?
[05:48:15 CET] <Prelude_Zzzzz> is that before input or on output
[05:48:28 CET] <JamJams> Filters should be after the input
[05:48:37 CET] <JamJams> -vf "yadif=deint=interlaced"
[05:48:43 CET] <JamJams> That's how you apply yadif to only interlaced frames
[05:52:18 CET] <Prelude_Zzzzz> cool.. ya when i added the fieldmatch , decimate the frame rate dropped like crazy
[05:53:45 CET] <JamJams> You only need that if the source material needs ivtc
[05:54:18 CET] <JamJams> You shouldn't be touching the frame rate with -r if your only goal is to re-encode the source.
[05:54:42 CET] <JamJams> -r 30 != 29.97
[05:54:47 CET] <JamJams> That's probably why you're getting jitters
[06:01:47 CET] <Prelude_Zzzzz> the source is 29.97
[06:01:51 CET] <Prelude_Zzzzz> should i set it to the same as source ?
[06:02:01 CET] <Prelude_Zzzzz> i mean is the 30.00 that big of a dif ?
[06:02:18 CET] <Prelude_Zzzzz> i am re-encoding sources so yes i am setting at 30fps
[06:19:14 CET] <pfloyd> is there a way to re-map the colorspace of a video? I want to convert yuv to rgb, the src video is basically black of 16 not 0
[09:48:14 CET] <voldial> Is there a built-in way to detect that a video stream does not change? If not I figure I'll need to 'manually' compare each.
[09:48:50 CET] <voldial> I want to strip video streams from files that have a single image video.
[10:19:31 CET] <voldial> uug. found a working opencv example, and (obviously in retrospect) compression changes frame to frame. maybe phash will work
[10:45:09 CET] <voldial> well, it's not that bad, out of 152965 'same' frames, only 492 are unique. That works.
[13:19:15 CET] <gott> hi
[13:19:54 CET] <Guest59938> with ffmpeg is possible by cmd change audio flag?
[13:20:24 CET] <Guest59938> i want audio track 2, become the default track
[13:42:36 CET] <StephenS> Guest59938, You can change audio with ffmpeg
[13:43:38 CET] <StephenS> just copy stream such as -codec copy -shortest
[13:43:52 CET] <Guest59938> yes
[13:44:28 CET] <StephenS> this way you are not doing any re-encoding, but if you want to change format then use some encoder
[13:44:30 CET] <Guest59938> but i want change the default audio track 1 ENG  with audio track 2 ITA  in mkv
[13:44:44 CET] <Guest59938> in mkvmerge is easy
[13:44:46 CET] <StephenS> yeah, you can do this with stream copy
[13:44:54 CET] <Guest59938> but i need convert 50 files
[13:44:55 CET] <Guest59938> in 1 times
[13:45:24 CET] <StephenS> you mean in one line?
[13:45:48 CET] <Guest59938> example
[13:45:51 CET] <StephenS> you can do this with multiple outputs, or this https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs
[13:46:35 CET] <Guest59938> how work -map?
[13:47:25 CET] <StephenS> Omitting the -map option will use the default stream selection. This will work if your video input has no audio.
[13:48:13 CET] <StephenS> so does your video have audio?
[13:48:22 CET] <Guest59938> my video have 2 audio
[13:48:35 CET] <StephenS> ok then you want -map
[13:48:49 CET] <Guest59938> the problem is track1 have
[13:49:01 CET] <Guest59938> Default                     : No                Forced                      : No
[13:49:14 CET] <Guest59938> track2
[13:49:18 CET] <Guest59938> Default                     : Yes          Forced                      : No
[13:49:28 CET] <Guest59938> i need track2 Forced YES
[13:50:21 CET] <Guest59938> or invert the track
[13:50:40 CET] <Guest59938> because player start first track
[13:51:29 CET] <StephenS> maybe you want to tweak metadata?
[13:51:52 CET] <Guest59938> i think, i'm not an expert
[13:56:17 CET] <StephenS> Guest59938, maybe http://superuser.com/questions/834244/how-do-i-name-an-audio-track-with-ffmpeg/835069#835069 ?
[14:01:44 CET] <Guest59938> this change track title
[14:02:11 CET] <Guest59938> i need change track default/forced parameter in mkv
[14:04:03 CET] <Guest59938> i found this for mkvmerge: mkvmerge -o output.mkv -S "Iron Man.mkv" --language "0:eng" --track-name "0:Forced" --forced-track "0:yes" --default-track "0:yes" "forced eng.srt"
[14:04:14 CET] <miyalys> I'm trying to make a video for Youtube from a PNG and an MP3, but I keep getting an unsharp result. Looking at ffmpegs output I suspect this could be the cause Movie-Aspect is 1.00:1 - prescaling to correct movie aspect.     VO: [xv] 500x500 => 500x500 Planar YV12
[14:04:34 CET] <myrkraverk> Is it possible to add a .srt to an .mkv file, with a delay using just ffmpeg?  Either hardsub or softsub works.
[14:04:42 CET] <miyalys> Oop,s just posting that to its own line instead:
[14:04:43 CET] <miyalys> Movie-Aspect is 1.00:1 - prescaling to correct movie aspect.     VO: [xv] 500x500 => 500x500 Planar YV12
[14:04:43 CET] <myrkraverk> I need a delay of 5 seconds.
[14:05:07 CET] <miyalys> ...it seems it's scaling something even though it already has the correct dimensions? Can I prevent that?
[14:07:55 CET] <miyalys> myrkraverk: For adding the srt have you tried simply listing it as an input argument? ffmpeg -i video.mkv -i file.srt out_video.mkv ? That won't handle the delay but I think it might work for adding the subtitles, probably as softsubs?
[14:08:33 CET] <myrkraverk> Yeah, unfortunately, this is meant for a hw player, so I can't softedit the delay later.
[14:08:53 CET] <myrkraverk> Otherwise, I'd have tried it already.
[14:09:18 CET] <myrkraverk> But -itsoffset helps, I'll try that.
[14:09:23 CET] <myrkraverk> *maybe
[14:13:05 CET] <miyalys> hm, maybe it would be easier to find a dedicated srt subtitle editor for handling that delay, going through the file and adding 5 seconds to all timestamps?
[14:13:12 CET] <miyalys> but I don't know, maybe ffmpeg can do it too
[14:13:18 CET] <waressearcher2> myrkraverk: hallo
[14:14:19 CET] <myrkraverk> waressearcher2: hello
[14:19:01 CET] <JamJams> Hey in libavcodec, if I avfilter_graph_parse_ptr with decimate avfilter_graph_config returns code -22 and fails. Anything I may have missed?
[14:23:54 CET] <StephenS> Guest59938, then try that
[14:25:20 CET] <Guest59938> i try with: for %%a in ("*.mkv") do mkvmerge -o "conv/%%~na .mkv" "%%a" --forced-track "1:yes" --default-track "1:yes"
[14:25:25 CET] <Guest59938> but dont change
[14:25:36 CET] <Guest59938> i ffmpeg there are similar command?
[15:33:51 CET] <mistur> MentalRay:
[15:38:47 CET] <Guest59938> i finally solved with: for %%a in ("*.mkv") do  mkvmerge.exe -o "conv/%%~na.mkv" "--default-track" "0:yes" "--forced-track" "0:no"  "--language" "1:eng" "--track-name" "1:Eng" "--default-track" "1:no" "--forced-track" "1:no" "--language" "2:ita" "--track-name" "2:Ita" "--default-track" "2:yes" "--forced-track" "2:no" "-a" "1,2" "-d" "0" "%%a" "--track-order" "0:0,0:2,0:1"
[15:38:49 CET] <Guest59938> bye
[15:50:42 CET] <waressearcher2> hallo leute, wie gehts ?
[15:52:05 CET] <durandal_1707> nicht
[16:45:30 CET] <mustafam> Hi, I am testing git ffmpeg with git libvpx, when I use "-threads 4" it works (multithreaded) without adding -tile-columns, is this the new default?
[16:49:46 CET] <waressearcher2> mustafam: moin
[16:52:28 CET] <c_14> mustafam: probably better to ask wherever libvpx is supported. Nothing was changed on ffmpeg's side regarding that afaik
[16:53:38 CET] <mustafam> Thank you.
[17:02:13 CET] <c_14> If you find something out, do report back and I'll add the info to the wiki page (or just add it yourself).
[18:01:33 CET] <Mavrik> ew, latest changes changed default PAT/PMT interval in MPEG2-TS
[18:01:44 CET] <Mavrik> Anyone know out of head what the standard required interval is?
[18:46:43 CET] <waressearcher2> saste: hallo
[18:53:18 CET] <Prelude_Zzzzz> hey guys.. can i get a confirmations... " -vf "yadif=deint=interlaced" " this is to deinterlace anythinging that is interlaced right ? so automatic
[18:54:32 CET] <ChocolateArmpits> Prelude_Zzzzz: yes, but only if the frames are marked as interlaced
[18:54:56 CET] <Prelude_Zzzzz> oh ic.. anyway to auto detect
[18:56:12 CET] <ChocolateArmpits> Prelude_Zzzzz: nah what I meant is that all frames marked as interlaced will get deinterlaced, while progressive ones or of another frame scan won't
[18:56:39 CET] <ChocolateArmpits> Usually that's good enough in a controlled environment where things are labelled as they should
[18:56:45 CET] <DHE> the source video codec can mark input frames as interlaced and yadif will read those
[18:58:50 CET] <Prelude_Zzzzz> ok i undestand... so does anyone know one other item that i am ahving a hard time with... motion stutter... basically on some of the videos/comercials when the people move around there is sort of like a motion stutter/blur. I have it set at 30fps and the input is 29.97 but it is as if the comercials is only recorded in 24fps and then its inserting extra repeat frames or something
[18:59:43 CET] <ChocolateArmpits> there's a filter for interlace type detection: idet, it analyzes frames and marks them as appropriate. As a side effect it slows down the filter chain considerably
[19:00:29 CET] <ChocolateArmpits> mostly because it's single threaded I think
[19:04:07 CET] <ChocolateArmpits> Prelude_Zzzzz: that's called telecine, you can use this filter to get rid of it https://ffmpeg.org/ffmpeg-filters.html#pullup-1
[19:05:25 CET] <DHE> does pullup just do nothing for non-telecine'd content? that's my biggest problem - dealing with mixed content
[19:08:12 CET] <ChocolateArmpits> DHE: Can't say, I'm in Europe so I never had to seriously deal with inversing telecine, just this one time I found cool film footage on archive.org that had telecine combing all over it and even then I used prewritten avisynth scripts
[19:21:04 CET] <durandal_1707> DHE: try it
[19:39:24 CET] <Prelude_Zzzzz> hey guys.. check this out " http://pastebin.com/Cm0xVGin " .. tell me.. does anyone see anything wrong with this or how i can improve ffmpeg effeciency or encoding quality ? and 2. the second param only pushes out 1 audio and the input has 2 there. So the first bit rate 2000k shows the 2 audio streams but the second bit rate 1000k only show the one audio stream.. i can't imagine why
[19:50:18 CET] <Prelude_Zzzzz> anyone?
[19:51:44 CET] <waressearcher2> Prelude_Zzzzz: hallo
[19:52:34 CET] <Prelude_Zzzzz> hi
[19:52:44 CET] <Prelude_Zzzzz> hey guys.. check this out " http://pastebin.com/Cm0xVGin " .. tell me.. does anyone see anything wrong with this or how i can improve ffmpeg effeciency or encoding quality ? and 2. the second param only pushes out 1 audio and the input has 2 there. So the first bit rate 2000k shows the 2 audio streams but the second bit rate 1000k only show the one audio stream.. i can't imagine why
[19:52:44 CET] <waressearcher2> Prelude_Zzzzz: wie gehts ?
[19:52:51 CET] <ChocolateArmpits> Prelude_Zzzzz: You need to use bufsize with maxrate
[19:53:12 CET] <Prelude_Zzzzz> why do i need to use bufsize ?
[19:53:19 CET] <Prelude_Zzzzz> ffmpeg should decide on it's own
[19:53:26 CET] <Prelude_Zzzzz> less frequent which is fine
[19:53:34 CET] <Prelude_Zzzzz> that part seems to be working ok
[19:54:10 CET] <Prelude_Zzzzz> what has be blown away is the 2nd part
[19:54:22 CET] <Prelude_Zzzzz> why ffmpeg decides not to output the (fre) audio stream on the second bit rate
[19:55:25 CET] <ChocolateArmpits> Prelude_Zzzzz: maxrate and bufsize work in conjunction. Buffersize determines virtual buffer and maxrate what maximum amount of data can enter that said virtual buffer per second
[19:56:24 CET] <Prelude_Zzzzz> ic
[19:56:32 CET] <ChocolateArmpits> maxrate--- -is not---- the maximum bitrate setting
[19:56:41 CET] <Prelude_Zzzzz> oh i thought it was
[19:56:57 CET] <Prelude_Zzzzz> i want tthe system to jump up and down depending on bw it needs but maintain the average 2M when possible
[19:57:37 CET] <ChocolateArmpits> bw ?
[19:57:53 CET] <Prelude_Zzzzz> bandwidth
[20:00:01 CET] <Prelude_Zzzzz> any idea why the 2nd item ( audio (fre ) missing) is happening ?
[20:00:06 CET] <Prelude_Zzzzz> any pointer would be greatly appreciated
[20:32:40 CET] <Prelude_Zzzzz> i guess nobody knows why only 1 audio stream on the 2nd output :(
[20:32:43 CET] <Prelude_Zzzzz> its a mystery
[21:05:19 CET] <ChocolateArmpits> Is there any way to drop first audio packets before filtering ? The audio packets start a second earlier than video frames in my file and I generate new timestamps with setpts and asetpts
[21:06:25 CET] <ChocolateArmpits> the timestamp expression used doesn't relly on original timestamps
[21:06:43 CET] <ChocolateArmpits> rely*
[21:07:49 CET] <c_14> -ss ?
[21:09:09 CET] <ChocolateArmpits> My input is concat demuxer, it doesn't work with input seeking
[21:09:23 CET] <ChocolateArmpits> I already have seeking applied in the file via inpoint
[21:10:26 CET] <c_14> Use the aselect filter before the asetpts one?
[21:11:45 CET] <ChocolateArmpits> hey that looks promising
[21:13:02 CET] <ChocolateArmpits> does the aselect has access to video frame timestamps ?
[21:13:07 CET] <ChocolateArmpits> have *
[21:13:37 CET] <ChocolateArmpits> from the description seems so
[21:13:42 CET] <ChocolateArmpits> pretty sketchy
[21:14:46 CET] <ChocolateArmpits> ok, so I figure if I compare audio_pts ~ video_pts I could then pass the audio samples ?
[21:15:17 CET] <c_14> The select filter only has access to the timestamps of the stream it operates on.
[21:15:50 CET] <ChocolateArmpits> but the pts or t aren't marked as audio only or video only in the documentation
[21:16:18 CET] <ChocolateArmpits> Or should I interpret it like that ?
[21:17:12 CET] <c_14> [0:v:0]select=<blah>[v] <- this filter has access to the data of the first video stream of the first file, [0:a:0]aselect=<blah>[a] <- this filter has access to the data of the first audio stream of the first file
[21:18:46 CET] <ChocolateArmpits> so basically no access to timestamps of any other stream other than the one being processed ?
[21:21:31 CET] <c_14> yes
[21:32:50 CET] <ChocolateArmpits> Would async used on input drop audio packets before filtering ?
[21:41:03 CET] <abd5932> Hello, I generated a video that works fine on my computer but people on windows/old ubuntu say they see no video, only hear sound... what could be a problem? is 50 fps to high? -i output: http://paste.debian.net/324445/
[21:41:08 CET] <abd5932> Thank you!
[21:42:22 CET] <ChocolateArmpits> abd5932: 4:4:4 encoding isn't very supported
[21:43:04 CET] <ChocolateArmpits> You'll get best support by encoding 4:2:0 chroma at Main profile
[21:43:42 CET] <abd5932> I generated it from lossless format like this: ffmpeg -i SC15_DropsOfH20_video_sound.mp4 -c:v libx264 -c:a copy output.mp4 ... how should this look like to get the right encoding?
[21:43:43 CET] <ChocolateArmpits> high framerate can be a problem on mobile platforms
[21:44:28 CET] <abd5932> ChocolateArmpits: could you say, how I have to encode to address both issues - reduce framerate and switch 4:2:0?
[21:45:56 CET] <ChocolateArmpits> abd5932: ffmpeg -i SC15_DropsOfH20_video_sound.mp4 -vf fps=25,scale=1920:1080 -pix_fmt yuv420p -vprofile main -c:v libx264 -c:a aac -strict -2 output.mp4
[21:46:10 CET] <ChocolateArmpits> it's wise to pair an h264 stream with an aac encoded audio stream in an mp4 file
[21:46:25 CET] <ChocolateArmpits> non-standard resolutions like your input 1600x1000 should be rescaled
[21:46:32 CET] <ChocolateArmpits> the 1920x1080 is wrong though
[21:46:42 CET] <ChocolateArmpits> not the same aspect so you might have to pad
[21:46:46 CET] <JEEB> note: the -2 is IMHO more readable as experimental
[21:46:56 CET] <JEEB> -strict experimental
[21:47:16 CET] <durandal_1707> more typing
[21:47:19 CET] <JEEB> sure
[21:47:27 CET] <JEEB> but who the hell is gonna remember what that -2 means :P
[21:48:01 CET] <JEEB> anyways, if you're going to use the lavc aac encoder, I wholeheartedly recommend grabbing a very recent revision of FFmpeg
[21:48:10 CET] <JEEB> it was vastly improved last month or so
[21:48:56 CET] <abd5932> do I have to scale?
[21:49:34 CET] <ChocolateArmpits> abd5932: well if you want absolute pristine support it's best to scale to closest standard
[21:50:37 CET] <ChocolateArmpits> there's not a lot of them, 1920x1080, 1280x720, 720x576, 720x480 and a few more will never be wrong
[21:51:34 CET] <abd5932> ChocolateArmpits: and how to add padding to place it into 1920x1080?
[21:51:47 CET] <c_14> use the pad filter
[21:52:04 CET] <c_14> You'll probably be fine in most cases if you just switch to 420p
[21:52:08 CET] <c_14> Depends on what you're targeting
[21:52:41 CET] <abd5932> hmm... just want to have usable video...
[21:53:01 CET] <c_14> On desktop computers?
[21:53:04 CET] <abd5932> yes
[21:53:16 CET] <c_14> Just use -pix_fmt yuv420p
[21:53:19 CET] <c_14> The rest should be fine.
[21:53:21 CET] <ChocolateArmpits> abd5932: with padding it should be ffmpeg -i SC15_DropsOfH20_video_sound.mp4 -vf fps=25,pad=384:0,scale=1920:1080 -pix_fmt yuv420p -vprofile main -c:v libx264 -c:a aac -strict -2 output.mp4
[21:53:43 CET] <abd5932> so without rescaling?
[21:54:08 CET] <abd5932> just to go secure... how do I add pad filter to that line?
[21:54:11 CET] <ChocolateArmpits> desktop decoding is usually much more flexible aside from a few settings like the chroma subsampling
[21:54:21 CET] <ChocolateArmpits> there's also the pad filter placed
[21:54:27 CET] <ChocolateArmpits> before scaling
[21:54:48 CET] <ChocolateArmpits> wait the value's wrong
[21:55:31 CET] <ChocolateArmpits> eh it should be pad=192
[21:55:35 CET] <ChocolateArmpits> pad=192:0
[21:56:00 CET] <ChocolateArmpits> wait that's also wrong
[21:56:06 CET] <abd5932> and what background color doest it choose?
[21:56:14 CET] <ChocolateArmpits> default is black
[21:58:27 CET] <ChocolateArmpits> ok pad=1778:0:89:0
[21:58:33 CET] <ChocolateArmpits> this will keep the aspect right
[22:00:45 CET] <abd5932> ChocolateArmpits: thank you! just how do I change the color of the padding?
[22:01:33 CET] <ChocolateArmpits> pad=1778:0:89:0:white pick the color you want https://www.ffmpeg.org/ffmpeg-utils.html#Color
[22:01:42 CET] <ChocolateArmpits> insert it in place of "white"
[22:08:34 CET] <abd5932> ChocolateArmpits: thank you very much!
[22:08:46 CET] <ChocolateArmpits> abd5932: np
[22:48:16 CET] <rfkrocktk> I'm having trouble building FFMPEG with libx264 on Ubuntu 14.04 following the guide here: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[22:48:49 CET] <rfkrocktk> It seems that dynamic linking fails miserably with libx265.so.77: https://unix.stackexchange.com/questions/240809/compiling-ffmpeg-from-source-cannot-find-shared-library
[22:48:54 CET] <rfkrocktk> any ideas on how to resolve?
[22:54:55 CET] <c_14> LD_LIBRARY_PATH=/usr/local/lib ffmpeg
[22:55:43 CET] <rfkrocktk> grep -r local /etc/ld.so.conf.d/
[22:55:57 CET] <rfkrocktk> so it should "just work""
[22:56:24 CET] <rfkrocktk> I'll try it out, gonna have to rebuild FFMPEG with --enable-libx265, started building without.
[22:56:26 CET] <c_14> Rerun ldconfig as root?
[22:56:46 CET] <rfkrocktk> done, rebuilding FFMPEG now
[22:59:30 CET] <rfkrocktk> seems to work now, wtf, why did that fix it?
[23:01:10 CET] <rfkrocktk> I'm going to be packaging FFMPEG for Debian using FPM. Will I need to run ldconfig as part of the installation process? Is this a standard thing?
[23:01:59 CET] <c_14> If the string is already in ld.so.conf.d you shouldn't have to
[23:02:01 CET] <c_14> afaik
[23:02:27 CET] <c_14> Although
[23:02:30 CET] <rfkrocktk> it was already there, as shown above. However, I ran sudo ldconfig, reconfigured, rebuilt, and reinstalled FFMPEG and it worked.
[23:02:32 CET] <c_14> I think you might need to run it after install
[23:02:45 CET] <c_14> Because it updates the cache
[23:02:59 CET] <rfkrocktk> o.O there's a _cache_ for shared libraries?
[23:03:09 CET] <c_14> /etc/ld.so.cache
[23:03:11 CET] <rfkrocktk> thought there was just a path
[23:03:21 CET] <rfkrocktk> MOG.
[23:03:59 CET] <rfkrocktk> Okay, so I guess it just need to call ldconfig as a postinst script.
[23:04:21 CET] <c_14> Any decent package manager should run that for you though.
[23:04:37 CET] <rfkrocktk> Oh, so I wouldn't need to manually script it in the Debian postinst script?
[23:05:38 CET] <furq> why not just adapt the existing debian ffmpeg package
[23:06:20 CET] <rfkrocktk> yeah, probably could. I want all of the goodies though. Plus I want this thing building in a VM, don't want to install useless stuff to my system as part of the build.
[23:06:28 CET] <rfkrocktk> --enable-nonfree
[23:06:36 CET] <c_14> https://www.debian.org/doc/debian-policy/ch-sharedlibs.html
[23:06:39 CET] <c_14> 8.1.1 ldconfig
[23:06:41 CET] <rfkrocktk> I'm on Ubuntu 14.04
[23:07:14 CET] <c_14> Same package manager, probably same guidelines.
[23:07:17 CET] <rfkrocktk> yep: https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-ldconfig
[23:07:35 CET] <rfkrocktk> > Any package installing shared libraries in one of the default library directories of the dynamic linker (which are currently /usr/lib and /lib) or a directory that is listed in /etc/ld.so.conf[60] must use ldconfig to update the shared library system.
[23:07:44 CET] <furq> rfkrocktk: that's why i said adapt
[23:08:09 CET] <rfkrocktk> where is said debian ffmpeg package?
[23:08:17 CET] <furq> https://packages.debian.org/stretch/ffmpeg
[23:08:26 CET] <furq> it's in jessie-backports as well
[23:09:49 CET] <rfkrocktk> looking at the source package, looks pretty darn complicated
[23:10:27 CET] <furq> you should only need to edit debian/rules and debian/control for dependencies
[23:10:31 CET] <rfkrocktk> since I'm making a simple  static binary, I'll just throw together an FPM package script for Debian
[23:11:22 CET] <rfkrocktk> gnarly, this package _compiles_ FFMPEG upon install.
[23:11:58 CET] <furq> ?
[23:13:26 CET] <rfkrocktk> meh, just going to build FPM packages myself, looks way too complicated. I'm a bit new with shared libraries; if I compile FFMPEG with libx265.so.77 in /usr/local/lib, will that FFMPEG binary _always_ look there for the SO?
[23:14:13 CET] <Max-P> Unless told otherwise with LD_LIBRARY_PATH, yes
[23:14:19 CET] <rfkrocktk> ie, if I set --prefix to /vagrant/build so that everything lands nicely in that directory, will that forever screw up my FFMPEG binary and have it look in /vagrant/build for shared libraries?
[23:14:21 CET] <rfkrocktk> ouch
[23:14:40 CET] <Max-P> Well, It actually links to the so name, not a directory in particular I think
[23:14:55 CET] <rfkrocktk> if it links to the name, I think I'm in business.
[23:15:13 CET] <Max-P> You can check to what it links with the ldd command
[23:15:18 CET] <rfkrocktk> Is there a way to compile FFMPEG as a fat binary without the need for the libx265 so?
[23:17:37 CET] <furq> yes but you'll need static libraries of all the dependencies
[23:19:01 CET] <rfkrocktk> ah. I might not mess around with that now, I'll just ship all of the libraries in my deb.
[23:19:22 CET] <Max-P> If you're building a .deb you're much better just making debs for all your dependencies
[23:19:26 CET] <rfkrocktk> I'm not looking to make a Debian-approved-and-perfect package, just one that works reasonably well.
[23:21:23 CET] <rfkrocktk> once I've got a package that just works, I can go through the process of splitting up the dependencies into other debian packages etc.
[23:24:46 CET] <Unknowing> Any guides on how to stream a playlist of video files to twitch on ubuntu server with no video card?
[23:27:33 CET] <Max-P> Unknowing: Something in those lines should work: ffmpeg -f concat -i playlist.txt -re -c copy rtmp://Live-jfk.Twitch.TV/channel/yourkey
[23:27:53 CET] <c_14> -re is an input option
[23:27:55 CET] <rfkrocktk> if you've compiled with --enable-librtmp, it should be https://trac.ffmpeg.org/wiki/StreamingGuide
[23:27:58 CET] <c_14> And you'll need -f flv
[23:28:13 CET] <Max-P> Ah yeah, -re needs to be before -i indeed
[23:28:15 CET] <c_14> You don't need librtmp, ffmpeg has its own rtmp muxer/demuxer
[23:28:20 CET] <rfkrocktk> orly?
[23:28:24 CET] <rfkrocktk> that's good to know
[23:28:35 CET] <rfkrocktk> does it support RTMP(S|T|E) as well?
[23:28:46 CET] <c_14> https://trac.ffmpeg.org/wiki/Concatenate <- explains the concat demuxer
[23:28:46 CET] <c_14> I think so
[23:29:28 CET] <rfkrocktk> thanks for all the help, everyone
[23:43:58 CET] <Unknowing> Woah that works thanks!
[00:00:00 CET] --- Fri Nov  6 2015


More information about the Ffmpeg-devel-irc mailing list