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

burek burek021 at gmail.com
Fri Sep 5 02:05:01 CEST 2014


[01:09] <ac_slater_> hey all, I wonder what libavformat/libavcodec do when you feed it raw video. Im guessing it uses avio. Any pointers?
[03:32] <damarusama> I have a mp4 and I want to transfer it to ogv and webm - without changing the bitrate or the size, should I simply ommit these 2 setting
[03:33] <damarusama> ffmpeg -i input.mp4 -acodec libvorbis   output.webm
[03:36] <llogan> that will use that default settings which will probably look crappy
[03:37] <damarusama> ho - so how can I retreive the setting from the actual video?
[03:37] <damarusama> can I use ffmpeg for that?
[03:38] <llogan> it won't change the frame size unless you tell it to
[03:39] <damarusama> so if my video look perfect in mp4, and I only want to tranfer it to webm would I need to add other flag?
[03:40] <llogan> but attemping to "recycle" the bitrate won't result in good videos. it doesn't generally work that way.
[03:41] <damarusama> so the export I did ended up in a very crappy export...
[03:41] <llogan> especially since 1) who knows if the input video was encoded by someone (or something) who knows what they are doing 2) you're encoding to different formats, and even various implementations of encoders can vary dramatically
[03:42] <llogan> this may help: http://trac.ffmpeg.org/wiki/vpxEncodingGuide
[03:42] <llogan> but i've never really encoded to VP8
[03:42] <llogan> http://trac.ffmpeg.org/wiki/Encode/VP8
[03:42] <llogan> and http://www.webmproject.org/docs/encoder-parameters/
[03:44] <damarusama> thanks
[03:50] <llogan> damarusama: i see no reason to even encode (old, crusty) ogg if you're making webm
[05:37] <Wader8> hello
[05:37] <Wader8> fieldmatch and decimate are to be used together ?
[05:38] <Wader8> onlly fieldmatch alone produces the best results, decimate only is the worst, both create significant video speedup and therfore desync
[05:59] <Nanashi> I have a question. http://pastebin.com/dtCsShuU
[05:59] <Nanashi> Why the difference in filesize when I tried two pass vs one pass?
[06:02] <Nanashi> Did the first line I had make things go funny?
[06:02] <Nanashi> The second output is 60% larger than the first.
[06:13] <Wader8> 2 pass = better compression
[06:13] <Wader8> with same quality, i think
[06:13] <Wader8> at least percieved quality
[06:15] <Nanashi> I see. I did the 2 pass thing again doing -c:a blahblah instead of -an blahblah and it did the same thing
[06:16] <Nanashi> But I thought the bitrate setting would've determined an approximate range of output filesize?
[06:18] <Nanashi> I guess -crf had more influence over it? (after all if you did 2 pass for more efficiency and crf remains same...)
[06:18] <Nanashi> gaah confuzzled
[06:19] <Nanashi> OH
[06:19] <Nanashi> -b:v sets the max bitrate when crf is used
[06:19] <Nanashi> makes sense
[06:37] <Wader8> crf is used for quality so it kind of overrides your bitrate settings i think
[06:51] <Nanashi> It does. -b:v becomes the max allowed bitrate instead of the bitrate (meaning it should be set or else it'll use the worse default)
[07:04] <Nanashi> added -cpu-used 0 -quality good and shrinked it down to 27,729 KB
[07:04] <Nanashi> I can't find info on the default values.
[07:35] <Wader8> hello
[07:35] <Wader8> how do I adjust audio when converting from 29 to 30 ?
[07:50] <Nanashi> whoa I further shrinked it down to 19,296 KB
[07:53] <Nanashi> But that shouldn't be happening? (-qmin 0 -qmax 50 -b:v 3M) 3 Mbps is still a bit more than the average bitrate of the previous encode; I'm not seeing why the drastic size decrease.
[07:54] <Wader8> hey you're the only one here iafaik
[07:54] <Nanashi> * -crf 10 (this one kept same for both)
[07:55] <Wader8> do you know how to adjust the audio in ffmpeg while converting fps from 29.9 to 30
[07:55] <Nanashi> oh, fps
[07:55] <Nanashi> What do you mean by adjust audio?
[07:56] <Nanashi> -r 30 sets framerate to 30
[07:59] <Nanashi> somewhat noob here; I don't think you should touch that though...
[08:02] <Wader8> okay, nevermind ...
[13:50] <avantus> hi. Need some help with drawtext filter: adding fixed width, so the text will auto wrap. Is this possible?
[14:26] <saste> avantus, i don't think so, not ATM
[14:28] <relaxed> avantus: maybe using libass would work?
[14:30] <avantus> relaxed: compiling custom version of ffmpeg?
[14:31] <relaxed> yes, if you build doesn't have support for it. Or there's http://johnvansickle.com/ffmpeg/
[14:31] <relaxed> your*
[14:32] <relaxed> avantus: https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
[14:39] <avantus> iam using zeranoe builds it seems to have it
[14:40] <avantus> how do i envoke libass options?
[14:42] <relaxed> the ass filter reads its options from a file, see the lnk I posted and http://en.wikipedia.org/wiki/SubStation_Alpha#Advanced_SubStation_Alpha
[14:43] <avantus> its a plain .txt doesnt have any options
[14:44] <relaxed> avantus: you can create the subs.ass using http://www.aegisub.org/
[14:46] <avantus> relaxed: iam not creating subs, iam burning text created by thirdpary app
[14:47] <avantus> drawtext=fontfile='C\:\\Windows\\Fonts\\arial.ttf':textfile='news.txt':fontsize=20
[14:49] <relaxed> If drawtext works for you then great
[14:50] <avantus> it works, but id like to wrap it within specified limits, my .txt doesnt have any additional info, not even line breaks
[14:50] <SirDarius> is it possible for ffmpeg, when writing a sequence of images, to output each filename effectively written on stdout or stderr ? (as per, eg.  ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg')
[15:16] <jude_> Is there a way to add opacity to a video overlay without a mask image? I tried the last answer in http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=1208, but I get errors. Any suggestions or examples?
[15:18] <t4nk958> \LIST
[18:10] <jude_> is there a way to blur the edges of an overlay without using an image map?
[19:16] <leeatk> Hi - could someone confirm whether or not ffserver supports HLS as an output stream format?
[20:03] <llogan> jude_: i'm not sure, but you could possibly create a mask with color or geq
[20:09] <CoreISP> Hey folks, was wondering if anyone perhaps can help, Google says NO!. I have a VOB file that PS3 can't find audiotracks for. VLC can. According to VLC it's stream 5. (And VLC plays audio, no problem.) But ffmpeg apparently can't see stream 5 either, map claims it doesn't exist and ffprobe claims there's 3 streams total. Hurrr? :)
[20:10] <c_14> Can you pastebin the output of ffprobe file.vob ?
[20:12] <CoreISP> c_14, certainly; http://pastebin.com/apu079GZ
[20:12] <llogan> Consider increasing the value for the 'analyzeduration' and 'probesize' options
[20:14] <CoreISP> llogan, yeah did that; still only sees those 3 streams it gives in that pastebin
[20:15] <CoreISP> Oh crap, I gave a wrong input
[20:20] <CoreISP> So it managed to find the stream, however when I'm trying to extract it (though I must admit, i'm not sure if I'm using the right command there) it claims there is no audio stream. When playing it in VLC the first 8 secs or so indeed it doesn't see an audiostream either, but it does pick up on it as soon as it needs to
[20:21] <llogan> could you provide the input file? or use dd to make a short sample
[20:24] <CoreISP> http://pastebin.com/2U0Kk1MV
[20:25] <CoreISP> llogan, the file itself is 1.1GB or something; so a short sample would probably be the best way to go. Do you have a !shortcut to the proper arguments, or best to Google?
[20:25] <llogan> there is an example in http://ffmpeg.org/bugreports.html
[20:26] <llogan> be careful not to overwrite your input!
[20:28] <mistawright> hi guys i am trying to convert a group of images to a slideshow and need the video to be a set size and if the images are not that size show them fullsize and add a black border around it
[20:29] <mistawright> i have not found out how to set the resolution of the video yet
[20:30] <CoreISP> llogan, gotcha. Reduced it, now just need to upload it heh
[20:32] <toddw> anyone here had luck using ffmpeg on osx with burn-in subtitles?
[20:34] <CoreISP> llogan, https://mega.co.nz/#!S0lWjaSQ!zJ1De5z8IQGDeSUenhtKt7HhpuxB5R8Ixg4fwjWBj30
[20:35] <CoreISP> Same in that file, audio doesn't appear to be starting until after x amounts of seconds (at least, according to the VLC codec output)
[20:35] <llogan> mistawright: maybe this? http://superuser.com/a/547406/110524
[20:40] <ogrgkyle> hey
[20:40] <CoreISP> Out of curiosity... is ffmpeg trying to converse resources when running?
[20:40] <mistawright> llogan, this is before it is output as a video. I have images that are 640x360 i need the video to be 853x480. I'm not sure how to set the video size as I have a transparent overlay that is 853x480 that is being cropped down to the size of the images
[20:40] <ogrgkyle> i'm going to mention interlacing (i hope i don't get tarred and feathered :)  )
[20:41] <ogrgkyle> can ffmpeg encode to an interlaced x265 (hevc) file?
[20:41] <llogan> CoreISP: no, but it can depend on the encoder being used among other things
[20:42] <CoreISP> llogan, I see. I've been trying to convert this vob to mp4 you see, takes ages and not even sure if it's really working as VLC seems to refuse to play it heh
[20:42] <JEEB> ogrgkyle, I think libx265 can at least encode in field mode
[20:42] <JEEB> the way interlaced content is supposed to be encoded in HEVC is that you encode each slice as a separate picture, basically
[20:42] <mistawright> trying the -s 853x480 does not work. it gives me an error
[20:42] <ogrgkyle> JEEB: okay, i read something about that, but i couldn't figure out how to write the command line for ffmpeg.
[20:43] <ogrgkyle> do you know how i might try this?  can you give me an example command?
[20:43] <klaxa> if you are using libx264 for encoding, h264 needs x and y resolution to be divisible by 2
[20:43] <klaxa> cc: mistawright
[20:43] <JEEB> klaxa, no - AVC has no limitation on the resolution, it's the chroma subsampling that limits its
[20:44] <JEEB> *it
[20:44] <klaxa> oh?
[20:44] <klaxa> okay
[20:44] <JEEB> if you encode 4:4:4 or 4:2:2 you have lesser limitations
[20:44] <JEEB> 4:2:0 is of course mod2 for width and height
[20:44] <JEEB> 4:2:2 is then mod1 for height and mod2 for width
[20:44] <klaxa> oh yeah that makes sense
[20:44] <JEEB> 4:4:4 is then mod1 for both width and height
[20:44] <JEEB> :)
[20:45] <JEEB> ogrgkyle, I have no idea how to pass the option through the libx265 wrapper in ffmpeg, but I think it should be possible as Dae made the wrapper have an option that you could just pass API options with
[20:45] <JEEB> basically look up the API options from x265's side
[20:45] <JEEB> and then look up the option (I think it was x265opts or something?) to set those API options
[20:45] <llogan> -x265-params
[20:45] <JEEB> ah yes
[20:46] <JEEB> also, I have no idea if you need to do the field separation by yourself
[20:46] <llogan> ffmpeg -h encoder=libx265 should show some other private options, if any
[20:46] <JEEB> as in, it won't be done automagically
[20:46] <JEEB> yeah, but dae generally minimized those
[20:46] <ogrgkyle> okay
[20:46] <JEEB> because he hated how the libx264 wrapper ended up
[20:46] <ogrgkyle> i'll try llogan's command there
[20:46] <llogan> ah, just -preset and -tune
[20:47] <JEEB> pretty much
[20:47] <mistawright> klaxa, that worked. it was due to it being an odd number like you said. with that being said my images and overlay are not the correct size. how can I set the size of the overlay?
[20:47] <toddw> thanks llogan
[20:48] <toddw> I am having trouble getting subtitles to work on OSX. Here is my command and output: http://pastie.org/9527547. This ticket seems to refer to what I'm experiencing: https://trac.ffmpeg.org/ticket/2100. But following the directions at the end of the ticket comments doesn't work. Has anyone had success getting ffmpeg on OSX to burn in subtitles correctly?
[20:48] <ogrgkyle> JEEB, llogan - So is this what I want to be reading? http://x265.readthedocs.org/en/latest/cli.html
[20:50] <JEEB> ogrgkyle, if it contains the API documentation too, yes
[20:50] <JEEB> because you will be giving the stuff to the API, not the command line encoder
[20:51] <ogrgkyle> hmm ok!
[20:52] <llogan> toddw: does it make a difference if you use ass filter instead of subtitles filter?
[20:53] <toddw> llogan: no it doesn't. I've also used the subtitles filter.
[20:53] <llogan> mistawright: you can use the scale filter instead of -s. it's more flexible.
[20:53] <toddw> also for sake of fontconfig, I've set the environmental variable as suggested but no luck. fontconfig appears to be setup corrrectly and working on my machine (installed with homebrew). Utilities like fc-list work correctly.
[20:54] <llogan> does it work if you download one of the static builds available for OS X? (assuming they contain libass support)
[20:54] <llogan> see ffmpeg download page
[20:54] <toddw> it doesn't. I tried that.
[20:54] <toddw> I've also ensured my homebrew build includes libass
[20:55] <ogrgkyle> maybe a newbie question.  what does this mean?  "-x265-params       <string>     E..V.... set the x265 configuration using a :- separated list of key=value parameters"
[20:55] <llogan> toddw: are you sure the .ass or .srt file is valid
[20:55] <toddw> llogan: do you know a way to verify it?
[20:55] <toddw> llogan: it does work correctly in VLC
[20:56] <JEEB> ogrgkyle, it takes in a string ("text"), and it's for Encoding, and the string should be a list of key=value options separated by the symbol :
[20:56] <CoreISP> llogan, using ffprobe with like a probesize and analyzeduration of 1000000000; it does detect the audiostream. However, when then trying to cut the first seconds of the VOB out (the problematic part); it gives the same error again even whilst using the same probesize and analyzeduration. (could not find codec paramaters blabla, consider increasing probesize, etc. etc.)
[20:56] <ogrgkyle> For example, I know you can do this: -x265-params crf=15.  But how do I add two params?
[20:56] <llogan> toddw: i guess that's good enough to test. well, there goes any of my ideas.
[20:56] <llogan> try ffmpeg-user mailing list? provide the complete ffmpeg command, console output, and the srt or ass input file
[20:56] <toddw> ok, thanks llogan
[20:57] <ogrgkyle> JEEB: okay, maybe like this?  -x265-params crf=15:crf-max=30
[20:57] <JEEB> ogrgkyle, yes. although you most probably will have to make the string be in quotation marks
[20:57] <JEEB> depending on your command line or shell environment
[20:58] <ogrgkyle> windows cmd?
[20:58] <JEEB> whatever is being used to pass parameters to a program :P
[20:58] <llogan> CoreISP: i don't know then. trawl the bug tracker for an existing bug?
[20:59] <JEEB> all command line environments have their own needs of "escape" certain symbols so that the environment doesn't try to interpret it in any fancy way
[20:59] <ogrgkyle> JEEB: okay, i'll try!
[20:59] <ogrgkyle> thanks for the help guys
[21:02] <CoreISP> llogan, ah its probably some crap in the VOB file; wish there was a way to make ffmpeg just ignore that part. Don't know of another tool to just cut off those seconds. ffmpeg is happy to cut them out, but then removes the audio all together, heh
[21:03] <llogan> a lame method would be to use dd with skip
[21:03] <llogan> skip option
[21:04] <CoreISP> Hm, I wonder how much MB constitutes removing the first 10 secs or so; although the entire first minute is rather irrelevant so guess it doesn't matter much heh
[21:04] <CoreISP> Oh actually 10MB would do.
[21:18] <CoreISP> llogan, actually; your method seems to work, lame or not. Just for some reason dd is extremely slow going about it
[21:18] <CoreISP> It skipped the first 10MB alright, and both ffmpeg as vlc now instantly recognize the proper audio channel. Just not sure why dd is taking uber long to finish up; whilst a regular write test goes about roughly 390MB/sec lol
[21:26] <CoreISP> llogan, oh duh. Specifying a blocksize of 1 will make it go byte by byte after skipping the first 10MB. Problem all sorted with dd, thanks a ton! :)
[21:29] <llogan> CoreISP: glad it worked
[21:45] <sheshkovsky> Hi, I want to burn .srt subtitle into .mp4 video files from command line in ubuntu 14.04
[21:45] <sheshkovsky> ffmpeg -i T.mp4 -f srt -i T.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4
[21:45] <sheshkovsky> this commands works but it doesn't really burn it on the video
[21:46] <sheshkovsky> it only attached the srt file to the video
[21:46] <JEEB> yes
[21:46] <sheshkovsky> How can I make it always visible?
[21:47] <JEEB> if you are using Libav, there's no filter for that afaik, and if you're using FFmpeg, then you should be able to do it with the ass rendering feature
[21:48] <sheshkovsky> Alright, then I should convert the srt first to ass, and then burn it to the video?
[21:48] <llogan> do you want hardsubs or softsubs?
[21:48] <JEEB> he said he wants to "burn into"
[21:48] <JEEB> I'd say that's pretty obvious
[21:48] <JEEB> and he was already doing softsubs
[21:48] <llogan> always good to ask because his command looked like soft
[21:48] <JEEB> sheshkovsky, does your ffmpeg say Libav developers or FFmpeg developers in the copyright line?
[21:49] <JEEB> <sheshkovsky> this commands works but it doesn't really burn it on the video
[21:49] <llogan> 14.04 doesn't ship Libav ffmpeg
[21:49] <JEEB> ok
[21:49] <JEEB> not even a link?
[21:49] <JEEB> or anything
[21:49] <JEEB> ln -s
[21:49] <JEEB> I haven't even tried :P
[21:49] <llogan> same
[21:49] <JEEB> oi
[21:50] <JEEB> ok
[21:50] <sheshkovsky> How can I check the copyright line?
[21:50] <llogan> run "ffmpeg". the first line in the output will say
[21:50] <sheshkovsky> ffmpeg version 1.2.6-7:1.2.6-1~trusty1 Copyright (c) 2000-2014 the FFmpeg developers
[21:51] <JEEB> > 1.2.6
[21:51] <llogan> is that from a PPA?
[21:51] <JEEB> yes, you will want something newer
[21:51] <sheshkovsky> Yes
[21:51] <llogan> do you see ass or subtitles in "ffmpeg -filters"?
[21:52] <llogan> ...if that option even works in 1.2.x
[21:52] <llogan> note that audio filters may be listed first if you don't grep
[21:53] <sheshkovsky> nor ass nor subtitle filter
[21:54] <llogan> get a build at http://johnvansickle.com/ffmpeg/
[21:56] <llogan> then run "./ffmpeg -i input -vf subtitles=T.srt -c:a copy output.mp4" if you want hardsubs
[21:56] <sheshkovsky> thanks, and is there any guide to install it?
[21:56] <llogan> sure: download, extract, run
[21:56] <sheshkovsky> great
[21:56] <sheshkovsky> one more question
[21:57] <sheshkovsky> I need to change color and fontsize of subtitle and also add background to it, does ffmpeg support these options?
[21:57] <sheshkovsky> I've seen some commands in mencoder
[21:57] <llogan> i don't know if you can change color in srt, but you can with ass
[21:58] <sheshkovsky> but they didn't work properly. sub-bg-color doesn't work with .ass
[21:58] <sheshkovsky> and fontsize option doesn't work with .srt
[21:58] <sheshkovsky> OK no problem. It seems converting to ass is the only way to go
[21:58] <llogan> by color i meant font color. not sure about any bg stuff. ass can let you change font size too, AFAIK
[21:59] <llogan> aegisub is a good gui for that
[21:59] <iive> sheshkovsky: you use aegisub to change the .ass subtitles.
[21:59] <sheshkovsky> actually I'm going to write a simple application myself with pyGtk
[21:59] <sheshkovsky> for persian users
[21:59] <sheshkovsky> So I need to do it myself
[22:00] <sheshkovsky> i saw aegisub but it isn't open source unfrotunately
[22:00] <llogan> i saw someone working with persian subs with ffmpeg somewhere recently, but i'll be damned if i remember where
[22:01] <sheshkovsky> i've just asked my question on askubuntu.com : http://askubuntu.com/questions/519631/how-to-change-subtitle-color-and-other-options-in-mencoder-command-line-tool?noredirect=1#comment706106_519631
[22:01] <sheshkovsky> I would be appreciated if anyone could help me with this
[22:02] <llogan> font size in ass might work for you
[22:02] <optix2_> sheshkovsky: you change color/font size in the subtitle file
[22:02] <optix2_> and as llogan said use .ass and set it there
[22:03] <llogan> sheshkovsky: yeah, i think that's where i saw persian and ffmpeg in the same post recently
[22:03] <sheshkovsky> ok. thank you guys. I'm gonna give it a try
[22:04] <optix2_> sheshkovsky: ass is well documented, just open it with a text editor and it should be more or less self-explanatory
[22:04] <sheshkovsky> yeah. I preferred not to open the file
[22:05] <JEEB> if you want to edit ass
[22:05] <JEEB> use aegisub
[22:05] <sheshkovsky> but if I have to, it's not very complicated task with python
[22:05] <iive> he wants to automate it
[22:05] <JEEB> ah
[22:05] <optix2_> sheshkovsky: also doing "-c:v copy" will not change the video and therefor not give you hard-subs, you need to reencode
[22:09] <llogan> sheshkovsky: im not sure if an "incorrect" PlayResX and PlayResY in ass will cause font size issues with ffmpeg. just something to look into if you run into size issue
[22:10] <optix2_> sheshkovsky: do you have a reason to change the color? do the subtitle files contain only a single "speaker"/style?
[22:11] <sheshkovsky> I've just tried this: ./ffmpeg -i input -vf subtitles=T.srt -c:a copy output.mp4 and it worked. Subtitled burnt into the video
[22:11] <sheshkovsky> however it seems it takes longer to do it than mencoder
[22:12] <sheshkovsky> anyways, now I need to change the color
[22:13] <Plorkyeran> sheshkovsky> i saw aegisub but it isn't open source unfrotunately <-- wat
[22:13] <Plorkyeran> aegisub absolutely is open source
[22:14] <sheshkovsky> Oh yeah. I see now the source
[22:14] <sheshkovsky> does it use ffmpeg?
[22:15] <iive> actually it does, through ffms2
[22:15] <iive> but just to do interactive video/audio
[22:16] <optix2_> sheshkovsky: color is the fourth entry in style definition. if you plan to do it with ffmpeg then just edit it beforehand (awk/grep/etc.)
[22:18] <sheshkovsky> it seems wierd. because i see mencoder has some commands like : -ass-color -ass-force-style etc. to manipulate ass file
[22:18] <sheshkovsky> and as far as I know mencoder is using ffmpeg
[22:27] <SlugWart> Hey all, I'm trying to alter a file in libavformat for a windows vlc plugin, which means building and cross-compiling both vlc and ffmpeg.  I've built, compiled and tested a straight vlc build from source, but building ffmpeg is frustrating me.
[22:29] <SlugWart> When building ffmpeg from source in a situation like this, should I be targeting the mingw32 as an os, or should I just build it normally and then let the vlc build cross-compile it?
[22:36] <sheshkovsky> Guys i've found this: https://www.ffmpeg.org/doxygen/trunk/ass_8c.html . Does anyone know how can I use this in command line or python?
[23:57] <ogrgkyle> hey
[23:57] <ogrgkyle> can hevc have variable frame rate?
[00:00] --- Fri Sep  5 2014


More information about the Ffmpeg-devel-irc mailing list