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

burek burek021 at gmail.com
Fri Oct 3 02:05:01 CEST 2014


[00:35] <c_14> siddeek: The scale filter is internal and shouldn't require any external dependencies. As long as you don't explicitly --disable-everything you should be fine. Also, in most cases the name of the config option tells you what it enables. The only exception I can think of off the top of my head is a few ffmpeg-internal things which might only compile with --enable-gpl
[00:40] <siddeek> Yes, I do --disable-everything
[00:40] <siddeek> As I said, I want my build to be minimal
[00:40] <siddeek> I want to scale a certain type of videos only
[00:41] <c_14> Well, you'll need --enable-filter=scale also the demuxer,muxer,decoder,encoder and maybe parser you want.
[00:41] <siddeek> Yes, I have all of those
[00:41] <c_14> not working?
[00:41] <siddeek> Nope
[00:41] <c_14> Message?
[00:42] <siddeek> No message'Just doensnt show up in the configure message
[00:42] <siddeek> also when doing ffmpeg -filters it doesnt show
[00:42] <siddeek> The filter 'trim' works though
[00:44] <siddeek> Sorry, I meant 'crop' works
[00:44] <siddeek> I'll give a pastebin of the configure and the output I get
[00:45] <c_14> Did you --disable-all ?
[00:45] <siddeek> uYes
[00:45] <siddeek> Yes*
[00:45] <c_14> Did you enable swscale?
[00:45] <siddeek> Oh!
[00:46] <siddeek> No I didn't
[00:46] <siddeek> let me try that
[00:47] <siddeek> Still doesn't work
[00:48] <siddeek> Is the order in which I enable internal stuff important?
[00:48] <c_14> shouldn't be
[00:48] <siddeek> Things like 'avfilter' and 'avformat'...
[00:48] <siddeek> So I have --disable-all
[00:48] <siddeek> And --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-avfilter --enable-swscale
[00:50] <c_14> Can I see your config.log ?
[00:53] <c_14> `./configure --disable-all --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-avfilter --enable-swscale --enable-filter=scale' <- that makes it show up for me in the configure output. Haven't tested building/running it though.
[00:53] <Diogo> Hi this is possíble using ffmpeg generate the first chunks (size or duration) of hls shorter than the rest
[00:54] <c_14> Not that I know of, why?
[01:00] <c_14> siddeek: I also enabled ffmpeg, built and scale is in ffmpeg -filters.
[01:06] <siddeek> c_14: http://pastebin.com/CfNi7GGX
[01:06] <siddeek> c_14: sorry, was away
[01:07] <c_14> --enable-filter=scale ?
[01:11] <siddeek> Oh! Terribly sorry!
[01:11] <siddeek> It works now. Thanks.
[01:36] <hroi> ok one more -- you know in camera view --- there is a gray padding around the camera in the viewport -- can I controll the amount of padding?
[01:36] <hroi> sorry wrong chan.
[01:53] <dahat1> an anyone see why the following modified make file cannot build librtmp (from rtmpdump) under mingw with the MSVC toolchain? http://pastebin.com/yi1QRjVp (I've also tried without renaming instances of .a to .lib) For note the error I get is seen at http://pastebin.com/KH9HTCqc
[01:53] <dahat1> *can
[03:51] <kismet_> Hello, I've installed ffmpeg at /root/bin/ffmpeg. How I am going to have this accessible by any users?
[03:56] <JodaZ> you aint
[03:56] <JodaZ> lol, install it somewhere else
[03:59] <kismet_> JodaZ: I've followed the compilation guide at ffmpeg.org
[04:00] <kismet_> JodaZ: Is it possible to move it somewhere else?
[04:02] <JodaZ> not sure, might still look for the profiles in that path
[04:03] <JodaZ> just recompile with different path set
[04:03] <JodaZ> i think /opt and /usr/local are popular
[04:05] <kismet_> JodaZ: what argument is passed into configure to specify path?
[04:05] <JodaZ> what did you pass in?
[04:06] <JodaZ> grep "/root" ffmpeg
[04:08] <kismet_> JodaZ: I didn't specify
[04:08] <kismet_> Followed this guide https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
[04:09] <active8> hi. i wasn't expecting this - request to set up either live streaming or video conference (back burner that idea for now) for a private weekly meeting hosted by a church. I'd use ffmpeg rtmp protocol, but this is going to have to be uber user friendly and preferably on a refurb ($100 - $200 unit from PC Retro) with either linux desktop or [choke] windows. For just a live stream, they're already doing that for regular services, so it'll just require some logi
[04:09] <active8> n code. What minimum system requirements should I look for and what is the easiest route so someone can just click and stream? I could do a video4linux2 webcam grab on a minimal linux install but might need to use their main camera.
[04:13] <JodaZ> active8, skype videoconferencing is free now :)
[04:16] <active8> that might just do it, JodaZ. what about minimum HW and SW platform? Skype never worked for me on centos and I'm not as familiar with debian or zorin. Doze would be a resource hog so it would probably need better hardware.
[04:17] <JodaZ> active8, android or windows
[04:17] <active8> android has an OS for PCs, now?
[04:18] <JodaZ> you should be able to install it on a pc
[04:18] <active8> hmm
[04:21] <active8> have to see if they want to video conference. I could stream from a command line only linux box with ffmpeg. one command for them to type after login 8) might be nice if they could use the thing for something else, though.
[04:22] <JodaZ> use their existing hardware and make it work
[04:23] <JodaZ> seems skype still exists
[04:23] <JodaZ> for linux that is
[04:25] <active8> if a cable can be run to the room... I think their live feed comes from these wall mounted cams they use - might be ethernet cams. They have this larger camera they set up to record - not sure if it's part of the live stream. It could be set up in the meeting room, but it only outputs on coax to the control room.
[04:30] <JodaZ> dude, the pastor has his office computer there surely
[04:30] <JodaZ> install skype on it and bring a 15 bucks webcam
[04:38] <active8> they have several computers, a control room for video, and a mixer in the loft. the office's and the basement where the meeting is are separated by a distance. a webcam should capture enough for this purpose and saves having to run cables and all that noise. He wants a laptop just for that meeting. It's their addiction ministry meeting. yeah. skype sounds like the way to go. If my old field laptop can handle skype with XP it shouldn't tke much more to get wi
[04:38] <active8> n7 to behave.
[04:39] <active8> ffmpeg still rules, though, just sayin'
[04:58] <dahat1> can anyone see why the following modified make file cannot build librtmp (from rtmpdump) under mingw with the MSVC toolchain? http://pastebin.com/yi1QRjVp (I've also tried without renaming instances of .a to .lib) For note the error I get is seen at http://pastebin.com/KH9HTCqc
[05:20] <fling> which codec to use for pentium3 player?
[05:20] <fling> I will encode on fast 1100T and will watch live realtime on a slow pentium3 :<
[05:20] <fling> so will not write any files
[05:21] <relaxed> fling: try mpeg4
[06:18] <dahat1> Would there be a better place to ask Q's about issues with rtmpdump & librtmp than here?
[06:35] <fling> relaxed: thanks.
[06:35] <fling> relaxed: and what for sound?
[06:35] <fling> relaxed: is not there a good profile something that will encode in like dvd quality without much extra commandline args
[07:52] <relaxed> fling: ffmpeg -i input -c:v mpeg4 -q:v 3 -vtag XVID -c:a libmp3lame -b:a 192k output
[08:06] <fling> relaxed: thanks :>
[08:27] <active8> i see in VLC Media Info tool , changing the Title changes the metadata for 'title' that I can see in ffprobe and 'Title' with mediainfo. Also the 'Movie name' from mediainfo output changes with it. This is just called matadata? ID3 is sound only, right? is this metadata also called something else? what tools can change it? I suspect ffmpeg is one.
[08:30] <active8> yeah id3 is for mp3 only. what about the other stuff?
[08:34] <c_14> active8: It's usually just called file metadata. For mp3, any id3 tag editor can change it (and yes, ffmpeg can also set id3 tags). Other metadata depends on the format, but ffmpeg can set most of them.
[08:35] <active8> i'm guessing different formats only support certain tags, or is there a metadata section with any old tag like an associative array?
[08:36] <c_14> Depends on the format. Most metadata formats can support arbitrary tags, but there are usually a couple of well-defined tags that many programs read and contain useful information about the file.
[08:37] <c_14> In the id3 case, title, artist, album artist, track # etc.
[08:39] <active8> hmm.. mediainfo spits out a boat load of stuff but it can't all be metadata. I'm finding some promising google returns, I think. example would be: Bit rate : 72.0 Kbps and listed again as 72000 - tons of info!
[09:14] <Alina-malina> hey guys i want to make special effects like here http://youtu.be/QF9u6MLTHGQ?t=29s  is it possible to make a slideshow like this and add such cool stuff to images with ffmpeg? any howtos?
[09:15] <c_14> slideshow yes, effects no.
[09:15] <Alina-malina> hmmm
[09:15] <c_14> You might want to look into an nle.
[09:15] <Alina-malina> what is that?
[09:15] <c_14> https://en.wikipedia.org/wiki/Non-linear_editing_system
[09:16] <Alina-malina> hmmm k
[09:19] <Alina-malina> are you sure this was made with kind of equipment, i think i can do this with special image libraries, i thought there are other easier ways to do this
[09:21] <c_14> An nle isn't necessarily equipment.
[09:21] <c_14> There are software editors.
[09:22] <Alina-malina> hmmm
[09:22] <Alina-malina> what kind of?
[09:23] <c_14> https://en.wikipedia.org/wiki/List_of_video_editing_software
[09:23] <c_14> Haven't used one in years, so I can't give recommendations though.
[09:24] <Alina-malina> ok thanks
[11:37] <Diogo>  Hi this is possíble using ffmpeg generate the first chunks (size or duration) of hls shorter than the rest (for hls streaming)
[12:05] <saste> Diogo, with the segment muxer you can specify the duration of each chunk
[12:05] <saste> -segment_times
[12:06] <hungnv> when using ffmpeg, after reading using av_read_frame(ic, &pkt) for while, I got this http://pastebin.com/HiVHVGUw and nothing more. Can somebody help? Thanks
[12:06] <Diogo> saste: but this is possible the first 10 chunk with some duration and the other with other duration?
[12:06] <Diogo> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5,5,5,5,5...
[12:06] <Diogo> like this
[12:07] <saste> Diogo, live streaming?
[12:07] <saste> Diogo, you can generate such a list with a script
[12:08] <Diogo> not live streaming but i need small chunk at the begining because i am trying to encode at real time..
[12:08] <saste> alternatively, you could use an expression, something like if(lt(N, 10),2,5)
[12:08] <saste> but that's not supported at the moment
[12:09] <saste> what's the problem with generating the list with a script?
[12:09] <Diogo> where i can find more information about that script?
[12:09] <saste> or simply hardcode -segment_times 2,2,2,2,...,5,5,5,...
[12:09] <Diogo> in my plataform i generate the hls playlist in other part of my code..
[12:10] <saste> Diogo, you just need to check segment documentation, you can use a script to automatically generate such list in case you need to do that
[12:10] <Diogo> but i need that list before encode the file
[12:12] <Diogo> i develop a m3u8 playlist generator based of the duration of the video...
[12:13] <Diogo> and after that i force in ffmpeg command :keyint=25:min-keyint=2:no-scenecut ...and  segment_time ..with the duration of each chunk...
[12:14] <Diogo> segment_times what is the limit of values in this parameter?
[12:18] <saste> Diogo, limit of values??
[12:18] <Diogo> limit of segement times 2,2,2,2,2,2,2,2,2,2,......5,5,5,5,5,5,5,5,2,
[12:18] <Diogo> ...
[12:19] <saste> Diogo, your program memory is the limit
[12:19] <saste> it is dynamically allocated
[12:20] <Diogo> ok
[12:20] <Diogo> thanks i will try that
[12:21] <Diogo> with ffmpeg this is possible to generate the list of chunks without generate the chunks?
[12:21] <Diogo> only generate the list m3u8 in a quick way..
[12:23] <siddeek> Is it possible to chain a crop filter with a scale filter? How can I do that?
[12:24] <siddeek> -vf "[in] scale=200:100, crop=100:100:0:0 [out]"
[12:42] <siddeek> Do I need to enable something specific when building ffmpeg to be able to chain filters?
[12:46] <fling> relaxed: this is playing with almost none frame drops -> ffmpeg -i in.wmv -s ega -c:v mpeg4 -q:v 3 -vtag XVID -c:a libmp3lame -b:a 64k out.mkv
[13:24] <joules> hi, any reason on the 16 thread limit/warning? (libx264). I prefer to go 22 or even 24.
[13:24] <joules> and I do. but anyhow.
[15:55] <elliotd123> Hi guys, I'm trying to run ffmpeg for some benchmarking, but having trouble getting it to go to the background.
[15:55] <elliotd123> This works and uses about 30% CPU: ffmpeg -i udp://@239.129.0.107:59107 -f null /dev/null
[15:55] <elliotd123> but this doesn't work: ffmpeg -i udp://@239.129.0.107:59107 -f null /dev/null > /dev/null 2>&1 &
[15:56] <elliotd123> The process just dies
[15:56] <timothy> nohup?
[15:56] <timothy> nohup ffmpeg -i udp://@239.129.0.107:59107 -f null /dev/null > /dev/null 2>&1 &
[15:56] <elliotd123> yep nohup works. I thought a hangup signal wasn't sent until you log out of the terminal. Thanks!
[16:06] <Fyr> guys! how to calculate psnr if the converted and the source video have different width and height?
[16:07] <Fyr> long time ago I asked here the question about video comparison, I was told about the following parameters: "-filter_complex "[0:v][1:v]psnr[out]" -map "[out]" -f null NUL"
[16:07] <Fyr> they don't work with videos with different width&height.
[16:08] <Fyr> ='(
[16:08] <klaxa|work> you could rescale the videos, but i don't know in how far it influences the calculations
[16:22] <Fyr> is there a tool for PSNR calculation?
[16:23] <c_14> Besides the ffmpeg filter?
[16:24] <Fyr> *working filter
[16:27] <techtopia> hello guys
[16:28] <techtopia> how cut i cutthe first 60 seconds from a video with ffmpeg
[16:28] <c_14> You want the first 60 seconds or you don't want them?
[16:28] <c_14> Fyr: I only know of the psnr filter.
[16:30] <Fyr> c_14, is it able to compare videos with different width and height?
[16:30] <techtopia> yeah i want to export the first 60 seconds to a new video file
[16:31] <c_14> Fyr: nope, you could scale the larger one down to the size of the smaller and then compare, that's probably as close as you'll get
[16:31] <c_14> techtopia: ffmpeg -t 60 -i file -c copy out
[16:31] <techtopia> thanks :)
[16:31] <c_14> Might not be _exactly_ 60 seconds because it'll cut on keyframes.
[16:39] <PoeticallyEvil> 06:08:48 PM - PoeticallyEvil: Hi, I'm using ffmpeg to screencast and I'd like to lower the cpu usage (right now it's at ~105% shared between 2 cores), here's the command: http://pastebin.com/r2M6NLES
[16:39] <PoeticallyEvil> 06:09:34 PM - PoeticallyEvil: Which option would offer a better file-size/cpu-usage ratio, right now ?
[16:39] <Mavrik> hmm
[16:39] <Mavrik> PoeticallyEvil, honestly, switching to another codec for capture and then reencode would work better
[16:40] <PoeticallyEvil> Right, I tried rawvideo, but the file-size was just not, you know...
[16:40] <Mavrik> yeah, use one of the fast lossless codecs
[16:40] <Mavrik> they'll still be larger than x264 but nowhere near raw video :)
[16:40] <PoeticallyEvil> Could you recommend one ?
[16:40] <Mavrik> raw video will cause you issues due to sheer IO bandwidth it needs
[16:41] <Mavrik> PoeticallyEvil, with ffmpeg the most popular two choices are either huffyuv and ffv1
[16:41] <Mavrik> so -vcodec huffyuv
[16:41] <Mavrik> or -vcodec ffv1 -qscale:v 0
[16:42] <Mavrik> I'm not sure which is faster / better but they should both work rather well as capture codecs
[16:42] <Mavrik> and then you can use a medium preset for x264 to encode the captured into something high quality anyway :)
[16:43] <Fyr> guys! I've just downloaded a video file and found that only left headphone is used. at the right headphone audio sounds like supressed. how is it possible? what did that half-assed releaser to make such thing?
[16:44] <Fyr> what options did he use?
[16:44] <relaxed> it's water under the stream now
[16:45] <relaxed> bridge* :)
[16:46] <PoeticallyEvil> Mavrik: With huffyuv the size is still a bit much (750Mb for 30s (cpu usage ~65%)). ffv1 gets me 200Mb for 30s but for 170% of cpu :/
[16:46] <Mavrik> well
[16:46] <Mavrik> fast or good, pick one ;)
[16:46] <PoeticallyEvil> I guess it can't get better than that ?
[16:46] <PoeticallyEvil> Right.
[16:47] <klaxa|work> wasn't utvideo also capable of lossless coding?
[16:47] <PoeticallyEvil> But, isn't there a way I could just adjust x264 to compress just a little less (I've got much more "breathing room" on the file-size than on the cpu-side with x264) ?
[16:47] <klaxa|work> i think it's still single-threaded though
[16:48] <relaxed> PoeticallyEvil: libx264's presets control compression, try -preset veryfast
[16:49] <klaxa|work> according to the pastebin he is already using ultrafast
[16:49] <PoeticallyEvil> Right, and it uses 10M per 30s (very much low, I believe for the believed "fastest / biggest file-size")
[16:50] <PoeticallyEvil> (bitrate of 2282.2kbits/s)
[16:50] <kepstin-laptop> PoeticallyEvil: do you need lossless? or would high-quality lossy be fine?
[16:51] <PoeticallyEvil> Lossy would be absolutely fine, the file-size/cpu-usage ratio is more important.
[16:52] <PoeticallyEvil> I mean, If I could lower the x264 cpu-usage by ~15% it would be perfect.
[16:53] <kepstin-laptop> hmm. x264 ultrafast mode already has stuff like cabac disabled, so I'm not sure that switching it to a lossy mode would help cpu usage all that much
[16:53] <kepstin-laptop> you could do something silly like "-c:v mpeg2video -q:v 2" and see how that compares.
[16:55] <Diogo> saste: do you know if the playlist m3u8 playlist  http://pastebin.com/pAHuUDAC is possible to change the segment duration .... ffmpeg -i <FILE> -vcodec: libx264 -b:v 500k -force_key_frames 1 -s:v 640x480 -r 25 -g 25 -pix_fmt yuv420p -map 0 -f stream_segment -segment_times
[16:55] <Diogo> '2,2,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8' -reset_timestamps 1
[16:55] <Diogo> -segment_list stream.m3u8 -y "output%01d.ts"
[16:55] <PoeticallyEvil> Huh, It's at ~65% for 20Mb
[17:00] <kepstin-laptop> you could also try lowering the quality of the x264 a bit; i.e. raising -qp value; it might get faster simply because there's fewer bits to process then. (but ultrafast already disables cabac, so I wouldn't expect large gains)
[17:01] <saste> Diogo, no you're not supposed to change the duration by editing the playlist file
[17:01] <relaxed> PoeticallyEvil: are you looking for something like `cpulimit`?
[17:02] <klaxa|work> wouldn't that drop frames?
[17:02] <PoeticallyEvil> Hmm, changing the value of -qp with mpeg2video doesn't have any effect on the cpu-usage (while the bitrate does change), I guess that it's limited by something else here.
[17:04] <Diogo> saste: please help me.. i want to have dynamic segment duration in my playlist
[17:04] <Diogo> the first 10 chunks i want 2 seconds
[17:04] <Diogo> and the rest 5 seconds between chunks
[17:04] <saste> Diogo, i think you're missing how hls works
[17:05] <PoeticallyEvil> -qp 20 lower the cpu usage by 5-8%
[17:05] <PoeticallyEvil> on x264
[17:05] <Diogo> why?
[17:06] <relaxed> PoeticallyEvil: use -crf instead of -qp with libx264 unless you're setting it to lossless
[17:06] <Diogo> i need lower size in the first chunks for the begining of the video..
[17:06] <saste> Diogo,  then i don't understand the problem
[17:07] <saste> aren't you having 2 seconds segments at the beginning of the file?
[17:07] <Diogo> nop
[17:07] <Diogo> no
[17:07] <saste> #EXTINF:2.0, (BEGIN)
[17:07] <saste> Diogo, ^^
[17:08] <Diogo> #EXTINF:2.080000,
[17:08] <Diogo> output0.ts
[17:08] <Diogo> #EXTINF:1.000000,
[17:08] <Diogo> output1.ts
[17:08] <Diogo> #EXTINF:1.000000,
[17:08] <Diogo> output2.ts
[17:08] <Diogo> #EXTINF:1.000000,
[17:09] <saste> did you use -loglevel debug to check what's going on?
[17:09] <saste> that's unexpected
[17:11] <PoeticallyEvil> Changing -crf (from 1 to 51) has almost no effect (2Mb for 2-3% of cpu)
[17:11] <PoeticallyEvil> I think I'm just gonna settle with mpeg2video or the lowest x264 I got earlier
[17:12] <PoeticallyEvil> (over 30sec*)
[17:21] <PoeticallyEvil> (on the usage of -qp with x264: "qp produces larger files than --crf for the same visual quality" [...] "You should generally use --crf instead, although qp doesn't require lookahead to run and thus can be faster. "]
[17:21] <PoeticallyEvil> On my case, using qp is thus preffered.
[17:26] <klaxa|work> PoeticallyEvil: this might not be promising, but i mentioned before and i just confirmed this, that utvideo is also lossless, i have no idea about bitrate and cpu-usage but a quick test should reveal that
[17:31] <PoeticallyEvil> klaxa|work: Right, I forgot you mentionned it. But anyway, it's at ~95% for 400Mb per 30s.
[17:31] <klaxa|work> haha nevermind then :)
[17:32] <PoeticallyEvil> Here are all the codecs I can use (a bit much to wiki them all), http://pastebin.com/Es4gKg5X
[17:36] <PoeticallyEvil> Oh, mpeg 4 -q:v 2 is at 60% (for 30Mb per 30s).
[17:52] <PoeticallyEvil> One question though, even if I'm using -q:v 0, I guess I still shouldn't transcode from it (to x264 say)
[17:55] <kepstin-laptop> well, if you want smaller files to e.g. publish on the internet, you probably will want to still.
[17:56] <PoeticallyEvil> Will "loose less quality" when transcoding to another codec (vs using the same) or it doesn't matter ?
[17:58] <kepstin-laptop> your choice of output codec is far more likely to be based on "what formats does the viwer support" and "how much quality can I preserve at a reasonable filesize" than "does the lossy transcode between these codecs have minutely smaller losses than these other codecs?"
[18:02] <PoeticallyEvil> Right, but I mean h264 and mp4 are both rather universally supported aren't they ?
[18:05] <PoeticallyEvil> -vcodec vp9 seems to "crash" (or something : zsh: illegal hardware instruction (core dumped)  ffmpeg -f [...]) I guess I should report that, huh ?
[18:07] <kepstin-laptop> well, mpeg4 (asp) video is reasonably well supported in standalone player, but it can't be used in any browsers in html5 video tags and flash can't play it (same with mpeg2)
[18:09] <PoeticallyEvil> Got it, ty.
[21:42] <Guest97043> Hi. I am converting some video of like 3 FPS and Ffmpeg makes a video putput of like 33 FPS. Is there a way to not to tell Ffmpeg -r 3 and put some paramenter like -r copy instead?
[21:42] <Mavrik> that should be the default :)
[21:44] <Guest97043> Source file: 3.728 fps. Output video file: 33.667 fps.
[21:44] <Guest97043> So, is this a bug?
[21:45] <kepstin-laptop> if you could pastebin your full ffmpeg command line and the complete output, we could probably tell you more.
[21:49] <Guest97043> http://pastebin.com/vQnijGZS
[21:53] <kepstin-laptop> Guest97043: i don't see any issue there; looks like ffmpeg'
[21:53] <kepstin-laptop> s done some conversion of the timebase for the different containers, but that doesn't change the framerate itself
[21:54] <Mavrik> considering the fact that input is rawvideo
[21:55] <Mavrik> it's entirely possible it doesn't even contain FPS information so ffmpeg just infers something
[21:55] <kepstin-laptop> hmm? does avi not have frame timings for raw video?
[22:01] <Mavrik> no idea really, been awhile since I was dealing with AVI and raw :)
[22:05] <Guest97043> OK, no problem.
[22:05] <Guest97043> Thanks for the help, anyway.
[22:24] <seasc> Me having issues to achieve 3-pass encoding, most confusing is, it 'starts' with pass 3, eventhough pass 2 had failed...
[22:25] <seasc> script/commands: http://pastebin.com/bPQX0JRA // output: http://pastebin.com/zwMi4DsA
[22:26] <kepstin-laptop> seasc: the 'exit 1' is inside a subshell because of the (), so it exits that subshell, not the top level script.
[22:26] <seasc> silly me, you're right :)
[22:28] <seasc> @ kepstin-laptop, above line + i've read some forums, most 'suggested' not to go 3 pass at all..  i'd like to 'master' this so i can write a script for others
[22:29] <kepstin-laptop> yeah, with x264 the gains from pass3 are minimal if any
[22:29] <kepstin-laptop> (and if you want to do 3-pass, you have to use -pass 3 for the second *and* third passes, to get it to update the stats file)
[22:30] <seasc> so for a 3 pass encoding i pass... pass 1, pass 3, pass 3? (just reasking as it soudns weird)
[22:30] <kepstin-laptop> you can have arbitrary many passes, actually, by repeating pass 3 :)
[22:30] <kepstin-laptop> but there's basically no reason to use it in most cases. In fact, unless you need a specific file size exactly, you shouldn't even be doing 2-pass.
[22:31] <seasc> lol k, i guess 3 should be enough :)
[22:31] <kepstin-laptop> (use 1-pass with -crf in that case)
[22:31] <seasc> oh... i was always thinking the multipass would increase quality?
[22:31] <seasc> nah, i'm not heading for any specific filesizes
[22:31] <kepstin-laptop> 1-pass with crf gives exactly the same quality as a two-pass encode with the same filesize
[22:32] <kepstin-laptop> becuase the way 2-pass works is the first pass collects stats, then the second pass calculates a crf value to use, then encodes in crf mode.
[22:32] <seasc> so the multipass is NOT about quality, but about filesize?
[22:32] <kepstin-laptop> yes
[22:32] <seasc> lol thats jsut great
[22:32] <seasc> than i can simply ignore multipassing :D
[22:32] <Mavrik> mhm, squeezing the max quality out of certain preset filesize
[22:33] <Mavrik> use CRF singlepass for most use cases ;)
[22:33] <seasc> speaking of crf... i do prefer passing bitrates, more easy (and understandable) to tweak quality/fs
[22:34] <Mavrik> well, that's the worse option
[22:34] <seasc> i mean in reference for example of bad quality input source
[22:34] <kepstin-laptop> tweaking quality vs file size with crf is pretty easy - make it smaller for higher quality, bigger for lower quality, and file size is the inverse.
[22:34] <Mavrik> you can also use VBV parameters with CRF
[22:35] <kepstin-laptop> hmm, but you should really only use VBV if you have actually limits on bitrate, since it reduces coding efficiency somewhat.
[22:36] <kepstin-laptop> e.g. realtime streaming, or fitting into bluray player buffer specifications
[22:36] <Mavrik> mhm
[22:36] <seasc> i've had a try with a fullhd movie (an anime serie episode to be precies)... input was 1gb... i've encoded it with bitrates to 250mb.. using crf 23 i got almost the same filesize as the input one...
[22:37] <seasc> and reducing the quality, as in increase the crf, got me a much worse quality at a bigger filesize than the bitrates did :(
[22:37] <seasc> not much of a bigger file, bit a much less quality in comparison :|
[22:37] <seasc> -i+u
[22:38] <kepstin-laptop> Note that when doing the second pass, the x264 log messages actually print out the calculated crf value that it uses for the encode.
[22:38] <seasc> kepstin-laptop, might i ask if you use linux, since you could so quickly tell me about the subshell exit?
[22:38] <kepstin-laptop> seasc: yeah, I do.
[22:39] <seasc> and assuming you do, would you mind testing my 'real' script?
[22:39] <zenny1> Hi, is there a reason that the audio, video and screencapture durations are diffeerent, though all of them are caputured using ffmpeg with same codec, using a bash script? Whining me for weeks!!! :-(
[22:39] <seasc> i've written a 1500line script, i'm not asking for code fixes, just about usage
[22:39] <Mavrik> zenny1, ffmpeg might not be the best tool for screencaptures really
[22:40] <kepstin-laptop> I don't really see any need to, I just run ffmpeg manually for most stuff... And i'm not really in the mood to code-inspect a 1500 line script :)
[22:40] <seasc> nah, as i said, NO code inspect, its quite complex and i know its really hard to understand code of someone else :)
[22:40] <zenny1> Mavrik: can you suggest anything in linux? Because I like the simplicity of command line  ;-)
[22:41] <kepstin-laptop> ... are you asking me to run 1500 lines of bash script that I got from a stranger on the internet and haven't inspected? :)
[22:41] <seasc> hmm right.. :)
[22:41] <Mavrik> hmm
[22:41] <Mavrik> zenny1, I've seen Kazam or whats it
[22:42] <Mavrik> but haven't really used alot of tools, I just see alot of people having A/V sync issues when grabbing screen on linux
[22:42] <kepstin-laptop> zenny1: if you need the audio, video, etc. all in sync, it might make sense to try to capture them all in a single ffmpeg command rather than as separate ones (if that's what you're doing...)
[22:42] <llogan> zenny1: you could always use a pastebin service to show your commands and outputs
[22:43] <seasc> kepstin-laptop, well, you helped me fix some things..so you might reckognize a few of the 'changelog' posts ;) :: http://forums.fedoraforum.org/showthread.php?p=1711396#post1711396
[22:43] <seasc> and as long you do have git installed, the (console-) interface will be provided too
[22:44] <kepstin-laptop> seasc: the main thing is that i'm familiar enough with using ffmpeg directly that using a tool that limits what I can do seems kind of silly.
[22:45] <seasc> kepstin-laptop, true that, but you could give me  a hint to further improve it? ;)
[22:45] <seasc> NOT talking about code-wise
[22:45] <zenny1> llogan: here comes the log http://pastebin.com/LbJQZZbB
[22:46] <seasc> kepstin-laptop, anyway, thanks for clearing the multipass thing, i know now i dont need to implement this beast :)m so i can continue with usage stuff :)
[22:48] <zenny1> Illogan: here comes the time difference: http://pastebin.com/AVXchMmc
[22:48] <zenny1> Illogan: but when I capture for a long duration, the time differences between screencapture and the audio increases. Any inputs?
[22:52] <seasc> zenny1, yes, what are your inputs? And what is your definition of a 'long duriation'?
[22:52] <zenny1> kepstin-laptop: but how can one capture three different two video inputs and one audio input to record separately with a single command lines?
[22:52] <kepstin-laptop> hmm, apparently i was wrong, x264 actually prints the calculated crf after the first pass completes, not at the beginning of the second pass.
[22:52] <zenny1> seasc: If you look at the duration, the duration of the video, audio and screencapture does not match.
[22:53] <zenny1> I meant http://pastebin.com/AVXchMmc
[22:53] <zenny1> ffmpeg commands executed are at http://pastebin.com/LbJQZZbB
[22:54] <zenny1> fyi
[22:54] <seasc> zenny1, so less than 3 minutes you call long duration? and neither of your pastebins is a command to record
[22:54] <seasc> mpv is unkown, what does it do?
[22:55] <seasc> ahh :)
[22:55] <kepstin-laptop> mpv is an mplayer fork, video player
[22:55] <zenny1> seasc: I guess you are not reading the lines and commenting without any idea what I was doing.
[22:55] <zenny1> I recorded a session of 36 minutes and the duration of screencast was 1m54s less than audio and video.
[22:55] <seasc> zenny1, same for you... there is still no command you entered, just the output of it
[22:56] <zenny1> Would you mind reading again this link: http://pastebin.com/LbJQZZbB
[22:57] <zenny1> The 3rd line is the first command.
[22:57] <seasc> err, sry.. me used to have the actual commadn on line 1...
[22:57] <zenny1> seasc: if you have -report option you will get a log like that, fyi.
[22:57] <kepstin-laptop> zenny1: you can use the -i option on ffmpeg multiple times to capture audio and video at the same time. if you want to capture multiple video streams (e.g. webcam + desktop), you'd have to use -map and an output format that supports multiple video streams.
[22:58] <seasc> now i guess zenny would be a candidate for my script :)
[22:58] <kepstin-laptop> hmm. or I think you can use ffmpeg to generate multiple output files in one command with map.
[22:59] <seasc> http://forums.fedoraforum.org/showthread.php?p=1711396#post1711396.... "vhs -S" will record your screen, "vhs -W" will record from your webcam...
[22:59] <seasc> incl audio of course :)
[22:59] <kepstin-laptop> seasc: but can you record from screen and webcam at the same time? :)
[22:59] <zenny1> keptstin-laptop: I am aware of the the former a single video and single audio output in single command, but not aware of the multiple video streams and an audio to be recorded in separate files using a single ffmpeg command line. If you have any idea (http://pastebin.com/LbJQZZbB) please share.
[23:00] <seasc> figured, i now need to implement diffrent input, alsa/oss... and ... nnow yet.. but i was already thinking of it :D
[23:01] <seasc> nnow=not ^
[23:02] <seasc> this is how i record (from my scripts logfile) my screen: ffmpeg -v quiet -f x11grab -video_size  1920x1080 -i :0 -f alsa -i default  "/home/sea/screen-out.0.mkv"
[23:02] <seasc> including audiostream
[23:02] <seasc> what is your 2nd video stream zenny? your webcam?
[23:04] <kepstin-laptop> zenny1: something like this wfm: ffmpeg -y -f v4l2 -i /dev/video0 -f x11grab -s 1280x720 -r 24 -i :0 -f pulse -i default -map 0:0 -c:v libx264 -crf 23 -preset veryfast webcam.mp4 -map 1:0 -c:v libx264 -crf 23 -preset veryfast desktop.mp4 -map 2:0 -c:a pcm_s16le audio.wav
[23:05] <kepstin-laptop> will output 3 streams which should in theory all be in sync, i suppose :)
[23:06] <kepstin-laptop> (you'd obviously want to combine them somehow before playing back, since playing multiple files in sync is always a pain.)
[23:07] <zenny1> seasc: I am sorry you make too much of noise, but do not read between the lines. Anyway I inform you that I use a webcam (logitech c920) right now. And I cannot use your script because of too much of dependencies. On top of that I do not like making simple things complex and that is what your script does.
[23:07] <zenny1> keptin-laptop: thanks, I shall try how it goes and report back to you.
[23:08] <seasc> zenny1, thx for the feedback, and sorry you feel this way
[23:10] <zenny1> seasc: A while ago you seems to have similar interactions with kepstin-laptop, I guess. I have nothing personal against you, but I am from the unix background, LESS is MORE.
[23:10] <kepstin-laptop> zenny1: if you want to save some cpu from doing multiple video encodes at the same time, you could render the webcam picture-in-picture over your desktop and encode only that one stream, of course :)
[23:11] <kepstin-laptop> although I suppose if you have a logitech c920, it already outputs h264 encoded video.
[23:12] <seasc> thats just exactly what i (due to this conversation, thx zenny1 & kepstin-laptop ) wanted to implement now... now that i drop the multipass :D
[23:14] <zenny1> kepstin-laptop: yep, you are right that I used the c920 webcam stream directly, and capture the screen using framebuffer. However, it would be nice if can elaboarate "you could render the webcam picture-in-picture over your desktop and encode only that one stream" part!
[23:14] Action: kepstin-laptop notes that in his example above he's using the -r option incorrectly, it should be -framerate, of course.
[23:15] <kepstin-laptop> zenny1: if you bring both streams into ffmpeg, you can use the -filter_complex option to specify a filter chain that does some video scaling and overlays one on the other.
[23:20] <zenny1> kepstin-laptop: Thanks for this useful info. Any example of -filter-complex that is handy to you?
[23:20] <kepstin-laptop> have fun: ffmpeg -y -f v4l2 -s 1280x720 -framerate 24 -i /dev/video0 -f x11grab -s 1280x720 -framerate 24 -i :0 -f pulse -i default -filter_complex '[0:v:0] scale=320:-1 [a] ; [1:v:0][a]overlay' -c:v libx264 -crf 23 -preset veryfast -c:a libmp3lame -q:a 4 overlay.mp4
[23:20] <kepstin-laptop> the overlay filter can take some options to move around the location of the video if you like, too :)
[23:22] <seasc> kepstin-laptop, NICE!
[23:26] <zenny1> kepstin-laptop: That sounds nice and thanks. Any handy example with the overlay options to move around the location of the video? Appreciate it!
[23:26] <kepstin-laptop> zenny1: you should be able to figure that out with the filter docs: http://www.ffmpeg.org/ffmpeg-filters.html#overlay :)
[23:29] <zenny1> keptstin-laptop: thanks for the useful link.
[23:33] <zenny1> ketpstin-laptop and seasc: thanks and good night!
[23:39] <seasc> zenny1, yw and gn8 to you too :)
[23:39] <seasc> sry couldnt help more
[00:00] --- Fri Oct  3 2014


More information about the Ffmpeg-devel-irc mailing list