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

burek burek021 at gmail.com
Fri Apr 24 02:05:01 CEST 2015


[00:00:00 CEST] <hydalgo> hi trying to use av_packet_rescale_ts but it is not defined in the ffmpeg 2.1.3 used by chrome-pnacl.. what is the equivalent function in 2.1 version?
[00:05:30 CEST] <hydalgo> my current version for avcodec.h in /usr/local (ubuntu) is 56.34.100, but nacl sdk has version 55.39.101
[00:13:23 CEST] <llogan> kyleogrg: 23.98 is actually 24000/1001 (or the alias ntsc-film) http://ffmpeg.org/ffmpeg-utils.html#Video-rate
[00:55:07 CEST] <hydalgo> exit
[02:24:39 CEST] <Freakshow> question: how necessary is libfreetype for ffmpeg?
[02:25:04 CEST] <Freakshow> stupid ubuntu is tripping on it even with libfreetype6-dev installed
[02:28:31 CEST] <llogan> Freakshow: it is needed for drawtext filter
[02:28:56 CEST] <Freakshow> llogan: and if thats never used?
[02:29:02 CEST] <llogan> then you don't need it
[02:29:05 CEST] <Freakshow> :D
[02:29:15 CEST] <Freakshow> hooray for not needing!
[02:29:44 CEST] <Freakshow> I dont know why its tripping up though, aptitude shows libfreetype6-dev is there& the .pc file is in the correct place
[02:30:52 CEST] <llogan> does the tail of config.log have any clues?
[02:30:57 CEST] <llogan> what is your ffmpeg configure?
[02:31:08 CEST] <llogan> (use a pastebin site if you need to paste multiple lines)
[02:36:19 CEST] <Freakshow> sure. crap& I think I just overwrote it after removing the --enable
[02:36:20 CEST] <Freakshow> let me check
[02:37:47 CEST] <Freakshow> its easy enough for me to reproduce
[03:15:55 CEST] <Freakshow> llogan: false alarm& maybe aptitude didnt install when I thought it did
[03:16:20 CEST] <llogan> i didn't know people still use aptitude
[03:17:07 CEST] <Freakshow> lulz& yeah sometimes its muscle memory really. But after adding it back to the compile it worked this time around.
[03:17:43 CEST] <Freakshow> more like apt<tab> and done
[03:17:45 CEST] <Freakshow> :P
[03:21:54 CEST] <llogan> there is a ubuntu compile guide on the wiki
[08:25:34 CEST] <Raptors> Hey guys
[08:25:55 CEST] <Raptors> How do you set a keyframe interval of 1 second?
[08:26:20 CEST] <Raptors> tried this "-force_key_frames expr:gte(t,n_forced*1)" and -g 30
[08:26:27 CEST] <Raptors> neither worked
[08:26:36 CEST] <Raptors> is it because I'm using -vcodec copy?
[09:17:13 CEST] <durandal_1707> Raptors: yes
[09:25:19 CEST] <jkli> hi guys
[09:25:28 CEST] <jkli> is there any way to speed up the video speed?
[09:25:35 CEST] <jkli> want to play videos in 200% by default
[09:46:56 CEST] <NehezvoltRegelni> Hi! What would you use to have biidrectional audio stream between two linux boxes? (So one's mic on anothers speaker and back)
[10:45:48 CEST] <kevmitch> is there a way to get the ffmpeg command line tool to convert audio to "native" pcm type for the input.
[10:47:03 CEST] <kevmitch> for example if the input is ac3, 48000 Hz, stereo, fltp -> pcm_f[32|64][le|be]
[10:47:43 CEST] <kevmitch> not sure what endianness bit depth is implied by fltp
[10:48:21 CEST] <kevmitch> or dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default)
[10:48:54 CEST] <kevmitch> -> pcm_s16[le|be]
[10:50:12 CEST] <kevmitch> it seems that if I specify wav output i always just does  pcm_s16le regardless of the input
[10:50:50 CEST] <kevmitch> for example that happens with "ffmpeg -c:a libdcadec -i input_with_ac3.mkv -map 0:1 out.wav"
[10:51:01 CEST] <kevmitch> oops, sorry
[10:51:13 CEST] <kevmitch> ffmpeg -i input_with_ac3.mkv -map 0:1 out.wav"
[10:51:22 CEST] <kevmitch> obviously dcadec is not applicable for ac3
[10:52:35 CEST] <kevmitch> or do I have to manually figure this out and specify "ffmpeg -i input_with_ac3.mkv -map 0:1 -c:a pcm_f64le out.wav"
[10:52:55 CEST] <RahulAN> Hii all
[10:53:08 CEST] <RahulAN> i want to grab certain area of scree
[10:53:28 CEST] <RahulAN> *screen in a .png image
[10:53:38 CEST] <RahulAN> is it possible ?
[10:54:18 CEST] <kevmitch> https://trac.ffmpeg.org/wiki/Capture/Desktop
[10:54:57 CEST] <kevmitch> RahuIAN:^
[10:56:34 CEST] <RahulAN> kevmitch, that makes a video
[10:56:46 CEST] <RahulAN> i need to have only a screen shot
[10:57:50 CEST] <NehezvoltRegelni> RahulAN:  man import
[10:58:37 CEST] <RahulAN> NehezvoltRegelni, I guess that is what i need
[10:59:01 CEST] <kevmitch> yeah, just use .png as output and give it the -t "time for one frame"
[10:59:24 CEST] <BtbN> kevmitch, ffprobe -v quiet -show_streams -select_streams a:0 yourinputfile.mkv
[11:00:11 CEST] <kevmitch> BtbN: so basically I have to parse it and figure it out for each case?
[11:00:23 CEST] <BtbN> ffprobe output is easily parsable.
[11:01:13 CEST] <BtbN> ffprobe -v quiet -show_streams -select_streams a:0 -show_entries stream=sample_fmt,sample_rate yourinput
[11:02:12 CEST] <kevmitch> so there's no way to get ffmpeg to do "the right thing" for me
[11:02:28 CEST] <BtbN> ffmpeg sticks to its defaults unless told to do something else.
[11:03:44 CEST] <kevmitch> and does fltp mean 32bit float?
[11:04:47 CEST] <BtbN> samplefmt.h describes it as "float, planar"
[11:08:30 CEST] <kevmitch> flt/fltp -> pcm_f32le, dbl/dblp -> pcm_f64le
[11:22:25 CEST] <capradmar> sorry to insist but I raise a problem here: http://stackoverflow.com/questions/29773692/ffmpeg-crashes-on-startup-upon-release-deployement
[11:25:28 CEST] <vadmeste> Hello everybody. I am streaming a live video using HLS and I want to use two options to read the stream: 1. live, 2. normal video. I've noticed that is enough to add EXT-X-ENDLIST to a the m3u8 file to switch from live mode but I wonder if there is a better method. Any suggestion ?
[11:37:11 CEST] <vadmeste> I can write a shell script which copies the m3u8 file and adds EXT-X-ENDLIST, however ffmpeg is also writing on the same file at the same moment and I wonder if m3u8 copy could be corrupted...
[12:57:55 CEST] <juke> hi
[12:59:04 CEST] <juke> is there a way to control ffmpeg instance via fifo/telnet/something ?
[14:27:23 CEST] <courrier> Hi all! My avconv records artefacs (flashing strips at the top of the image) while grabbing x11 displaying an OpenGL view
[14:27:28 CEST] <courrier> see: http://www.cjoint.com/data3/3DxoNU0oUF8_original.avi
[14:27:58 CEST] <courrier> Here's my command line: avconv -video_size 800x600 -framerate 20 -f x11grab -i :0.0+30,130 -vcodec libx264 -crf 0 -preset ultrafast original.mp4
[14:28:25 CEST] <courrier> I'm using avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
[14:28:59 CEST] <courrier> I tried different video codecs but they all produce the same result
[14:29:17 CEST] <courrier> Any clue to record a non-flashing screen? Thanks :)
[14:35:36 CEST] <sfan5> courrier: did you try ffmpeg instead of avconv?
[14:39:10 CEST] <courrier> sfan5: hum, I guess ffmpeg has been replaced by avconv in Ubuntu repos, I thought it was outdated ^^
[14:39:21 CEST] <courrier> But I aven't tried nope
[14:41:17 CEST] <klaxa|work> a common misconception
[14:51:50 CEST] <courrier> fflogger: oow, thanks
[14:52:08 CEST] <courrier> is there still a working ppa to install it easily?
[14:52:15 CEST] <courrier> the ppa is the answer is dead
[14:56:48 CEST] <klaxa|work> courrier: what about this one? https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media
[15:24:42 CEST] <caiman> Hello, i have a question about extract all scene of my video (but with an interval), my first cmd :
[15:24:42 CEST] <caiman>  ffmpeg -r 1 -i GOPR0016.MP4 -vf select='gt(scene\,0.08),scale=320:240' -an -vsync 0 -qscale:v 2 scene/thumb%03d.jpg
[15:24:43 CEST] <caiman> But i would like a next scene every 10sec for exemple, someone have an idea ?
[15:45:59 CEST] <CooKieLord> Hi guys, anyone available for a question wrt to the libavcodec libs?
[15:46:23 CEST] <CooKieLord> I'm trying to find out what is the proper way to reset a codec (H264 decoder in particular) after I find that it seems to be in an inconsistent state.
[15:58:53 CEST] <Mavrik> CooKieLord, just reopen it?
[15:58:58 CEST] <Mavrik> and close the previous one
[15:59:13 CEST] <CooKieLord> Alright.
[15:59:41 CEST] <CooKieLord> I inherited a codebase, and they're calling the avcodec_flush_buffers(videoDecContext) function
[15:59:49 CEST] <CooKieLord> Is that also correct?
[16:12:31 CEST] <zumba_addict> hi folks, why is my fade in not working? ffmpeg -loop 1 -i dollypic1.jpg -c:v libx264 -t 3 -r 24000/1001 -vf fade=in:0:30 -vf fade=out:42:30  -pix_fmt yuvj444p dollypic1.mp4
[16:16:29 CEST] <c_14> You can't have more than one -vf
[16:16:35 CEST] <c_14> Use a filter_complex instead
[16:16:46 CEST] <c_14> though
[16:16:52 CEST] <c_14> In that case you can probably just chain them
[16:29:16 CEST] <zumba_addict> got it
[16:29:34 CEST] <zumba_addict> how do I do that c_14, do you have an example?
[16:29:51 CEST] <c_14> -vf fade=in:0:30,fade=out:42:30
[16:30:09 CEST] <zumba_addict> ah, my mistake, I used semicolon rather than comma
[16:30:26 CEST] <zumba_addict> that's why i had an error earlier, it's like fade=out is not a filter
[16:31:33 CEST] <zumba_addict> it worked now :) thanks
[16:33:08 CEST] <zumba_addict> and also, is there like a simpler way of calculating for the start and end of fade? I wish all we have to do is mention a duration number where fade will start and end
[16:33:51 CEST] <zumba_addict> i always have to calculate the number of frames that is on my video, then estimate an ending or starting frame plus the duration of the shadow
[16:37:15 CEST] <c_14> Sadly not without scripting since ffmpeg itself doesn't know how many frames there are in the video before it finishes encoding.
[16:38:47 CEST] <Prelude2004c> hey, anyone good at c code ? i need the segment.c workedd on
[17:05:11 CEST] <courrier> klaxa|work: thank you :)
[18:32:43 CEST] <kyleogrg> hi
[18:33:48 CEST] <kyleogrg> I've done some experiments with converting a DVD ISO to x264 MP4
[18:34:03 CEST] <kyleogrg> Or rather, x265 (HEVC)
[18:35:05 CEST] <kyleogrg> The ISO is 4.33GB and the x265 MKV is 2.94GB.
[18:35:35 CEST] <kyleogrg> I used a very low CRF, somewhere between 15 and 18?
[18:35:52 CEST] <kyleogrg> So, does the large file size of the MKV surprise you?
[18:36:11 CEST] <RobotsOnDrugs> no, and i bet it took a really long time to encode
[18:36:22 CEST] <RobotsOnDrugs> x265 is slow
[18:36:34 CEST] <kepstin-laptop> lots of factors affect file size, and 3gb isn't exactly large for a full-length movie with low crf encoding.
[18:36:44 CEST] <kyleogrg> yeeeess.  I used ripbot264, which now has x265 support, and it took 3 computers about 3 days to encode a 3-hour movie.
[18:37:09 CEST] <kepstin-laptop> you're probably encoding at sufficiently high quality that it's doing a very good job of preserving the mpeg2 artifacts from the dvd.
[18:37:17 CEST] <kyleogrg> uh-huh
[18:37:21 CEST] <RobotsOnDrugs> iirc, you probably want a CRF value in the mid-high 20s for x265
[18:37:41 CEST] <RobotsOnDrugs> 18 is a little low even for x264
[18:37:45 CEST] <kepstin-laptop> yeah, it uses a different scale from x264
[18:38:07 CEST] <kepstin-laptop> and x264 uses a different scale between 8bit and 10bit too, dunno if that's true of x265
[18:38:13 CEST] <RobotsOnDrugs> i wouldn't go as low as 18 with x264 unless the source is really, really clean
[18:38:16 CEST] <kyleogrg> so this makes me ask the question:  do i want to have a so-called transparent transfer to MKV?
[18:38:41 CEST] <kyleogrg> most of these DVDs are recorded off TV
[18:38:49 CEST] <kepstin-laptop> kyleogrg, you're the person who has to answer that :)
[18:39:10 CEST] <RobotsOnDrugs> DVDs aren't often even close to clean
[18:39:19 CEST] <kyleogrg> see, i don't want to go overkill.  i was hoping the file sizes would be smaller, but I guess if they are much smaller, i will risk losing quality
[18:39:57 CEST] <RobotsOnDrugs> for x265, try a CRF of 35 on a few hundred frames and decide for yourself
[18:40:19 CEST] <kepstin-laptop> yeah, you'll just have to experiment and see what you decide on.
[18:40:24 CEST] <kyleogrg> yes
[18:40:37 CEST] <RobotsOnDrugs> also take a look at denoising filters
[18:41:26 CEST] <RobotsOnDrugs> i personally am ignoring x265 for the time being since it is so slow
[18:41:45 CEST] <kyleogrg> Is the CRF value fairly objective?  For instance, is CRF 18 generally transparent no matter the quality of the source?
[18:42:35 CEST] <RobotsOnDrugs> that's hard to say with x265 since they don't have a ton of psychovisual stuff yet iirc
[18:43:33 CEST] <kyleogrg> okay, how about x264?
[18:44:03 CEST] <RobotsOnDrugs> the quality of the source matters
[18:44:38 CEST] <RobotsOnDrugs> you're not going to notice a slight softness if the source has a ton of MPEG2 artifacts
[18:45:19 CEST] <__jack__> kyleogrg: you are looking for lossless aren't you ?
[18:46:05 CEST] <RobotsOnDrugs> and for clean sources, it can get very subjective since certain kinds of artifacting aren't necessarily noticeable as such, especially with psy optimizations
[18:46:09 CEST] <kyleogrg> Not true lossless; just the highest quality at a reasonable file size.  (I know that's a vague goal.)
[18:46:37 CEST] <RobotsOnDrugs> that is, you might notice a difference if you really looked, but wouldn't necessarily be bothered by it
[18:47:28 CEST] <kyleogrg> well, i am not a connoisseur.  i'll probably not be bothered by tiny things which would bother ffmpeg users
[18:48:09 CEST] <kyleogrg> so i'm looking for settings which normal people generally will accept
[18:48:25 CEST] <__jack__> default crf is good then
[18:48:35 CEST] <__jack__> default everything, in fact
[18:48:52 CEST] <__jack__> just ffmpeg -i source -c:a blabal -c:s clabla -c:v libx264|5 output.mkv
[18:49:10 CEST] <kyleogrg> what's c:s?
[18:49:21 CEST] <c_14> subtitle codec
[18:49:38 CEST] <kyleogrg> ffmpeg can extract dvd subs?
[18:52:20 CEST] <__jack__> can't it ?
[18:52:40 CEST] <kyleogrg> okay, these were my settings for dvd-to-x265: placebo, crf 20, detelecine.  output mkv size was 68% of dvd size.
[18:53:10 CEST] <kyleogrg> __jack__: oh, i dunno.  i actually never tried
[18:53:59 CEST] <kyleogrg> that 68% size compression seems far too high.  i wonder how much it will be reduced with default settings
[18:55:35 CEST] <kyleogrg> say, at youtube settings
[18:56:26 CEST] <kyleogrg> well, i guess youtube doesn't use x265.  but at youtube *quality* settings
[18:57:12 CEST] <c_14> Youtube quality is pretty terrible
[18:57:13 CEST] <relaxed> maybe you needed to deinterlace? what's the output's framerate?
[18:59:13 CEST] <kyleogrg> relaxed: I detelecined, so the dvd was 30i and the output is 23.976p
[19:07:30 CEST] <sfan5> kyleogrg: how long does an encode with placebo preset take?
[19:07:47 CEST] <kyleogrg> sfan5: incredibly long
[19:07:54 CEST] <sfan5> how many days?
[19:08:17 CEST] <kyleogrg> as i said earlier, it took 3 computers 3 days to encode a 3-hour dvd
[19:08:45 CEST] <sfan5> sorry, didn't read all of the stuff
[19:11:33 CEST] <kyleogrg> no it's ok
[19:11:55 CEST] <kyleogrg> i wonder if it will become faster in the future
[19:12:24 CEST] <__jack__> placebo is known to be deadly
[19:12:47 CEST] <__jack__> very bad "computing power" vs "quality/bitrate gain"
[19:16:31 CEST] <relaxed> I would stick with veryslow
[19:17:00 CEST] <kyleogrg> __jack__: yeah.  somebody on this channel recommended placebo for x265
[19:17:16 CEST] <kyleogrg> that's probably just an opinion
[19:17:24 CEST] <c_14> I don't think I've ever heard anybody recommend placebo.
[19:17:36 CEST] <kyleogrg> but he thought that it wasn't worth using over x264 unless placebo was used
[19:17:44 CEST] <Mavrik> Yeah, whoever recommended placebo was on drugs
[19:17:50 CEST] <Mavrik> It's named PLACEBO for a reason :P
[19:18:11 CEST] <kyleogrg> yeah, haha
[19:18:23 CEST] <kyleogrg> i wonder how much faster veryslow would be
[20:15:50 CEST] <kyleogrg> hey
[20:16:09 CEST] <kyleogrg> I know that with x264 you can target an output file size with two-pass mode.
[20:16:46 CEST] <kyleogrg> I'd like to encode a large batch of videos and target a batch size.
[20:16:52 CEST] <kyleogrg> How??
[20:17:41 CEST] <c_14> two_pass_bitrate_per_file = (batch_size / num_videos)
[20:18:12 CEST] <kyleogrg> yeah, but the shorter videos will end up being higher quality than the longer videos
[20:18:22 CEST] <kyleogrg> the video durations vary quite a bit
[20:19:10 CEST] <c_14> crf with maximum bitrate = (batch-size / num_videos)
[20:19:34 CEST] <kyleogrg> hmmm
[20:19:37 CEST] <c_14> Though, if you want to reach the batch size, you'll have to keep a running count for what to use as the video maxrate
[20:19:51 CEST] <c_14> Otherwise you might undershoot due to the short videos
[20:21:17 CEST] <kyleogrg> What about: two_pass_bitrate_per_file = (batch_size / total_minutes_of_all_videos) * minutes_of_this_video
[20:21:53 CEST] <c_14> It would have to be seconds
[20:21:59 CEST] <c_14> but that could work
[20:22:06 CEST] <kyleogrg> yeah
[20:22:15 CEST] <BtbN> you could concat all the input videos, and later split them without re-encode.
[20:22:33 CEST] <kyleogrg> c_14: how could i get the total seconds?
[20:22:38 CEST] <kyleogrg> tbN:
[20:22:40 CEST] <c_14> You can only split on keyframes though
[20:22:51 CEST] <kyleogrg> BtbN: that would be a very very very long video
[20:23:09 CEST] <c_14> ffprobe all the input files and grab the duration (and hope that the duration is accurate)
[20:23:12 CEST] <BtbN> But you'd get the exact size you want.
[20:23:40 CEST] <BtbN> You could also put some index file next to it, so you actualy have only that one huge video. That depends on what you want to do though.
[20:23:42 CEST] <kyleogrg> BtbN: i wouldn't have thought of that, but it could work
[20:24:01 CEST] <BtbN> And it also depends on all input videos beeing similar enough to just concat them.
[20:24:05 CEST] <kyleogrg> c_14: is there a way to get the exact duration?
[20:24:29 CEST] <kyleogrg> BtbN: yes, that's true
[20:24:31 CEST] <Raptors> durandal_1707, is there a way to force keyframe interval with -vcodec copy?
[20:24:40 CEST] <c_14> ffmpeg -i video -f null /dev/null and then check the printed duration at the end; ffprobe -count_frames might be able to do something as well
[20:24:47 CEST] <c_14> Raptors: no
[20:24:54 CEST] <Raptors> :(
[20:24:58 CEST] <BtbN> Raptors, how exactly do you intend to make new keyframes appear without re-encoding?
[20:25:09 CEST] <kyleogrg> c_14: hmm, i wonder if count frames is more accurate
[20:25:23 CEST] <Raptors> BtbN, can you re-encode with the same settings as the source file?
[20:25:31 CEST] <Raptors> is there a setting for that?
[20:25:34 CEST] <BtbN> No.
[20:25:39 CEST] <Raptors> :(
[20:25:43 CEST] <BtbN> And there is no way to do lossless re-encode.
[20:25:46 CEST] <c_14> kyleogrg: well, count_frames by itself won't help. Because the frames don't have to have a constant duration. You'd have to combine it with something else.
[20:25:49 CEST] <BtbN> Unless you actualy do encode to a lossless format.
[20:25:53 CEST] <Raptors> well I don't really mean lossless
[20:26:17 CEST] <Raptors> I mean use the same bitrate, codec and whatnot but force keyframes
[20:26:37 CEST] <BtbN> As there is no way to know what settings were used to encode something, that's kind of impossible.
[20:26:41 CEST] <kyleogrg> c_14: so i can't just do frame_count / frame_rate?
[20:27:04 CEST] <Raptors> Couldn't you look at the settings of the file?
[20:27:07 CEST] <c_14> kyleogrg: only if you are 100% sure the input is entirely cfr
[20:27:13 CEST] <Raptors> err
[20:27:15 CEST] <BtbN> There are no settings saved anywhere.
[20:27:21 CEST] <Raptors> codec information
[20:27:31 CEST] <Raptors> like it shows on vlc
[20:27:42 CEST] <BtbN> It's not possible to get the encoding parameters from that.
[20:27:53 CEST] <Raptors> alright. Thanks for the info
[20:27:57 CEST] <BtbN> Could be vbr, could be cqp, could be min/max cp, crf with maxrate, ...
[20:28:05 CEST] <kyleogrg> c_14: hmm, it may be in my case.  the input videos are dv-avi
[20:29:22 CEST] <kyleogrg> I assume that DV AVI is cfr
[20:30:12 CEST] <kyleogrg> but i'm confused.  isn't there some way to get the precise duration?  when i open an .mp4 in VLC, it says the duration
[20:30:31 CEST] <c_14> Which may or may not actually be accurate.
[20:30:58 CEST] <c_14> Depending on various things.
[20:31:04 CEST] <kyleogrg> ok
[20:31:32 CEST] <c_14> You can use it. It should be accurate enough most of the time. It'll just sometimes not be accurate. And that'll break things.
[20:31:46 CEST] <kyleogrg> but whether or not the duration is accurate, the video *has* a certain length, right?  i mean, it has a certain number of frames which will play
[20:32:07 CEST] <c_14> sure
[20:32:18 CEST] <c_14> The sum of all the durations of each frame.
[20:32:23 CEST] <kyleogrg> c_14: sure... and it's probably close enough for my purposes, i'm thinking
[20:32:58 CEST] <kyleogrg> ahh... and to get that, you'd need to (slowly) calculate that
[20:33:05 CEST] <kyleogrg> which VLC probably doesn't do
[20:33:40 CEST] <c_14> Most containers store a "duration" field. Whether or not it's accurate depends on the muxer, and whether or not it was cut/etc.
[20:33:53 CEST] <kyleogrg> ok
[20:34:34 CEST] <kyleogrg> i had never thought about that.  i thought duration was actual duration, calculated when the file was opened in the player
[20:34:56 CEST] <kyleogrg> not just part of the metadata.  interesting
[22:43:25 CEST] <kyleogrg> for x264, why is encoding 30i to 30p more efficient than 30i to 30i?  that is, why is deinterlacing more effecient than making an interlaced x264 file?
[22:56:20 CEST] <kepstin-laptop> kyleogrg, because interlaced content is more complex for the video encoder to deal with.
[22:58:29 CEST] <kyleogrg> hmm, but isn't 30i fewer fields, or less visual data, than 30p?
[22:58:55 CEST] <kyleogrg> in a sense, isn't 30p twice the amount of data?
[22:58:57 CEST] <kepstin-laptop> here's the catch - it's actually 60i, not 30i
[22:58:57 CEST] <kyleogrg> if that makes sense
[22:59:08 CEST] <kepstin-laptop> there's more temporal data, less spatial data
[22:59:18 CEST] <kepstin-laptop> and the spatial data has gaps in it
[22:59:41 CEST] <kyleogrg> ah
[23:00:00 CEST] <kyleogrg> then what about going from 60i to 60p?
[23:00:36 CEST] <kyleogrg> is that a good idea?  or would you do 60i to 30p
[23:01:10 CEST] <kepstin-laptop> e.g. with yadif=1 ? for some sources that can make sense, where there's a lot of motion that you'd like to preserve
[23:01:58 CEST] <kyleogrg> uhhuh
[23:02:05 CEST] <kepstin-laptop> it'll probably have lower storage efficiency than 60i, but it really depends a lot on the video content.
[23:02:35 CEST] <kyleogrg> you mean 60i x264 would be more efficient than 60p x264?
[23:02:42 CEST] <kepstin-laptop> and the quality of the deinterlacer used
[23:02:48 CEST] <kepstin-laptop> it depends, maybe, maybe not
[23:02:57 CEST] <kyleogrg> interesting
[23:03:05 CEST] <kepstin-laptop> you'd have to try it on your video to see
[23:03:18 CEST] <kyleogrg> they would generally be played in vlc, which has good (I think) deinterlacers
[23:04:17 CEST] <kepstin-laptop> storing video interlaced might be good if you're trying to preserve video data as much as possible, and expect later deinterlacers to get better
[23:04:30 CEST] <kepstin-laptop> but if you're doing that, you should use -c copy rather than reencode the video :)
[23:05:00 CEST] <kyleogrg> yeah
[23:05:12 CEST] <kyleogrg> but then why even copy?  i already have the source
[23:07:50 CEST] <kepstin-laptop> exactly.
[23:08:43 CEST] <kepstin-laptop> the only reason you have to do anything reencoding your video is if either you want to deinterlace it, or you're nearly out of space and are critically short on funds to buy a new hard drive
[23:14:03 CEST] <kyleogrg> i'm trying to think of a case where encoding to 60p is more efficient than 60i
[23:15:51 CEST] <lordkrondor> i've tested mcdeint to take 1080i59.94 to 1080p59.94 & 1080i50 to 1080p50
[23:15:54 CEST] <lordkrondor> looks pretty decent
[23:16:14 CEST] <kepstin-laptop> lordkrondor, using it in combination with yadif=1?
[23:16:51 CEST] <lordkrondor> you have to, ya so before mcdeint you do yadif=3:1 for bff or sd, or yadif=3:0 for HD or tff
[23:17:17 CEST] <lordkrondor> then do mcdeint=1:0:10 for tff and mcdeint=1:1:10 for bff I think
[23:17:23 CEST] <kepstin-laptop> lordkrondor, how did the yadif+mcdeint compare to yadif alone?
[23:17:36 CEST] <lordkrondor> much better, but very slow to process
[23:17:40 CEST] <lordkrondor> 5fps for HD
[23:18:02 CEST] <lordkrondor> makes a difference for things that have sharp lines like lasers
[23:18:05 CEST] <kepstin-laptop> hmm, last time I tried, I didn't really see much visible improvement. I should poke at it again.
[23:18:22 CEST] <kepstin-laptop> yeah, yadif has issues with some diagonal sharp edges
[23:18:35 CEST] <kyleogrg> well, wouldn't 60p be twice as many fields, and so more data, as 60i?
[23:18:53 CEST] <lordkrondor> to be honest, with x264, its not that much more
[23:18:59 CEST] <kyleogrg> is it just doubling the fields to make it 60p?
[23:19:12 CEST] <lordkrondor> its doing motion compensation to create a new frame from each field
[23:19:12 CEST] <kepstin-laptop> kyleogrg, yes, but the advantage is that the data interpolated by the deinterlacer can be used in predictions for the next frame.
[23:19:14 CEST] <lordkrondor> but its looks amazing
[23:19:39 CEST] <kepstin-laptop> as opposed to encoding the interlaced stuff directly, where the encoder has to just work with missing data.
[23:20:33 CEST] <kyleogrg> but in theory, to have a smaller output video, i could encode 60i to 60i, and then use a good deinterlacer when viewing?
[23:21:01 CEST] <kepstin-laptop> kyleogrg, I think it really depends on what's in your video. you'd have to try and see.
[23:21:04 CEST] <lordkrondor> good luck getting mcdeint to filter in realtime
[23:21:05 CEST] <lordkrondor> ;)
[23:21:29 CEST] <kyleogrg> kepstin-laptop: yeah, i guess i'll have to experiment
[23:22:03 CEST] <kepstin-laptop> e.g. if a section video is completely static, then x264 actually will encode the interlaced video as progressive.
[23:22:04 CEST] <kyleogrg> lordkrondor: so the "ideal" deinterlacing solution is too slow for realtime, hence should be applied during encoding?
[23:22:32 CEST] <lordkrondor> from my experience in my de-interlace testing, yes. i'd test it out both ways and see for yourself
[23:22:42 CEST] <lordkrondor> and that's purely using mcdeint to get the best results
[23:23:09 CEST] <kepstin-laptop> of course, computers keep getting faster, and some of the deinterlacing filters using graphics card processing with motion compensation are quite good
[23:23:26 CEST] <lordkrondor> ya if someone enhanced mcdeint to use a gpu, I bet that would be pretty neat
[23:25:00 CEST] <kyleogrg> what do you think is the best deinterlacer?
[23:25:15 CEST] <lordkrondor> Snell Alchemist OD ;)
[23:25:24 CEST] <lordkrondor> but thats 10k pounds for a license
[23:25:53 CEST] <kyleogrg> wha?
[23:25:57 CEST] <lordkrondor> commercial software
[23:26:00 CEST] <kyleogrg> yeah
[23:26:08 CEST] <kyleogrg> how about the best free one
[23:26:08 CEST] <lordkrondor> I downloaded a test license to see how it fared
[23:26:13 CEST] <kyleogrg> and?
[23:26:24 CEST] <lordkrondor> it was really nice hah
[23:26:31 CEST] <lordkrondor> but in ffmpeg, I like mcdeint best
[23:26:45 CEST] <lordkrondor> yadif if you want speed
[23:26:57 CEST] <kyleogrg> you mean yadif+mcdeint is best?
[23:27:16 CEST] <lordkrondor> well ot use mcdeint, you have to use yadif to pass each field as its own frame
[23:27:27 CEST] <kepstin-laptop> I recall that back in the mencoder days you could use tfields+mcdeint instead, but the yadif one worked better.
[23:27:30 CEST] <lordkrondor> yadif on its own is pretty nice
[23:28:36 CEST] <kyleogrg> how could alchemist od be so good?
[23:28:47 CEST] <kyleogrg> i mean, is deinterlacing that complicated?
[23:29:49 CEST] <lordkrondor> I think so.. uses alot of motion estimation to create missing video to take one field to make a frame, or interpolate the two fields into a frame and accomodate for the difference in the case of extreme motion
[23:29:58 CEST] <kepstin-laptop> kyleogrg, imagine you had a painting someone drew, and someone ruined it by taking a brush and drawing black stripes across it. your job is to figure out what used to be under the stripes and repaint it.
[23:29:59 CEST] <kepstin-laptop> yes, it's complicated :)
[23:30:37 CEST] <kyleogrg> yeah
[23:30:38 CEST] <kyleogrg> haha
[23:30:51 CEST] <kyleogrg> it has to invent, or infer, the missing lines
[23:31:51 CEST] <kepstin-laptop> yep. and it has some advantages, it knows what is in those missing lines on the previous and next frames - but that doesn't help if there's motion, unless you know what's moving where...
[23:32:36 CEST] <kepstin-laptop> the easiest deinterlacing job is when nothing in the frame is moving, then you can just re-use the missing lines from a previous frame and everything will look perfect
[23:32:43 CEST] <kyleogrg> yes
[23:32:47 CEST] <kepstin-laptop> but movement is hard :)
[23:33:00 CEST] <kyleogrg> yes, i can imagine
[23:33:07 CEST] <kyleogrg> is ffmpeg used for commercial content?
[23:33:29 CEST] <kyleogrg> let's say there's an indie filmmaker who wants to encode his movie and sell dvds
[23:33:41 CEST] <kepstin-laptop> kyleogrg, I imagine it is used in a number of places for commercial content; but i suspect less for tv broadcast.
[23:34:01 CEST] <kyleogrg> ok, but it's permitted?
[23:34:10 CEST] <kepstin-laptop> well, yes...
[23:35:31 CEST] <kyleogrg> what about the non-free aspects of ffmpeg?
[23:35:32 CEST] <kepstin-laptop> it's up to you and your lawyer to handle doing any patent licensing that may be appropriate in your jurisdiction, but the software itself has no restrictions against using it for commercial video.
[23:35:36 CEST] <kyleogrg> i guess they're... non-free?
[23:36:07 CEST] <kepstin-laptop> the "non-free" option in ffmpeg refers to enabling a combination of things that results in a ffmpeg that you can't legally distribute
[23:36:23 CEST] <kepstin-laptop> nothing stopping you from using it however you like tho, as long as you don't distribute it.
[23:36:47 CEST] <kyleogrg> could i encode using libfdk_aac and sell that video?
[23:38:00 CEST] <kepstin-laptop> as far as the ffmpeg devs are concerned, yes
[23:38:16 CEST] <lordkrondor> from what i've been told in regards to mpeg-la stuff (x264) - if you sell or offer the content as part of a subscription, I think you need to work out a license agreement.
[23:38:33 CEST] <kyleogrg> yeah
[23:38:59 CEST] <kepstin-laptop> but that would be just as true if you were using e.g. the built-in aac encoder rather than libfdk_aac.
[23:40:16 CEST] <kyleogrg> right
[23:43:20 CEST] <kyleogrg> so ffmpeg employs reverse engineering for most codecs
[23:43:28 CEST] <kyleogrg> does this cause legal problems?
[23:45:51 CEST] <kepstin-laptop> ask a lawyer. that said, the reverse engineering mostly applies to somewhat uncommon codecs that don't have standards.
[23:46:44 CEST] <kyleogrg> ok
[23:48:05 CEST] <lordkrondor> or prores which apple won't license to anyone they don't feel like
[00:00:00 CEST] --- Fri Apr 24 2015


More information about the Ffmpeg-devel-irc mailing list