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

burek burek021 at gmail.com
Sun Jun 17 02:05:01 CEST 2012


[01:29] <starPause> anyone know of a tool similar to http://rodrigopolo.com/ffmpeg/ that will work with ffmpeg 0.7.11 (what macports installs on osx)?
[01:34] <llogan> starPause: you can just ask here.
[01:36] <starPause> llogan: thanks! i'm batch encoding some videos for use with mediaelement.js so my bases are covered if i do flv, webm. mp4/m4v. flv & webm were easy enough... mp4 command line strings have lots more options so i'm a bit lost.
[01:36] <starPause> here's what i've got so far, it's ok but i wonder if there's anything wrong with using so few parameters when all the command line encoding strings i see have a ton of params
[01:36] <starPause> ffmpeg -i INPUT -f mp4 -ab 128k -b 1300k -s 640x360 OUTPUT
[01:39] <llogan> starPause: default settings for libx264 using recent-ish ffmpeg are decent. most other default settings are usually not so good
[01:40] <llogan> use a pastebin site to show your ffmpeg command and the complete console output
[01:40] <llogan> then i can give you an example depending on your ffmpeg version since the syntax can often be different
[01:41] <Fire_> I told someone they were breaking the license over twitter, they said they'd look into it and blocked me
[01:41] <Fire_> lol
[01:42] <beandog> lol
[01:42] <beandog> thats awesome
[01:43] <starPause> guess that's as far as they dared to look ;)
[01:43] <starPause> llogan: http://pastebin.com/tRtfY6kp
[01:43] <Fire_> I guess ffmpeg itself would have to go after them then (?)
[01:44] <llogan> Fire_: we had a "hall of shame", but it was too much work and didn't usually achieve any results
[01:46] <llogan> ie: those chinese guys that make the various and assorted converters. all basically the same, but with dozens of different names.
[01:46] <starPause> in my perfect vision of the world the ffmpeg team could just ignore legal shit and focus on making things work, seems over all they've done a great job of it
[01:47] <Fire_> haha
[01:47] <Fire_> It just annoys me when programs claim to be a super awesome quality encoder, but they're just using ffmpeg
[01:47] <llogan> howerver we do have a "license violation" option in the bug tracker if you want to pursue it
[01:48] <Fire_> I'll give them a couple days to see if they actually follow the license
[01:48] <Fire_> doubt they will considering the block
[01:49] <llogan> starPause: ffmpeg -i input -vcodec libx264 -vpre medium -crf 24 -acodec libfaac -aq 100 output.mp4
[01:50] <Fire_> https://twitter.com/FFsplit/status/213777542916739072 heh
[01:50] <llogan> starPause: then... qt-faststart output.mp4 outputoutput.mp4
[01:51] <llogan> adjust crf to your desired quality. a lower value is a higher quality. use the highest value that still looks good to you.
[01:51] <starPause> llogan: thanks! when i try that i get.... File for preset 'medium' not found
[01:52] <starPause> maybe presets didn't get installed or something along with my macports build?
[01:52] <JEEBsv> -preset medium
[01:52] <llogan> i guess 0.7 isn't as old as i thought
[01:52] <starPause> JEEBsv: thanks =)
[01:52] <JEEBsv> -vpre IIRC is mostly for preset files, while you want to use a libx264's internal preset
[01:53] <JEEBsv> although 'medium' is the default
[01:53] <JEEBsv> lol
[01:53] <JEEBsv> http://mewiki.project357.com/wiki/X264_Settings#preset
[01:54] <llogan> i just used medium as an example. was getting to the usual preset spiel
[01:54] <Olson> I had a problem but it's fixed now
[01:54] <llogan> ...which is, for general use, use the slowest preset you have patience for
[01:55] <llogan> ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow
[01:55] <starPause> llogan: what's the qt-faststart, don't have that on my system
[01:55] <llogan> moves some data in the mp4 file so it can start playing before it is completely downloaded.
[01:55] <llogan> you can do the same thing with MP4Box
[01:56] <llogan> if you have that
[01:56] <TheBrian> anyone tried using ffmpeg to do http live streaming?  i've been sort-of successfull but am having difficulties with seeking
[01:56] <starPause> llogan: got it, thanks
[01:56] <llogan> if you have the ffmpeg source you can compile qt-faststart in seconds
[01:57] <llogan> cd ffmpeg/tools; make qt-faststart
[01:59] <starPause> llogan: i'm getting a segmentation fault durring encoding which results in a zero length file, any idea there?
[02:03] <starPause> if i got preset slow it segfaults earlier on in teh frames
[02:04] <starPause> http://pastebin.com/ZJvJi8aw
[02:05] <llogan> starPause: does it happen only with libx264?
[02:05] <llogan> segmentation faults are bad, mmmmmkay.
[02:05] <starPause> llogan: yeah, first i'm encountering it with ffmpeg, the webm and flv transcodes went over fine
[02:06] <llogan> you didn't use ffmpeg for those?
[02:06] <starPause> i did
[02:08] <llogan> starPause: i have to go afk. might try recent x264 and ffmpeg if possible.
[02:09] <starPause> llogan: np thanks for the help, will keep playing around
[02:40] <Nickname123> I want to output frames of a video to an image file.  Is it possible to make the output filename for the image the timestamp of the video when the frame was captured?
[02:47] <Fire_> TheBrian : having issues using it to livestream?
[02:48] <TheBrian> yeah... for some reason seeking just throws everything off
[02:48] <Fire_> ahh not sure about that
[02:48] <TheBrian> wondering if it's because PAT/PMT aren't written at the beginning of every segment.. or something
[02:49] <TheBrian> wait.. no.. I'm not streaming live
[02:54] <Fire_> O_o
[02:54] <Fire_> That's what I read earlier x3
[02:57] <TheBrian> it is called HTTP Live Streaming
[02:57] <TheBrian> but it's not necessarily live streaming
[03:00] <TheBrian> hard to believe nobody has done much work with it since all the apple products use it
[03:08] <TheBrian> i'm starting to wonder if reading the source to ffmpeg/avconv is easier than finding documentation or understanding it
[03:11] <TheBrian> there are only a few blog posts even on it.. wonder if it's dying.. it's pretty cool though
[03:11] <TheBrian> just can't find tools
[03:12] <ubitux> the documentation is quite complete
[03:12] <ubitux> i mean, not perfect but you have a lot of stuff in there: http://ffmpeg.org/ffmpeg.html
[06:52] <orangey> hello all
[09:06] <burek> Fire_, just wait until they earn some decent money and then there is a point in suing them
[09:07] <burek> until then, no need to mess with them
[09:07] <burek> that way everybody benefits :) they lose the time and energy invested and this community gets what's rightfully its
[12:15] <hwk> av_interleaved_write_frame(): Disk quota exceeded
[12:15] <hwk> not writing to a quota limited path
[12:15] <hwk> or does it check for the user's quota?
[12:37] <mbutubuntu> hello folks, is there a way to avoid verbosity (libaviformat, libwscale and other lib versions) in the ffprobe or ffmpeg output?
[12:44] <hwk> -v 0
[12:49] <mbutubuntu> hwk, ffprobe 0.7.3 doesn't recognize that flag... maybe -loglevel is the same?!
[12:50] <mbutubuntu> also with -loglevel 0 ffprobe gives me "trash" output. I don't want to get versions of all libs used by ffprobe....
[12:56] <hwk> what ffmpeg u got?
[12:56] <hwk> dont use repo packages, please compile the latest version
[13:15] <mbutubuntu> hwk, ooh, and why? I'm using Ubuntu 11.10 so packages are well updated
[13:16] <mbutubuntu> but if it solve my issue, I'll compile it :-)
[13:18] <JEEB> mbutubuntu, 11.10's package freeze is usually two or so months before release
[13:18] <JEEB> so it was package frozen in august of 2011 or so
[13:19] <JEEB> not to mention that distros usually use a release available from that time, not the trunk
[13:19] <JEEB> so yes
[13:19] <JEEB> I would say that compiling ffmpeg's git HEAD from source would be a relatively good idea :)
[13:20] <mbutubuntu> JEEB, ok but what about dependencies?
[13:20] <mbutubuntu> could be possible that 11.10 doesn't provide right versions to compile ffmpeg sources?
[13:20] <JEEB> 1) you don't have to install the package out of your home folder, so possible packages using the packaged ffmpeg wouldn't be affected
[13:21] <JEEB> 2) dependencies depend on what you want to do with the ffmpeg
[13:22] <JEEB> basically for ffmpeg itself you'll need yasm and a relatively new gcc (that you get with aptitude install build-essential(s))
[13:22] <JEEB> most common needs for outside libraries are encoding of these formats: H.264, VP8, AAC, Ogg vorbis
[13:23] <JEEB> if you are not going to encode in those formats you won't need any "real" dependencies (except for yasm/gcc) for ffmpeg
[13:24] <JEEB> and of course git for getting the source code
[13:24] <JEEB> lol
[13:26] <mbutubuntu> ok, I thought ffmpeg needed more dependencies :-)
[13:27] <JEEB> mbutubuntu, for decoding of most formats, and encoding of some all the stuff is within ffmpegs libraries :)
[13:27] <mbutubuntu> in the apt era compiling is generally the "dark side of linux" :-D ahahahaha
[13:28] <mbutubuntu> JEEB, ok very thanks for your suggestions
[13:29] <hwk> the basic packages are updated, the others are compiled once in a repo if it works
[13:29] <JEEB> mbutubuntu, well do tell what exactly you need and we can get you rolling?
[13:31] <mbutubuntu> JEEB, I was joking :-)
[13:32] <JEEB> hm?
[13:34] <mbutubuntu> I was joking when I wrote "in the apt era compiling is generally the 'dark side of linux'"
[13:35] <JEEB> and my text wasn't related to that :)
[13:36] <zap0> thanks for the help yesterday JEEB
[13:37] <hwk> can -r 30 cause Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[13:37] <hwk> ?
[13:37] <mbutubuntu> JEEB, ok, sorry :-)
[13:38] <hwk> forcing a framerate on sources with lower framerates?
[13:39] <JEEB> hwk, the -r switch before -i (which should work like AssumeFPS() in Avisynth) didn't seem to work in all cases, seems like it's mostly meant for sources without frame rate information nowadays
[13:39] <hwk> im using after -i
[13:40] <hwk> or that error is related to the fact that i didnt compile ffmpeg with libxvid
[13:40] <JEEB> ok, that should be frame rate conversion which means that ffmpeg will duplicate/cut out frames depending on the rate you're setting compared to the source one
[13:40] <hwk> for decoding
[13:40] <hwk> this happens on avi formats
[13:40] <JEEB> nah, decoding should be fine with the libavcodec's mpeg4 decoder
[13:41] <hwk> ok
[13:41] <JEEB> libxvid is IIRC only used for encoding anyways
[13:41] <hwk> thats what i thought
[13:41] <JEEB> anyways, pastebin your command line and the whole output of it
[13:41] <JEEB> just to be sure
[13:45] <hwk> here it is
[13:45] <hwk> :
[13:45] <hwk> http://pastebin.com/u1RHq4XG
[13:46] <JEEB> what's vprofile?
[13:46] <hwk> ; /usr/share/ffmpeg/libx264-baseline.ffpreset
[13:47] <JEEB> ffmpeg -i derp.avi -r 30 -c:v libx264 -profile:v baseline -preset slower -b:v 400k -maxrate 400k -bufsize 800k -c:a libfaac -b:a 96k out.mp4
[13:47] <JEEB> try this (possibly with your vf scale)
[13:48] <hwk> encoding for android
[13:48] <hwk> :)
[13:48] <hwk> thats why im using the baseline profile
[13:48] <JEEB> yeah, I was mostly just looking at the usage of vprofile which I haven't seen for a long time
[13:48] <JEEB> if ever
[13:49] <hwk> that error happens on avi files. wmv files are procesed ok.
[13:49] <JEEB> just try that out, it sets baseline profile with the usual setting
[13:49] <hwk> just have to wait for the current batch to end
[13:49] <JEEB> oh
[13:50] <JEEB> [libx264 @ 0x946fee0] height not divisible by 2 (480x253) <- THIS
[13:50] <JEEB> I think that's the actual reason for the failing
[13:50] <JEEB> always make your output resolution be mod2
[13:50] <JEEB> at least
[13:50] <JEEB> because of the 4:2:0 YCbCr colorspace
[13:51] <JEEB> but yeah, I would recommend moving to -profile for setting the baseline profile
[13:52] <JEEB> the :v is there to tell that it's the profile for the video encoder, otherwise f.ex. AAC encoders might pick it up and error on you because there's no "baseline" profile for AAC
[13:52] <JEEB> because using the encoder's API is better than using some old ffpreset files :)
[13:53] <JEEB> (encoder in this case being libx264, which has both profiles and levels as well as  presets and tunes available)
[13:55] <hwk> so... x264 has -profile:v baseline which i can use?
[13:55] <JEEB> YES
[13:56] <JEEB> :)
[13:56] <hwk> and the preset?
[13:56] <JEEB> you're already using the internal presets system with that
[13:56] <hwk> k
[13:57] <hwk> i dont know how to set the scale to be mod2
[13:57] <JEEB> there were ways for that IIRC
[13:57] <JEEB> but yeah, that's the real problem you had there :)
[13:57] <hwk> that erro occurs when the input resolution is 480 <=
[13:58] <JEEB> anyways, that error will occur whenever your scale's output is not divisible by two on both width and height
[14:00] <JEEB> there were mathematic operations you could do with the scale etc. as you are already doing, you'll just have to read through the documentation to make the output always mod2
[14:01] <hwk> give some link
[14:01] <hwk> i have no clue how to make mod2
[14:02] <JEEB> http://ffmpeg.org/ffmpeg.html#scale
[14:02] <hwk> the women olympics: put makeup on rolleblades, bike race on high heels
[14:03] <JEEB> that should give you some stuff, and that documentation should also tell you all the mathematical stuff you can do on the command line
[14:03] <JEEB> does not have a straightfoward example for mod2 that you can copypasta, so you will have to learn yourself by reading the docs
[14:03] <JEEB> sorry
[14:04] <hwk> im using the last example: # increase the width to a maximum of 500 pixels, keep the same input aspect ratio
[14:09] <mbutubuntu> JEEB, what are dot separated value in the ffprobe output (00:03:52.93)? frames or cents?
[14:09] <mbutubuntu> I guess cents
[14:12] <JEEB> probably centiseconds, but I'm not sure
[14:23] <hwk> this is amuzing: Fancy Filtering Example -- Examples for various psychedelic effects and other weird filtering
[14:23] <hwk> :)
[14:30] <hwk> 480:-2
[14:30] <hwk> will do?
[14:30] <hwk> http://ffmpeg.org/trac/ffmpeg/ticket/309
[14:30] <hwk> :(
[14:30] <hwk> sucks
[14:31] <hwk> trunc(ow/a/2)*2
[14:42] <hwk> i didnt understand the formular
[14:42] <hwk> ow = output width ?
[14:50] <JEEB> hwk, it's in the documentation I think, but I think it's output width and aspect ratio
[14:56] <hwk> this formula sets the output video with 2 pixels less
[15:00] <JEEB> ctrl+f for trunc in http://ffmpeg.org/ffmpeg.html and you'll see plenty of mathematical formulas that will help you in your quest :P
[16:13] <hwkxx> sometimes when i use -ss before -i some images have predominant grey (error image)
[16:13] <hwkxx> is there a way to count/weight the grey color in a image?
[16:14] <hwkxx> this way i can fallback to -ss after -i
[16:17] <hwkxx> is nickserv arround? i tried /msg nickserv identify user pass but its not working
[16:27] <burek> hwk, no nickserv for the next hour or two
[16:29] <burek> hwk, when you use -ss before -i then (I guess) ffmpeg will use keyframes to quickly seek through the file to your desired position
[16:29] <burek> and when you use it after -i then ffmpeg will pass the input through the decoder and after that will apply -ss
[16:29] <burek> meaning it will be slower but more accurate
[16:30] <burek> if you get gray images using -ss before -i it means you are missing some keyframes
[16:30] <lemonzest> is there a rotate filter? cant seem to find it, need to rotate a video captured from a phone to the right (so its portait)
[16:31] <lemonzest> oh, using 10.3 on magia 2 64bit
[16:32] <burek> lemonzest, http://ffmpeg.org/ffmpeg.html#transpose
[16:34] <hwk> burek, i know. i found a php function which reads the color codes and returns one :) now i need to find some grey rgb color ranges to compare the result to
[16:34] <burek> why don't you try using both -ss
[16:35] <burek> first to quickly seek to approximate position, and then another -ss after -i to precisely seek to where you need to
[16:36] <hwk> using -ss after -i takes a lot of time... if the first shot (before -i ) is broken, then i call the ss after -i
[16:36] <burek> out of curiosity, how big is your seek value
[16:36] <hwk> ill check if the r g b are between 120 and 130
[16:36] <hwk> duration  / 5
[16:37] <hwk> on a 2 hour videos
[16:37] <hwk> its quite a lot of seeking
[16:39] <burek> can you give an example
[16:41] <burek> ffmpeg -ss 00:12:00 -i input.flv -ss 00:13:00 out.flv
[16:41] <burek> that will seek quickly to 12th minute
[16:41] <hwk> yes
[16:41] <burek> and then more slowly and accurate to 13th minute
[16:41] <burek> which might be what you need
[16:43] <hwk> i have many videos... for each video i ffprobe, extract the duration (in seconds), split it to 5 (the number of shots) this way i have the timestep of the ss.
[16:43] <hwk> first i use -ss framestep -i file ... if the outputted image is bellow 1kb i take another shot using -i -ss
[16:43] <hwk> this way i avoid long times for shots
[16:44] <burek> I just gave you universal solution
[16:44] <burek> did you test it
[16:46] <hwk> its like -i -ss
[16:46] <hwk> takes a lot of time
[16:46] <burek> no it's not
[16:46] <burek> I tested now on my machine
[16:46] <burek> it does exactly that
[16:46] <burek> -ss -i -ss
[16:47] <burek> it first skips a lot, then slowly seeks 2nd -ss
[16:47] <burek> try like ffmpeg -ss 00:20:00 -i input -ss 00:21:00 out.avi
[16:47] <burek> and after that try separately -ss 00:20:00 -i ...
[16:48] <burek> and -i ... -ss 00:01:00
[16:48] <burek> and compare results
[16:51] <hwk> im saving the -ss as jpg
[16:51] <burek> so?
[16:51] <burek> it doesn't change anything
[16:51] <burek> save it either as avi or jpg or whatever you want
[16:51] <burek> it doesn't affect the seeking time
[16:52] <hwk> 00:20 != 00:21 ...
[16:52] <burek> so>
[16:52] <burek> ?
[16:52] <burek> did you even bother to read what I wrote above
[16:52] <burek> or I'm just wasting my time
[16:53] <hwk> i need to skip fast... not slow!
[16:53] <burek> I give up
[16:53] <burek> wait for someone else to help you
[16:53] <hwk> i needed some advice :)
[16:53] <hwk> cuz i think my way is the long one
[16:54] <hwk> ohh
[16:55] <hwk> the first -ss tells ffmpeg to get there fast, while the second seeks slowly from the first -ss offset?
[17:25] <kippi> hey
[17:26] <kippi> can i stream a video file to rtmp? so use ffmpeg like flash media encoder
[17:57] <Diogo> anyone with experience with mc mediaroom iptv?
[18:03] <burek> kippi, yes
[18:06] <kippi> burek: will this open a port on 1935 ao that people can stream from me?
[18:06] <burek> no
[18:06] <burek> you need rtmp server
[18:06] <burek> like wowza
[18:07] <kippi> that's what i thought
[18:07] <burek> but you can use ffmpeg as an rtmp encoder
[18:07] <burek> ffmpeg -i ... ... -f flv rtmp://serverip:port
[18:07] <burek> something like that
[18:07] <burek> check the docs
[18:08] <Diogo> anyone knows alternative to wowza that supports smooth streaming?
[18:19] <Diogo> burek do you know anything?
[18:19] <burek> I know that I don't know anything :)
[18:19] <burek> about what? :)
[18:19] <Diogo> about alternative to wowza media server?
[18:20] <burek> well, google is your friend :)
[18:22] <Diogo> i find  c++ rtmp server
[18:22] <burek> I haven't used it so far
[18:23] <Diogo> i have problems to integrate wowza in microsoft media room using smooth streaming
[18:23] <burek> did you contact microsoft support maybe? :D
[18:23] <Diogo> i need to find an alternative to this system
[18:23] <Diogo> they told me to use their systems
[18:24] <Diogo> windows media server
[18:24] <burek> brilliant answer!
[18:24] <Diogo> and wimdows media live encoder..
[18:24] <Diogo> :(
[18:28] <burek> well to be honest, all the free things are free for a reason
[18:28] <burek> you have to spend a lot of time until you master most of them
[18:28] <ubitux> maybe GSS
[18:28] <ubitux> or ffserver but...
[18:28] <burek> so, either pay something to M$ to do it for you or google and learn your options and be smarter :)
[18:29] <burek> I really don't know neither wowza nor GSS nor M$ products
[18:29] <burek> ffserver and vlc do the most of the stuff I need
[18:32] <Diogo> ok
[18:32] <Diogo> thanks
[19:02] <sacarasc> I guess I'd have heard if you had...
[19:02] <sacarasc> Wrong window!
[19:11] <burek> stop using windows!
[20:11] <Darkclaw66> what does ffmpeg set the video bitrate if I don't specify it, such as this command: '-f', 'mov', '-vcodec', 'libx264', '-acodec', 'libfaac', '-ab', self.audio_codec[5] + 'k', InputFileName + '.mov'
[20:12] <burek> what kind of command is that
[20:12] <Darkclaw66> some are variables
[20:12] <burek> well give us an exact ffmpeg cmd line
[20:13] <Mavrik> Darkclaw66, the encoder will chose something arbitrary
[20:13] <Darkclaw66> Mavrik would it be equivalent to the original?
[20:13] <Mavrik> x264 chooses something that looks like garbage iirc
[20:13] <Mavrik> Darkclaw66, nope
[20:13] <burek> no
[20:13] <Mavrik> it's like 150kbit or something for libx264 :)
[20:13] <Darkclaw66> oh man...
[20:13] <burek> not quite
[20:14] <burek> I tested it few times
[20:14] <burek> it depends on frame size
[20:14] <Darkclaw66> would you guys think it's stupid to copy whatever the bitrate is in the original for mmpeg to convert it to the newly formatted?
[20:14] <burek> why would you want the same bitrate
[20:15] <burek> are you restreaming it live?
[20:15] <Darkclaw66> to try to preserve the same quality
[20:15] <burek> then use -crf
[20:15] <burek> and -preset
[20:15] <Mavrik> Darkclaw66, because there's not such thing as "constant bitrate" for most video formats ;)
[20:16] <Darkclaw66> does that mean 1000kb/s in one codec is not the same as 1000kb/s in another?
[20:17] <Mavrik> no
[20:17] <Darkclaw66> that would explain why the newly converted format is slightly larger in size
[20:17] <Mavrik> that means that you (usually) have 15 seconds of video at 1800 kb/s, 10 seconds at 800 kb/s, 30 seconds at 100 kb/s, etc.
[20:18] <Mavrik> which means calculating average bitrate you should set to get "identical" quality is far from trivial
[20:18] <Mavrik> especially for the way the ffmpeg is constructed :\
[20:18] <Darkclaw66> im not sure how to use -crf and -preset but the goal is for new format to be .mov x264 and libaac
[20:19] <Darkclaw66> I'd like to preserve as  much quality as possible
[20:19] <burek> well, try this
[20:19] <burek> use -preset for speed config
[20:19] <burek> the slower you choose, more cpu will be used and more slow the process will finish
[20:19] <burek> avoid placebo (for testing only)
[20:19] <Mavrik> Darkclaw66, well... what are you trying to do?
[20:20] <burek> (type x264 --help to see all the options for -preset)
[20:20] <Mavrik> Darkclaw66, what's your input? what's the reason for transcoding?
[20:20] <Mavrik> it's easier to help if we have context ;)
[20:20] <Darkclaw66> I have a roku player. it only allows certain formats to be played via usb memory stick
[20:20] <burek> and -crf is for quality
[20:20] <burek> start at default (23) and go up (to 50)
[20:20] <Darkclaw66> http://support.roku.com/entries/423946-what-media-file-types-does-the-roku-usb-media-player-channel-support
[20:20] <burek> until the quality is not good anymore
[20:20] <burek> that's it
[20:21] <Darkclaw66> there is some flexibility but when I've tried mp4 it doesn't seem to work right
[20:22] <Mavrik> Darkclaw66, hmm... first you should find out why is it having problems with your video
[20:22] <Mavrik> since it obviously supports H.264 and you're just reencoding the same thing into H.264
[20:22] <Darkclaw66> im not sure it's probably because im making it do funky stuff
[20:22] <Mavrik> but almost certanly "crf" is what you want
[20:22] <Mavrik> since that's a constant quality specifier
[20:22] <Darkclaw66> would i just do -crf best ?
[20:22] <Mavrik> which means all your output videos will be of same quality when it comes to encoding
[20:23] <Mavrik> Darkclaw66, try "-crf 18"
[20:23] <Mavrik> increase the number if the file is too big, decrease it if it looks like garbage :)
[20:23] <Darkclaw66> that's going to be a pain :)
[20:23] <Mavrik> 18-25 is usually the range for most videos
[20:24] <burek> and make sure you set the correct -profile
[20:24] <burek> (and frame size)
[20:24] <burek> for your playback device
[20:24] <Darkclaw66> what's the worst thing that will happen if I just use the same bitrate as the original video? it can't get worse than the original right?
[20:24] <burek> it can
[20:24] <burek> and most probably will
[20:24] <Darkclaw66> damn :(
[20:24] <burek> because your input is most probably variable bit rate too
[20:25] <burek> you are only seeing average bit rate
[20:25] <Darkclaw66> hands down you guys recommend -cre 18 then as a starting point and not specifying the bit rate?
[20:25] <Darkclaw66> sorry crf
[20:25] <Mavrik> Darkclaw66, you'll probably lose some quality, but not much :)
[20:25] <Mavrik> because of what burek said
[20:25] <burek> do you have any file that plays for sure on that device?
[20:26] <Darkclaw66> yes the one that I used the syntax above works
[20:26] <burek> can you type ffmpeg -i file.mp4
[20:26] <burek> and show us the pastebin
[20:26] <starPause> is there anywhere i can grab a binary of qt-faststart for osx? i got my ffmpeg binary from http://www.osxexperts.net/ffmpeg/ffmpegexperts.html
[20:26] <Darkclaw66> the original and the converted?
[20:26] <burek> just the original
[20:27] <burek> the one that plays on that device
[20:28] <Darkclaw66> http://pastebin.com/8ygzn2rR
[20:28] <starPause> fflogger: thanks much, i was googling but missed that one
[20:28] <starPause> er, burek, thank you ;)
[20:28] <burek> :beer: :)
[20:29] <burek> Darkclaw66, which one plays on your device without problems
[20:29] <Darkclaw66> the original is not compatible
[20:30] <Darkclaw66> the one that is converted copied the same video bitrate
[20:30] <burek> so "converted" plays fine on your device?
[20:30] <Darkclaw66> yep it's playing now
[20:30] <starPause> burek: oooh, now i remember seeing this and passing because it's a cocoa app, not command line
[20:30] <Darkclaw66> I can't tell if there is a loss of quality though
[20:31] <Darkclaw66> if it has a higher bitrate it means that it didn't degrade quality right?
[20:31] <burek> Darkclaw66, your device can handle h264 high profile so you don't need to worry about -profile
[20:31] <burek> (you can omit that option in ffmpeg)
[20:31] <Darkclaw66> okay cool, so just -crf 18 ?
[20:32] <burek> judging by 624x352 and 1.1mbps I would say this is some pretty good quality encoding
[20:32] <burek> usually vga is around 512 hq for h264, but it depends on the dynamic of the video though
[20:32] <burek> try -crf 18
[20:33] <burek> and use -preset medium or slower or slow
[20:33] <Darkclaw66> crf affects the frame rate and the bitrate?
[20:33] <burek> to lower the output file size (without loss of quality)
[20:33] <burek> it doesn't affect the frame rate afaik
[20:33] <burek> starPause, well, I mean't like "did you try google" :)
[20:34] <Mavrik> Darkclaw66, only bitrate
[20:34] <Mavrik> Darkclaw66, it's just a saner way of telling the x264 encoder what kind of quality you want
[20:35] <Darkclaw66> I see, using crf is the best option when converting
[20:35] <Darkclaw66> because it lets the codec do the evaluation
[20:36] <burek> yes
[20:36] <burek> crf mostly lets you choose the quality over the file size (and cpu)
[20:37] <burek> so consider it like a "quality level" option
[20:37] <Darkclaw66> is there a same feature for handling the audio part?
[20:37] <burek> and -preset kinda "encoding speed level" option
[20:37] <burek> maybe -aq
[20:37] <burek> but it depends on audio encoder used
[20:37] <Mavrik> yeah
[20:39] <Darkclaw66> last question, promise. if I want to see how well it converted the quality over, what would I need to look at?
[20:40] <Darkclaw66> from what I understand, the bitrate between the codecs would not be the right value to compare
[20:40] <burek> for h264 codec, the bitrate is mostly an average
[20:40] <burek> so, it makes sense why is it not the same thing
[20:41] <burek> if you set -b 1400k you'll make your video of constant bitrate
[20:41] <burek> so your dynamic scene changes will be encoded as garbage and slow motion scenes are going to waste bits
[20:42] <burek> because it would always be encoded with the same (1400k) bitrate
[20:42] <burek> with -crf you make variable bit rate
[20:42] <burek> (adapted to scene dynamics)
[20:43] <burek> anyway, if you want to target the best quality, for the given file size, you can always use 2-pass encoding
[20:43] <Mavrik> Darkclaw66, well... you run both videos side by side and see with your eyes
[20:43] <burek> that would give you the best quality for the given file size
[20:44] <Darkclaw66> but if we increase the value of -crf, that will maximize the bitrate x264 will use?
[20:44] <Mavrik> Darkclaw66, there itsn't really any good "number" metric that would show what your eyes can see
[20:44] <Mavrik> decrease :)
[20:44] <Mavrik> crf is inverse - higher numbers mean worse quality
[20:44] <Darkclaw66> oh yikes..
[20:44] <Darkclaw66> okay I'll try this out thanks
[22:20] <Darkclaw66> you guys still there
[22:20] <Darkclaw66> the conversion using -crf is complete and it's half the size of the original
[22:21] <Darkclaw66> that can't be a good thing right?
[22:24] <Darkclaw66> the bitrate is pretty high though
[22:28] <Darkclaw66> my only question now is if there is any point going lower than 18 on crf
[22:49] <JEEB> Darkclaw66, you look at the output? If it looks good, you try making the crf value higher, if it looks bad you push it lower a bit
[22:49] <JEEB> you only have to encode like 2500 or so frames for testing from various spots of the source to get a general grip
[22:50] <floater_a5bcc8> anybody successfully installed farstream from src on linux?
[00:00] --- Sun Jun 17 2012


More information about the Ffmpeg-devel-irc mailing list