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

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


[01:37:09 CEST] <necka> hi, i need to compil ffmpeg for opencv, how can i do it clean ?
[02:08:26 CEST] <ac_slater_> necka: 1) do you absolutely need to compile it yourself?
[02:08:53 CEST] <ac_slater_> 2) ffmpeg has some pretty nice docs... a basic `./configure` and `make` will build everything
[02:23:45 CEST] <ac_slater_> necka: your best bet is to use your distro's version or try some ./configure calls to see how it works
[02:28:32 CEST] <necka> i get this error when i compile opencv : [ 38%] modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:169: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o' failed
[02:28:49 CEST] <necka> it is related to ffmpeg
[02:29:35 CEST] <necka> but i dont know how and why and i found nothing on web
[02:35:08 CEST] <necka> according to : http://stackoverflow.com/questions/28319376/installing-opencv-in-ubuntu-14-10
[02:35:30 CEST] <necka> This is because libav has changed API and removed some stuff it's still used in OpenCV. Ubuntu 14.10 uses libav API version 11 and OpenCV still uses API version 9. The problem is that CODEC_ID_* was changed to AV_CODEC_ID_*.
[02:36:10 CEST] <necka> so i have to make WITH_FFMPEG=OFF ...
[02:49:31 CEST] <Infiltrator> c_14 et al: Sorry; got called away yesterday.  The last ~10 lines were futexes, with a write before that.  And yeah, I'm spawning it in a shell.
[02:50:42 CEST] <Infiltrator> I'm doing $nice -20 strace ffmpeg blah
[02:52:57 CEST] <Infiltrator> I'll run it over ssh next time (later today) so that I can paste it up.
[04:07:09 CEST] <roboman2444> how do i fix alsa buffer xrun when trying to record mic input?
[10:21:12 CEST] <Ders> I've encoded a video with -vcodec ffv1 and this gives me the right output (had desaturated output before) but the file is much larger since it's uncompressed. Is there a way to make it smaller?
[10:25:53 CEST] <Mavrik> ffv1 is certanly compressed
[10:25:55 CEST] <Mavrik> it's just losless
[10:26:33 CEST] <Ders> I might've misunderstood that then. Still, is there a way to keep the output size lower?
[10:47:49 CEST] <ruby_on_tails> my monitor resolution is 1360*768, but i see that literally no video editing software has such a profile, the nearest is 1366*768 am i on a weird monitor?
[10:48:35 CEST] <Ders> yes you are on a weird monitor. Never seen that resolution
[10:49:06 CEST] <ruby_on_tails> you mean my monitor is 6px short? these monitors are popular
[10:49:21 CEST] <ruby_on_tails> i have like 6 of these
[10:50:56 CEST] <Ders> weird. I've never seen one of those (in Europe). Maybe it's just a resolution that's not used for video editing? Do you want your video to export to this resolution?
[10:51:47 CEST] <Mavrik> hrmf, yeah that strange
[10:51:54 CEST] <Mavrik> 1366x768 is the common one, even on TVs
[10:52:00 CEST] <Mavrik> usually sold as "720p" for some reason
[10:52:41 CEST] <ruby_on_tails> i do some screencasting, it always gets blurred if i import it to any video editing software
[10:52:55 CEST] <ruby_on_tails> i am so tired after months of fiddling around with so many softwares and programs, nothing works
[10:53:09 CEST] <ruby_on_tails> i just want my videos to be criso
[10:53:10 CEST] <ruby_on_tails> crisp
[10:53:20 CEST] <Ders> You should be able to just set your video software to 1366x768 and import your footage. You will have some black borders though
[10:53:57 CEST] <Ders> That's how I would do it in Adobe Premiere
[10:54:02 CEST] <Mavrik> ruby_on_tails, uhm, why would it be blurred?
[10:54:05 CEST] <ruby_on_tails> the screencast in itself is recorded in ogv format which is crystal clear, when i convert it to mp4 transitions become horrible, when i further import the mp4 to any software and export, everything is a bit blurred, specially text
[10:54:08 CEST] <Mavrik> ruby_on_tails, are you resampling video? why?
[10:54:20 CEST] <Mavrik> ruby_on_tails, do you have low bitrate?
[10:54:25 CEST] <ruby_on_tails> Mavrik: no
[10:54:41 CEST] <Mavrik> no about what?
[10:54:51 CEST] <Mavrik> your resolution isn't causing the blurring, your encoding settings are
[10:55:02 CEST] <ruby_on_tails> no - low bitrate
[10:55:51 CEST] <Mavrik> what does that mean?
[10:55:55 CEST] <Mavrik> what ARE your ffmpeg settings?
[10:56:42 CEST] <ruby_on_tails> 1 min getting everything
[10:58:44 CEST] <iive> 1360x768 is popular laptop screen resolution.
[10:59:26 CEST] <iive> and the few pixels off causes problems in more than one place...
[10:59:40 CEST] <iive> just use 1280x720
[10:59:57 CEST] <Mavrik> that's going to make everything blurry.
[11:02:08 CEST] <ruby_on_tails> http://pasteboard.co/2gem89xt.png original screen http://pasteboard.co/2gel88uX.png screenshot from video - if you look at the "what are your..." at the bottom left, some text is crisp, some is not, weird, ffprobe of the video: http://pastebin.com/raw.php?i=vNG85pj9
[11:02:53 CEST] <iive> depends... if monitor tries to upscale it, or just adds 86x48 black pixels
[11:03:17 CEST] <Mavrik> ruby_on_tails, first of all
[11:03:23 CEST] <Mavrik> ruby_on_tails, MPEG4 simple profile is your first issue there
[11:03:33 CEST] <Mavrik> and it's probably causing the blurring due to low bitrate
[11:03:37 CEST] <ruby_on_tails> what should i use instead?
[11:03:40 CEST] <Mavrik> H.264 at least
[11:04:02 CEST] <iive> libx264 is the encoder for that
[11:04:48 CEST] <Mavrik> ruby_on_tails, some software also calls it "MPEG4-AVC"
[11:06:14 CEST] <iive> Ders: ffv1 is lossless, this means that the input and output are binary identical. Most video codecs that provide good compression do it by throwing data away. just doing it in a way that is hard to notice by humans (in the best case).
[11:06:46 CEST] <ruby_on_tails> Mavrik: iive: http://pastebin.com/raw.php?i=khQfdyA9 this is similar
[11:07:09 CEST] <ruby_on_tails> i chose 12000 bitrate in the software(kdenlive) but the bitrate came down to 528 weird
[11:08:00 CEST] <ruby_on_tails> http://pasteboard.co/2geSHAQ3.png this is the software render options screen
[11:11:03 CEST] <iive> ruby_on_tails: do you have idea what are the units of the bitrate? 12000 might be 12kbps ...
[11:11:23 CEST] <iive> and you'd be getting 528 because it can't go lower.
[11:14:10 CEST] <ruby_on_tails> its 12000k
[11:17:35 CEST] <iive> can you find out what are the exact option that the convertion program is called?
[11:18:21 CEST] <ruby_on_tails> checking
[11:27:15 CEST] <ruby_on_tails> iive: Mavrik: http://pastebin.com/raw.php?i=3NHggrat this is the params the software uses
[11:27:49 CEST] <ruby_on_tails> and the output video ffprobe for those params used is http://pastebin.com/raw.php?i=khQfdyA9
[11:28:10 CEST] <Mavrik> for static picture it's reasonable that bitrate falls
[11:28:17 CEST] <Mavrik> X264 will not do stuffing if there's nothing to encode
[11:28:23 CEST] <Mavrik> (unless you tell it to)
[11:28:37 CEST] <Mavrik> also those options look rather obsolete, but they shouldn't really cause issues
[11:28:49 CEST] <ruby_on_tails> yes the video has a lot of static images, its more of a presentation with transitioning slides
[11:28:51 CEST] <Mavrik> (also threads=1 ? why? )
[11:28:58 CEST] <ruby_on_tails> i can chose threads
[11:29:06 CEST] <ruby_on_tails> i can increase it here http://pasteboard.co/2geSHAQ3.png
[11:29:09 CEST] <Mavrik> ruby_on_tails, then it's not unreasoable for X264 to drop the bitrate.
[11:29:10 CEST] <ruby_on_tails> i jused used the defaults
[11:29:30 CEST] <Mavrik> is your picture still blurry?
[11:29:39 CEST] <ruby_on_tails> but why is the text blurred? http://pasteboard.co/2gel88uX.png and why is some of the test crisp? due to the 6px stretching in 1360 vs 1366?
[11:29:58 CEST] <ruby_on_tails> yes its still blurry
[11:30:41 CEST] <Mavrik> video shouldn't be stretched
[11:30:52 CEST] <Mavrik> since ffprobe shows it's 1360x768
[11:31:02 CEST] <ruby_on_tails> then why does the text behave like that?
[11:31:21 CEST] <Mavrik> ruby_on_tails, your encoding software also sets AR to 16:9
[11:31:25 CEST] <Mavrik> and your video isn't
[11:31:29 CEST] <Mavrik> can you tell it to not set that?
[11:31:51 CEST] <ruby_on_tails> Mavrik: i cant do that
[11:33:22 CEST] <Mavrik> ruby_on_tails, then I guess there's the issue :/
[11:33:34 CEST] <Mavrik> ruby_on_tails, can you add black bands to make the video 1366x768 before encoding?
[11:34:19 CEST] <iive> first, i see some things that shouldn't be there, e.g. minrate, qmin/qmax. but there is high chance that they are simply ignored.
[11:34:59 CEST] <iive> also, you gave a pastebin from avprobe, this indicating you are using the ffmpeg's fork under the name of libav.
[11:35:25 CEST] <Mavrik> iive, it's kdenlive
[11:35:32 CEST] <Mavrik> it probably uses encoding parameters from 1992 -_-
[11:35:33 CEST] <iive> i'm not quite sure if they still support -vb for setting video bitrate. they changed syntax to e.g. -b:v
[11:35:53 CEST] <Mavrik> for some reason that software insists on setting their own crappy encoding parameter instead of using x264 preset
[11:36:27 CEST] <iive> most of these are ignored. e.g. *cmp=2
[11:40:19 CEST] <ruby_on_tails> Mavrik: is there any aspect ratio for 1360*768 monitors i can set?
[11:40:23 CEST] <ruby_on_tails> i cant find anything for it
[11:40:42 CEST] <seasc> -scale 1280x720
[11:40:56 CEST] <Mavrik> ruby_on_tails, now you're asking me to support kdenlive
[11:41:03 CEST] <Mavrik> never used it because it was crappy due to issues you explain
[11:41:05 CEST] <ruby_on_tails> sorry
[11:41:25 CEST] <Mavrik> ruby_on_tails, on most encoding software you just don't set AR and it won't resize video
[11:41:27 CEST] <seasc> @ ruby_on_tails, did you try -scale 1280x720 yet?
[11:41:36 CEST] <Mavrik> but I don't think kdenlive supports that
[11:41:40 CEST] <Mavrik> seasc, what will that accomplish?
[11:41:50 CEST] <Mavrik> besides resampling video to smaller resolution and making everyhing blurry?
[11:42:01 CEST] <seasc> Mavrik, when i record, i get THAT resolution, rather than my native screen res
[11:42:09 CEST] <Mavrik> ruby_on_tails, can you avoid using kdenlive? transcode directly?
[11:42:18 CEST] <Mavrik> seasc, well his input is 1360x768
[11:42:35 CEST] <seasc> Just used hdr since he said his screen wsas sold as such :p
[11:42:56 CEST] <seasc> But right, use:  "-scale 1366x768" then
[11:42:57 CEST] <ruby_on_tails> Mavrik: i did, i used arista transcoder, and it converts my ogv to mp4 perfect just one issue, the transitions get very glitchy like http://pasteboard.co/2gfbYGF0.png notice the dots around text
[11:43:09 CEST] <ruby_on_tails> seasc: wont that blur it anyways?
[11:43:17 CEST] <Mavrik> ruby_on_tails, why not grab the static ffmpeg build
[11:43:18 CEST] <Mavrik> and just fo
[11:43:26 CEST] <ruby_on_tails> Mavrik: my input is an ogv file
[11:43:32 CEST] <ruby_on_tails> which comes from recordmydesktop
[11:43:43 CEST] <Mavrik> ffmpeg -i <video> -codec:v libx264 -crf 21 -codec:a aac -b:a 128k output.mp4 ?
[11:43:51 CEST] <seasc> ruby_on_tails, hasnt for me yet.
[11:44:05 CEST] <seasc> Making it smaller is *never* an issue, upscaling however is
[11:44:08 CEST] <ruby_on_tails> Mavrik: i used this "ffmpeg -i first_record.ogv -c:v libx264 -preset veryslow -crf 22 -c:v libmp3lame -qscale:a 2 -ac 2 -ar 44100 first_record_ffmpeg_transcode.mp4"
[11:44:09 CEST] <Mavrik> -scale 1366x768 will upscale his video for 6 pixels
[11:44:11 CEST] <Mavrik> making text blurry.
[11:44:26 CEST] <seasc> Thats why i suggested hdr
[11:44:31 CEST] <BtbN> "-c:v libmp3lame"
[11:44:31 CEST] <ruby_on_tails> but it throws errors on terminal: Unrecognized option 'c:v' Failed to set value 'libx264' for option 'c:v'
[11:44:40 CEST] <Mavrik> ruby_on_tails, you're not using ffmpeg.
[11:44:50 CEST] <Mavrik> ruby_on_tails, or your version is more than 5 years or so old :)
[11:45:05 CEST] <Mavrik> also -c:a libmp3lame, not -c:v, mp3 is audio ;)
[11:45:22 CEST] <ruby_on_tails> i got this command from a stackoverdlow thread
[11:45:29 CEST] <Mavrik> anyway, lunchtime, bbl
[11:45:33 CEST] <ruby_on_tails> do you mean i need to look into this? > *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[11:45:48 CEST] <Mavrik> ruby_on_tails, you're not using ffmpeg :)
[11:45:56 CEST] <Mavrik> even though the command is ffmpeg
[11:45:57 CEST] <ruby_on_tails> hmm
[11:46:24 CEST] <ruby_on_tails> just curious what your location is, since i need to leave for lunch too :P
[11:46:29 CEST] <ruby_on_tails> reading the SO article
[11:46:37 CEST] <seasc> ruby_on_tails, you're on linux?
[11:46:44 CEST] <ruby_on_tails> seasc: yea ubuntu
[11:47:02 CEST] <seasc> ruby_on_tails, http://ffmpeg.gusari.org/viewtopic.php?f=25&t=2020
[11:47:32 CEST] <seasc> ruby_on_tails, "vhs -SQ hdr"  will record your screen at 1280x720, and it should not be blurry
[11:47:48 CEST] <seasc> at=~as?
[11:48:18 CEST] <seasc> used recordmydesktop too, but now i prefer ffmpeg doing the recording, feels like better quality
[11:48:24 CEST] <ruby_on_tails> seasc: will that squeeze my screen or crop it?
[11:48:43 CEST] <seasc> ruby_on_tails, among these two words, squeeze.
[11:48:48 CEST] <ruby_on_tails> hmm
[11:49:04 CEST] <ruby_on_tails> i cant do that due to the css involved in the screencast messing up
[11:49:05 CEST] <seasc> you just said your screen was sold as hdr (720p)
[11:49:49 CEST] <seasc> what 'css'? there is no css in your last posted command
[11:50:04 CEST] <ruby_on_tails> not sure about that, i just took the monitor off the shelf, its 1360*768 i dont know if its hdr or not
[11:50:27 CEST] <ruby_on_tails> seasc: i cant change my res to 1280*720 while recording the screencast
[11:53:03 CEST] <seasc> ruby_on_tails, whats your goal/issue anyway? You just need a new container or what?
[11:55:22 CEST] <ruby_on_tails> ok, i have an ogv video from recordmydesktop which doesnt run on browsers, so i need it in mp4 format, so i used arista transcoder to get that, everything is perfect except the transitions between the slides my video shows which gets grained/pixellated/whatnot rubbish, so i thought i will import the mp4 video into a video editing software and add the transitions there instead of recording them expecting better quality, but when i import the mp4 file
[11:55:29 CEST] <ruby_on_tails> seasc: ^^
[11:56:31 CEST] <ruby_on_tails> and i guess i have a weird monitor size 1360*768 which might be causing troubles with the video editing softwares so i was trying to debug that part with help from you guys
[11:56:40 CEST] <seasc> Did you try to encode straight to mp4 or webm?
[11:56:51 CEST] <seasc> from rMD?
[11:56:59 CEST] <ruby_on_tails> seasc: it doesnt support anything other than ogv
[11:57:30 CEST] <killer> i use this filter ffmpeg -i Lecture01a.mpg -vf colorlevels=rimin=0.439:gimin=0.439:bimin=0.439:rimax=0.96:gimax=0.96:bimax=0.96:romin=0.4:gomin=0.4:bomin=0.4 -b 500k output.mpg .. how i can do it for all .mpg files in one folder ?
[11:57:47 CEST] <killer> not one-one
[11:58:20 CEST] <ruby_on_tails> seasc: i also tried uploading the ogv to youtube as it accepts that format, but even youtube blurs it
[11:58:41 CEST] <seasc> for f in *;do yourcommand ;done  (Replace Lecture01a.mpg by "$f" and output.mpg by out-$f.mpg)
[11:58:45 CEST] <seasc> @ killer ^^
[11:59:26 CEST] <killer> is it possible ??
[11:59:48 CEST] <killer> hmm ok ... i will try
[11:59:51 CEST] <seasc> killer, just told you how to.. yes :p
[12:00:18 CEST] <seasc> ruby_on_tails, thats weird.
[12:01:07 CEST] <killer> ffmpeg -i $f -vf colorlevels=rimin=0.439:gimin=0.439:bimin=0.439:rimax=0.96:gimax=0.96:bimax=0.96:romin=0.4:gomin=0.4:bomin=0.4 -b 500k out-$f.mpg this seasc ?
[12:01:50 CEST] <seasc> killer,  yes, within the for f in *; do .... ;done
[12:03:38 CEST] <killer> and ;done
[12:03:47 CEST] <ruby_on_tails> seasc: and frustrating :(
[12:03:52 CEST] <ruby_on_tails> brb lunch
[12:06:30 CEST] <stf> I try to generate a 30 second long audio example which fading in and out my syntax looks like this 'ffmpeg -i "input.mp3" -ss 30 -to 60 -af "afade=t=in:ss=0:d=3,afade=t=out:ss=27:d=3" "output.mp3" why do i create here a noiseless audio file?
[12:22:05 CEST] <stf> could it be that cutting out and adding a filter should not be combined?
[12:45:43 CEST] <ruby_on_tails> Mavrik: i get this Cannot add PPA: 'No JSON object could be decoded'. when i try to setup the real ffmpeg from http://stackoverflow.com/questions/9477115/what-are-the-differences-and-similarities-between-ffmpeg-libav-and-avconv/9477756#9477756
[14:45:27 CEST] <ruby_on_tails> Mavrik: installed the real ffmpeg 2.6.1
[14:54:24 CEST] <ruby_on_tails> ffmpeg -i first_record.ogv -c:v libx264 -preset veryslow -crf 22 -c:v libmp3lame -qscale:a 2 -ac 2 -ar 44100 first_record_new_ffmpeg.mp4 gives me Unrecognized option 'preset'. Error splitting the argument list: Option not found
[14:54:27 CEST] <ruby_on_tails> can anyone tell why?
[15:02:53 CEST] <JohanW_Work> ruby_on_tails: Don't know if it's the cause for your problem, but you've got two video codec definitions (-c:v) in there. The second one should probably be -c:a, since you've got "libmp3lame" there.
[15:12:44 CEST] <Anoia> hi all.
[15:13:23 CEST] <Anoia> I've upgraded the version of ffmpeg my app uses and now I can no longer decode AAC audio correctly.
[15:13:44 CEST] <Anoia> Can someone confirm my understanding of the audio decode functions please?
[15:39:21 CEST] <sekon> Hello,
[15:39:49 CEST] <sekon> ffserver is streating a file to http but it is not streaming the same file over rtsp
[15:40:29 CEST] <sekon> loglevel debug for ffserver is of no help
[15:40:47 CEST] <sekon> the rtsp client gives the floowing message
[15:40:54 CEST] <sekon> librtsp: server responds: 'RTSP/1.0 404 Not Found'
[15:40:55 CEST] <sekon> rtsp_session: unsupported RTSP server. Server type is 'unknown'.
[15:40:55 CEST] <sekon> STREAM_LIVE555, URL: rtsp://localhost:8091/test.rtsp
[15:40:55 CEST] <sekon> Stream not seekable! file format detected.
[15:40:55 CEST] <sekon> Failed to get a SDP description from URL "rtsp://localhost:8091/test.rtsp": 404 Not Found
[16:35:23 CEST] <Rug> Howdy all,
[16:35:59 CEST] <Rug> Where can I find a detailed description of all the nvenc -presets ?
[16:44:16 CEST] <Rug> I know that there are choices: -preset hq or bd, ll, hp, etc. But I am looking for detailed documentation on what these presets do.
[16:55:23 CEST] <grobda24> Hi, Used the command "ffmpeg -i <video>.mp4 -target pal-dvd output.vob" to create a VOB for making a Video DVD. However the VOB is over 2gb which violates the Video DVD standard. How can I encode to multiple VOB files >=2gb or split the file ?
[17:01:39 CEST] <kepstin-laptop> grobda24: you need to use additional tools to actually author the dvd (e.g. 'dvdauthor'), and they will normally handle splitting the vob file if needed
[17:02:53 CEST] <grobda24> kepstin-laptop, ah, yes just turned up dvdauthor here :) For future reference is there a way to make ffmpeg output close the current output file when it reaches a specific size and continue with a new output video ?
[17:08:26 CEST] <RenatoCRON> grobda24, there's a segment option
[17:08:39 CEST] <RenatoCRON> but is needed to re-encoded all data
[17:09:05 CEST] <RenatoCRON>  -f segment -segment_time 4 \
[17:09:05 CEST] <RenatoCRON> -segment_list test.m3u8 -segment_format mpegts stream%05d.ts
[17:09:20 CEST] <grobda24> RenatoCRON, ah, right. Can that be done by data size ? I've seen that in examples as beibg shown to use seconds (duration).
[17:09:23 CEST] <RenatoCRON> and it segment by time, i don't know if theres a segment_byte options
[18:38:17 CEST] <RenatoCRON> grobda24, maybe if you make a C program using ffmpeg, you can split by size, but I guess if you know C and how to use ffmpeg.c you will knew it!
[18:39:18 CEST] <RenatoCRON> grobda24, you 'just' need find the last keyframe until it reach the desired size
[18:42:44 CEST] <grobda24> RenatoCRON, s'ok, thanks. dvdauthor did the VOB spitting perfectly :)
[22:29:45 CEST] <alesan> hello
[22:30:26 CEST] <alesan> I had a command line that used to work... on my ubuntu system but it does not in Arch Linux...
[22:30:34 CEST] <alesan> in particular, it's the part "-c:v libx264 -preset slower"
[22:30:46 CEST] <alesan> it seems like the "preset" part has changed?
[22:37:26 CEST] <alesan> doing...
[22:40:17 CEST] <alesan> OK it works now.
[22:40:22 CEST] <alesan> who knows what I did before
[22:40:38 CEST] <alesan> q=31.0 while encoding, means that I am not using enough bitrate?
[22:42:23 CEST] <llogan> if it looks shitty then you're not using enough bits
[22:45:25 CEST] <llogan> alesan: you can explain why/what you are encoding, and provide the command and complete output if you want suggestions (the arch wiki article on ffmpeg is crappy)
[22:45:57 CEST] <alesan> ffmpeg -i $INPUT -r 30 -s 640x480 -c:v libx264 -preset slower -c:an copy -sn -crf 25 output.mkv
[22:46:21 CEST] <alesan> input is a GO PRO recording set on a stationary tripod, there is one person giving a pizza making class
[22:46:32 CEST] <alesan> most of the image is stationary, the guys moves around sometimes...
[22:46:35 CEST] <llogan> you forgot the console output
[22:47:00 CEST] <llogan> you can add -t 10 to output just a segment
[22:50:29 CEST] <alesan> http://pastebin.com/CiQTmNM7
[22:50:35 CEST] <alesan> this was done with crf=18, sorry
[22:50:46 CEST] <alesan> it has q=24.0
[22:51:20 CEST] <alesan> the -crf 25 had basically the same output but q=31.0
[22:51:31 CEST] <__jack__> why force the bitrate ? why copy subtitle stream if you don't want it ?
[22:51:44 CEST] <__jack__> s/bitrate/frame rate/
[22:52:41 CEST] <llogan> alesan: ignore the q. just view the video. use the highest crf value that gives an appropriate quality.
[22:53:28 CEST] <alesan> __jack__, am I forcing the bitrate?
[22:53:39 CEST] <llogan> he meant frame rate
[22:53:56 CEST] <alesan> llogan, the input is 60Hz, I do not need it
[22:54:14 CEST] <alesan> in fact even 30fps seems a little too much for this pretty stationary setting
[22:54:32 CEST] <alesan> I want to reduce the "resolution" and framerate with this encoding
[22:54:45 CEST] <llogan> for what purpose?
[22:55:22 CEST] <alesan> well, to size it down from 60GB to something that is more manageable to archive and transfer over the internet
[22:55:43 CEST] <llogan> i see. and what is the target player/device for the output?
[22:55:52 CEST] <alesan> with crf 25 and the options above the size of the recordings goes down from 60GB to ~700MB
[22:56:05 CEST] <alesan> llogan, a regular computer...
[22:57:52 CEST] <llogan> you have no subtitles, so -sn is superfluous. and scale filter lets you be lazier: -vf scale=640:-2
[22:58:04 CEST] <llogan> other than that just experiment with crf
[22:58:06 CEST] <alesan> OK :)
[23:01:50 CEST] <kepstin-laptop> it might be interesting to try increasing the keyframe interval, too; e.g. to 10 * fps to get a keyframe every 10 seconds. I think the default's 25.
[23:02:06 CEST] <alesan> yeah
[23:02:14 CEST] <alesan> what was the option for that...?
[23:02:17 CEST] <kepstin-laptop> -g
[23:02:29 CEST] <alesan> -g 300
[23:02:33 CEST] <alesan> I'll try
[23:03:16 CEST] <kepstin-laptop> since keyframes are big, that can make the file smaller, at the expense that seeking in it will be a bit slower or more inaccurate, depending on the player.
[23:04:08 CEST] <alesan> yeah I am not concerned by that
[23:04:25 CEST] <__jack__> (if you are targeting regular computer, you can also use libx265)
[23:04:31 CEST] <alesan> but, as the movie will be encoded at 640x480, even an I-frame is not going to be too big...
[23:04:42 CEST] <alesan> __jack__, such thing exists? :O
[23:05:02 CEST] <llogan> if you have 10 years to provide to encoding time
[23:05:16 CEST] <llogan> (although I haven't tested it in months)
[23:05:48 CEST] <alesan> well, in this particular case, the bottleneck is not encoding time... but upload time (I am getting the video from a remote computer)
[23:08:39 CEST] <__jack__> alesan: sure it exists, better ratio quality/size, higher encoding requierement
[23:09:15 CEST] <alesan> yes I just did not expect it
[23:09:19 CEST] <alesan> so
[23:09:24 CEST] <alesan> at the same -crf 18
[23:09:33 CEST] <alesan> I tried -preset slower and -preset faster
[23:09:55 CEST] <alesan> "faster" is of course faster, and also delivers a file with a lower bandwidth...
[23:10:05 CEST] <alesan> and I cannot really distinguish by the two
[23:10:42 CEST] <alesan> I was expecting "slower" to have a lower bandwidth for the same quality
[23:10:51 CEST] <__jack__> no, faster means "I've no time to encode this, make it quicker"
[23:11:02 CEST] <alesan> at the expense of...?
[23:11:03 CEST] <__jack__> slower means "take the time, do the best"
[23:11:14 CEST] <alesan> best what, is my questoin?
[23:11:17 CEST] <__jack__> faster = bigger bitrate, slower = lower bitrate
[23:11:27 CEST] <alesan> that is not what I got
[23:11:33 CEST] <alesan> faster gave me the smaller file
[23:11:48 CEST] <alesan> q=24.0 for both, if it matters
[23:11:49 CEST] <kepstin-laptop> faster = lower quality per bitrate, slower = higher quality per bitrate
[23:12:55 CEST] <kepstin-laptop> when encoding in crf mode, the same crf value can give different bitrates depending on other encoder settings, such as preset.
[23:13:27 CEST] <alesan> mh
[23:13:42 CEST] <alesan> is there a way to... specify a really constant quality?
[23:13:49 CEST] <alesan> independent from the presets and settings?
[23:13:55 CEST] <kepstin-laptop> alesan: no, not really.
[23:14:00 CEST] <alesan> or.. in other words...
[23:14:37 CEST] <alesan> encoding time is quick enough, compared to upload time. Is there anything I could do to make encoding slower but more efficient so that I can get to an equilibrium with a faster upload?
[23:14:41 CEST] <__jack__> beuh, crf is that
[23:14:45 CEST] <alesan> or should I just switch to h265
[23:15:06 CEST] <alesan> well, a smaller crf gives me a higher bitrate, doesn't it?
[23:15:23 CEST] <alesan> maybe I'm mistaken there but it seems what it does
[23:15:50 CEST] <kepstin-laptop> crf actually stands for "constant rate factor"; it's actual definition is "a smaller crf gives higher bitrate" ;)
[23:16:31 CEST] <__jack__> alesan: no, it's only by luck
[23:16:37 CEST] <__jack__> crf means : give me that quality
[23:16:53 CEST] <kepstin-laptop> it's really a piece of the two-pass encoding mode. In two pass mode, x264 works by calculating stats during pass one, then using them to pick a crf value; then it does the second pass by using the crf value to get constant quality at a target size.
[23:17:36 CEST] <kepstin-laptop> it just turned out that crf mode was useful on its own, because it behaved like a "encode to target quality" mode.
[23:17:38 CEST] <alesan> well what I have here is a "target encoding time"
[23:18:16 CEST] <alesan> anyway thanks
[23:18:28 CEST] <kepstin-laptop> alesan: I would expect that the variation in bitrate between x264 presets is must smaller than the change in encording speed
[23:18:58 CEST] <kepstin-laptop> so pick the preset that gets the speed you want, then tweak crf as needed to get the quality you want.
[23:19:21 CEST] <alesan> yeah
[23:19:36 CEST] <alesan> I am now trying with the -g
[23:20:23 CEST] <__jack__> alesan: please also note that defaults are good
[23:20:35 CEST] <__jack__> just ffmpeg -i source -c:v libx264 output.mkv
[23:21:22 CEST] <kepstin-laptop> the defaults are preset medium and crf... 26, I think?
[23:21:45 CEST] <alesan> crf 26 seems a little too aggressive
[23:21:57 CEST] <kepstin-laptop> which is a sort of generally useful fast enough but kinda lowish quality mode.
[23:22:19 CEST] <__jack__> crf 23 by default
[23:22:33 CEST] <kepstin-laptop> oh, that's more reasonable.
[23:25:23 CEST] <kepstin-laptop> I find it kind of amusing that libvpx has an encoding mode designed to be actually "quality based", but it's mapped to the -crf option in ffmpeg, because that's what people are familiar with from x264.
[23:28:14 CEST] <alesan> is libx265 better or worse than vpx?
[23:29:54 CEST] <kepstin-laptop> I don't think the state of the libx265 h265 or libvpx vp9 encoder are finished enough to get really good comparisons, but I could be wrong
[23:30:08 CEST] <alesan> so if I wanted to try out libx265
[23:30:12 CEST] <kepstin-laptop> either way, if you want better quality or lower bitrates than h264, they will be slower than x264
[23:30:37 CEST] <alesan> ffmpeg -i $INPUT -r 30 -s 640x480 -c:v libx265 -c:an copy -sn -crf 18 output265.mkv
[23:30:42 CEST] <alesan> or should I do something else?
[23:30:52 CEST] <kepstin-laptop> if you run them with settings to get comparable speed to x264, you'll probably get similar quality/bitrate
[23:31:04 CEST] <kepstin-laptop> since most of the enhancements in the newer formats are more computationally expensive.
[23:31:22 CEST] <kepstin-laptop> alesan: the "crf" scale between different codecs is completely different.
[23:31:47 CEST] <kepstin-laptop> (it's even different between 8bit and 10bit mode in x264...)
[23:32:41 CEST] <alesan> anything I could do to make a better framerate conversion
[23:32:42 CEST] <alesan> I mean
[23:32:47 CEST] <alesan> I have a 60Hz input
[23:32:52 CEST] <__jack__> alesan: remove the crf switch
[23:32:56 CEST] <alesan> that I want to make 25 or 30fps output
[23:33:11 CEST] <alesan> any sort of filter to do a smoother conversion?
[23:33:36 CEST] <kepstin-laptop> alesan: not sure what you mean by "better". The easiest way to turn 60fps into 30fps is to just drop every second frame, and that's what ffmpeg should be doing
[23:33:46 CEST] <kepstin-laptop> if it's ntsc, you should be using 30000/1001 of course.
[23:34:20 CEST] <kepstin-laptop> any conversion that's not an integer multiple (e.g. 60 to 24) will result in jerky video.
[23:35:03 CEST] <kepstin-laptop> since for that it'll alternate between dropping 2 frames and dropping 1 frame.
[23:36:48 CEST] <kepstin-laptop> in theory you can try to be fancy about it and do motion-compensated frame interpolation, but ffmpeg doesn't have support for that (yet, at least ;) )
[23:39:18 CEST] <alesan^> kepstin-laptop, no, it's not the best way... when you have a fast shutter and "pan" horizontally for example, it will be pretty bad to just drop frames
[23:40:15 CEST] <kepstin-laptop> well, you can't really go any slow down the shutter speed after the video's already been taken...
[23:40:41 CEST] <kepstin-laptop> and just blending frames together will look bad no matter what.
[23:43:51 CEST] <alesan^> there are techniques...
[23:43:58 CEST] <alesan^> but of course they would be out of scope in ffmpeg
[23:46:08 CEST] <alesan^> OK I need to reboot bye see you later
[23:46:12 CEST] <kepstin-laptop> not really... such a thing would probably be suitable as an ffmpeg filter
[23:46:21 CEST] <kepstin-laptop> pretty computationally expensive tho
[23:48:20 CEST] <alesan> re
[23:52:41 CEST] <alesan> ffmpeg -i $INPUT -r 30 -s 640x480 -c:v libx265 -c:an copy -sn output265.mkv    this gives me a quality that is absolutely the worst
[23:53:02 CEST] <alesan> I will try again with -crf 18 just to see what's going on
[23:58:11 CEST] <klaxa> libx264 and libx265 crf values do not translate 1-to-1
[23:58:25 CEST] <alesan^> sorry I was disconnected
[23:58:34 CEST] <alesan^> they are working on the routing at this time
[23:58:50 CEST] <alesan^> klaxa, my point it, with the default settings, it was horrible
[23:59:07 CEST] <alesan^> I underdstand libx265 is experimental
[00:00:00 CEST] --- Fri Apr  3 2015


More information about the Ffmpeg-devel-irc mailing list