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

burek burek021 at gmail.com
Sat Aug 31 02:05:01 CEST 2013


[00:05] <llogan> magnulu: you could have just put it in ~/bin
[00:06] <llogan> and not messed with system stuff
[00:21] <klaxa> well if he wants to have it available for all users, putting it in /usr/local/bin should be the right thing, no?
[00:24] <llogan> it's one option. could use checkinstall or something if you want it in package management system
[01:19] <CentRookie> hi there XD
[01:19] <CentRookie> do you know if there is an option that prevents ffmpeg from overscaling?
[01:19] <CentRookie> interpolating
[01:21] <durandal11707> can you explain it in more detail what you are trying to solve?
[01:21] <CentRookie> im running a script that converts videos but some have a lower resolution than the set resolution
[01:22] <CentRookie> was wondering if there is a switch to prevent overscaling
[01:22] <CentRookie> underscaling is fine
[01:22] <CentRookie> *upscaling
[01:22] <klaxa> i for one don't know of any, you could script it though
[01:22] <CentRookie> well yeah, scripting is always a resolution
[01:50] <CentRookie> oh, found a way
[01:51] <CentRookie> -vf  scale="min(640\,iw):trunc(ow/a/2)*2"
[01:55] <CentRookie> now how to get it to work with complex filter
[01:57] <durandal11707> what complex filter? you confused me again
[02:02] <CentRookie> the command works with simple filter
[02:02] <CentRookie> but i use filter_complex
[10:09] <kaictl> Okay, so I've been using ffmpeg to record my desktop lately, and I was wondering if there was a way to only capture a single window, and not just by size (in case it resizes or moves. the output size is held at 852x480).
[10:15] <kaictl> (using linux, not windows. that probably matters.)
[11:07] <relaxed> kaictl: you expect it to track a window? no
[11:08] <kaictl> relaxed: meh. not a dealbreaker. is there any way to manipulate ffmpeg while it is running? pause the video or audio input/output?
[11:10] <relaxed> I don't think so
[11:11] <relaxed> there's ctrl+z
[11:12] <relaxed> then `fg` to start it again
[11:14] <kaictl> true, but i'd like to use this for streaming and have some way to just pause the video output without stopping it, just streaming the last image if possible.
[11:16] <kaictl> might be time to just grab a separate monitor for this kind of stuff.
[11:56] <CentRookie> nice
[11:57] <CentRookie> is there a way to post a certain useful command line and put it as an example on the wiki page?
[12:34] <relaxed> example?
[12:36] <zap0> sample?
[12:43] <CentRookie> a line for auto resizing without upscale in filter_complex
[12:43] <CentRookie> 844 is the destined output width, but if the source's width is smaller, it will keep the original width
[12:43] <CentRookie>  ffmpeg -i /test/test.mp4 -filter_complex scale='min(844\,iw):(trunc(ow/a/2))*2' output.mp4 -y
[12:44] <CentRookie> hehe, there is a frowny on my screen, but i hope you see the code correctly
[12:45] <CentRookie> it is such an important function, but there is not a single site that covers this line in complex filter
[12:45] <CentRookie> only in -vf
[12:45] <zap0> write a blog.   describe it, give keywords.    google will index it if it's quite unique.
[12:46] <CentRookie> i just think it might be referenced somewhere ppl will actually read
[12:48] <relaxed> shouldn't you scale up and pad to maintain the aspect ratio?
[12:50] <CentRookie> it does by a
[12:59] <kode101> so i have an mp4 and a wav file, and they're roughly the same len
[12:59] <kode101> the mp4 has an audio track i no longer need
[12:59] <kode101> do i convert the wav to aac then mux, or do i do something else
[12:59] <kode101> goal is the mp4 with the new wav as its audio track
[13:55] <Mavrik> kode101, you can just take both as input, encode audio to aac and mux it with a single command
[13:55] <Mavrik> use "map" to properly map streams
[13:55] <kode101> nice
[13:56] <kode101> what the command
[13:57] <Mavrik> I just told you.
[13:57] <Mavrik> use "-i" twice and use map to map streams to output
[13:58] <Mavrik> video + new audio
[13:58] <kode101> ffmpeg -i haha
[13:58] <kode101> silly
[13:58] <kode101> i thought mux was a thing
[13:58] <kode101> its not, its just there
[13:58] <kode101> what so do i need to map?
[13:59] <kode101> i tried
[13:59] <kode101> ffmpeg -i input.mp4 -i input.wav -vcodec copy -acodec aac output.mp4
[14:00] <Mavrik> kode101, yes, you need to use map to tell ffmpeg to use video track from first output and audio track from the second
[14:00] <Mavrik> and to ignore the audio track from first input :)
[14:00] <relaxed> kode101: man ffmpeg|less +/^'STREAM SELECTION'
[14:00] <kode101> ive removed the audio from the file
[14:00] <kode101> so can skip mapping here no?
[14:00] <kode101> i have a video with no audio and audio with no video so ffmpeg just works it out
[14:01] <Mavrik> probably yeah
[14:01] <Mavrik> check the output, the mapping is always written out at the start
[14:02] <relaxed> learning would save you headaches later
[14:02] <kode101> tru
[14:02] <kode101> thanks yo
[14:02] <relaxed> read about -map
[16:34] <XwZ> hi, I'm using ffmpeg to grab images from an rtsp camera with limited slots. When I try to disconnect from the camera, the TEARSDOWN message is sent to the camera but the slot is not freed
[16:35] <XwZ> i'm using avformat_open_input and avformat_close_input to open and close the stream
[16:36] <XwZ> do you have an idea of the problem ? if I use avplay or ffplay it works fine (frustrating)
[19:26] <DasMoeh> hey, is there a function in libav to skip all frames till next keyframe? and how many frames are normally between to keyframes? can i get this information somehow?
[19:47] <vilalian> DasMoeh: Check out the av_seek_frame/av_seek_file functions. How many frames and whether it is consistent between depends on what codec you are in, but look at gop_size and keyint_min variables on your AVCodecContext.
[19:49] <DasMoeh> ok thanks, when i use av_seek_frame with the timestamp from my actual frame i get the next keyframe?
[19:53] <vilalian> DasMoeh: I've seen it vary in behavior a bit on different codecs, but it usually (should be always?) returns the first keyframe before the requested time, so you need some idea of where you're trying to jump to.
[19:53] <vilalian> DasMoeh: if you're just trying to get to the next keyframe I would just read frames from where I am until I got there.
[19:54] <DasMoeh> That's what i'm doing now. But i'll safe the time needed for decoding each frame.
[19:55] <DasMoeh> *want safe
[20:05] <DasMoeh> mh, gop_size = 12, keyint_min = 25... but description says keyint_min is the minimum GOP size?
[20:38] <Mavrik> DasMoeh, slightly late but here is goes
[20:39] <Mavrik> first the bad news: there is no reason for the keyframes to be equally distributed
[20:39] <Mavrik> in more advanced formats they certanly aren't
[20:45] <DasMoeh> Mavrik: thx
[20:45] <Mavrik> also, to decode only keyframes
[20:45] <Mavrik> run the av_read_packet loop and check for the keyframe flag on the packet
[20:49] <vilalian> I'm reading a video stream and encoding to disk as h264. Reading that file in and writing it out again with identical codec parameters (verified that libx264 is logging that the bitrate requested is the same) results in a file that is much higher bitrate. Original (and correct) ~600k bitrate file is rewritten at ~1500k. ffprobe shows no difference in the files other than the frame sizes (no extra streams or anything). I'm a bit stumped
[20:49] <vilalian> to what could be causing the size inflation.
[21:05] <DasMoeh> <Mavrik> run the av_read_packet loop and check for the keyframe flag on the packet <-- thanks, that's a good idea. Didn't found that flag befor.
[21:05] <Mavrik> yeah, there's a AV_PKT_FLAG_KEY or something like that
[21:06] <DasMoeh> yes now i know what i'm looking for and found the flag
[00:00] --- Sat Aug 31 2013


More information about the Ffmpeg-devel-irc mailing list