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

burek burek021 at gmail.com
Mon Mar 10 02:05:01 CET 2014


[01:14] <bove> Can I set swscale flags from the command line?
[01:15] <Jack64> I finally made it work :D
[01:35] <NID> Is it possible to record an application using pulse for audio?
[01:35] <NID> I'm trying to figure out how to do this
[01:37] <klaxa> ffmpeg -f alsa -i pulse -c:a flac out.flac
[01:38] <klaxa> that will record audio from your default recording device
[01:38] <klaxa> you can set your default recording device to a monitor device
[01:38] <NID> Right, but is it possible to record a stream, for example from an application?
[01:39] <klaxa> theoretically yes, probably not without delay to your soundcard
[01:39] <klaxa> someone had a similar usecase: http://klaxa.eu/record%20game%20audio.svg
[01:40] <klaxa> if you don't need to listen to the audio while it is being recorded you can skip the loopback module
[01:40] <NID> Yeah I don't need to listen to it
[01:40] <klaxa> then you can create a nullmodule, redirect the application's audio to the null-sink and record from the monitor of the null-sink
[01:41] <NID> How would I go about doing that?
[01:42] <klaxa> with "pacmd load-module module-null-sink" you can load a null-module
[01:42] <NID> Ah nevermind, I figured it out
[01:42] <NID> Thanks :)
[01:42] <klaxa> with pavucontrol you can set the streams in the gui
[01:42] <klaxa> :)
[01:43] <Jack64> klaxa: made it work :D
[01:44] <Jack64> klaxa: check out the working script http://pastebin.com/F9dkuMQ7 it has some comments on the top to help explain
[01:45] <klaxa> oh i see what you are doing now... i think generating a video that updates in sync with the original that only contains the scoreboard might be easier
[01:46] <klaxa> this seems a bit roundabout on it...
[01:46] <Jack64> wow never thought of that -.-
[01:46] <klaxa> depending on how complex the scoreboard is, you could probably even do it better with styled subtitles
[01:46] <Jack64> well some times it's 29-0
[01:46] <Jack64> haha
[01:47] <klaxa> do you have a screenshot of the scoreboard?
[01:47] <Jack64> generated on demand with PHP
[01:47] <Jack64> so no..
[01:47] <klaxa> can you generate one and show it to me?
[01:47] <Jack64> ok just a sec
[01:47] <klaxa> using aegisub might actually be a lot easier than this...
[01:47] <klaxa> and way less prone to errors
[01:48] <Jack64> where can I paste the photo?
[01:48] <Jack64> imageshack requires login -.-
[01:48] <klaxa> dunno, imgur?
[01:48] <klaxa> http://imgur.com/
[01:49] <Jack64> http://imgur.com/JKp9IUR
[01:49] <Jack64> the colors are still not right
[01:49] <Jack64> but that's not my part to do xD
[01:50] <Jack64> the team names are on a local sql db
[01:50] <Jack64> and my friend made an HTML interface
[01:50] <Jack64> pretty cool
[01:51] <klaxa> ah well... using styled subtitles would be possible, gradients *might* be an issue, but given you probably already put a lot of time and effort into this, changing it now would be bad
[01:51] <Jack64> ah, and the white parts on the edges are not part of the image
[01:51] <Jack64> well yea it's all kind of hacked together
[01:51] <Jack64> just for internal use
[01:52] <klaxa> well if it works now, that's great, if it doesn't, i would think about generating one video to overlay over everything
[01:52] <klaxa> would highly simplify the script too
[01:52] <Jack64> he was sick of wasting hours in power director doing the same thing every week
[01:52] <klaxa> things that can be automated, should be automated
[01:52] <Jack64> yea it would, but doing it like this was also an exercise for me it was fun
[01:52] <klaxa> so you can spend more time on being productive
[01:52] <Jack64> you're right on that
[01:53] <Jack64> I had to write C code to patch into ffprobe and get the keyframe for the splits eheh
[01:54] <Jack64> and then I do it all in RAM because splits are instantaneous
[01:54] <Jack64> so maybe there's not a big performance penalty for doing it like this instead of a movie
[01:54] <klaxa> you could have used libavformat, or just used mkv as a intermediate container with mkvtoolnix
[01:55] <Jack64> but that's definitely the better solution. Generate a movie from the png images
[01:55] <klaxa> uh... i mean with mkvtoolnix's mkvinfo to get keyframes
[01:55] <klaxa> that's what i do for splitting videos at least
[01:55] <Jack64> yea
[01:57] <Jack64> actually another crappy performance hit if you see on the script is because of the way I'm adding the splash screen at the end I have to reprocess the whole video for adding just a 3 second overlay..
[01:57] <Jack64> .. at the beginning
[01:57] <klaxa> mkv and mkvsplit with concatenation :x
[01:57] <Jack64> yea that'd probably have been better
[01:58] <Jack64> hey it's the first time I tried to do this :P
[01:58] <klaxa> you can also use the concat demuxer to concatenate videos
[01:58] <klaxa> http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files#demuxer
[01:58] <Jack64> yea that's what I use
[01:58] <Jack64> that's at the end of the script
[01:59] <klaxa> that's not a lot of overhead then
[06:18] <Jack64> klaxa: I'm going nuts over here it fixed it in some scripts, others it didn't -.- I think I'm gonna have to rewrite it the way you said making a movie of all the overlays
[07:39] <Snowleaksange> WWWWWWWWAAAAAAAAAAAAAAHHHHHHHHHHHHHHHH my ffmpeg prog is leaking mem =(
[07:40] <Snowleaksange> av_free_packet() av_frame_free()
[07:40] <Snowleaksange> what more do you want from me avcodec_decode_video2 ?
[07:43] <Snowleaksange> seriously ffmpeg youre my only hope
[08:33] <Snowleaksange> avcode_decode_video2 decode_frame ff_thread-get_buffer ff_get_buffer video_get_buffer av_buffer_poo_get av_buffer_allocz av_malloc
[08:34] <Snowleaksange> got like 70 meg alloced there that keep growing at map changes :/
[09:34] <Snowleaksange> hmm think my problem is not calling avcodec_clsoe..  only problem is .. it crashes
[10:17] <jarainf> jarainf lol
[10:46] <batence> "movie=logo.png, scale=200:37 [watermark]; [in][watermark] overlay=10:10 [out]" - how to change these pixels 200:37 in percentage, because when i convert video with big resolution ... watermark comes small, but when convert video with small resolution - watermark comes very big, so is there a solution to scale watermark in percentage of video resolution ?
[10:59] <charred> Hello, I'm attempting to compile openlase (following the guide here) https://github.com/marcan/openlase/wiki/Installation ... and I'm getting an error libavresample/avresample.h file not found. Some googling said the ffmpeg configure I had to add an --enable-avresample flag, but I have no idea how to do this
[10:59] <Snowleaksange> thought my ffmpeg upgrade went smooth till i realized only 90% mark.  now another day trying to fix mem leak
[10:59] <charred> Anyone have an idea?
[11:24] <Snowleaksange> hmm
[11:26] <Snowleaksange> i think my memory leak is from not calling avcodec_close...  but avcodec_close crashes..   i call avformat_open_input with a filename, then open the codecs.  to close im trying to iterate the nb_streams and call avcodec_close() if stream->codec->codec.  but this crashes for png codec on freeing avctx->internal->to_free->metadata
[11:40] <Snowleaksange> hmm.. not calling av_frame_free() makes avcodec_close() not crash... and uses a lot less mem
[11:58] <Mavrik> Snowleaksange, why don't you just use valgrind to see what's leaking exactly?
[12:02] <JEEB> charred, when you compile ffmpeg you will have to manually enable avresample in its configuration script, which is --enable-avresample
[12:22] <Snowleaksange> i did Mavrik.  avcodec_decode_*.  Now trying to fix it.
[12:25] <Snowleaksange> well its really not even a leak anymore, as how to not crash avcodec_close
[12:25] <Snowleaksange> in the case of loading png files, if i dont call av_frame_free then avcodec_close doesnt crash
[12:26] <Snowleaksange> the leak was because i wasnt calling avcodec_close
[12:34] <Mavrik> Snowleaksange, mhm, compiling ffmpeg with debug symbols and using gdb helps
[12:54] <luc4> Hello! I'm using ffmpeg to dump metadata from a video file. I used: ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE. What I get is no data in the output file. But ffprobe returns creation_time   : 2012-10-18 16:26:59 in metadata. Maybe -f ffmetadata is not sufficient?
[19:08] <hannes2> hey, asking for a windows-bound friend: what is the easiest way to make her able to run "ffmpeg -i image%04d.png -vcodec libx264 -crf 18 -preset veryslow -pix_fmt yuv420p out.mkv" on windows 7?
[19:08] <hannes2> last time i tried to install x264 on someone's windows machine it ended up with a mess
[19:09] <sacarasc> http://ffmpeg.zeranoe.com/builds/
[19:09] <hannes2> thanks!
[19:09] <sacarasc> Windows builds with libx264 all in.
[19:09] <sacarasc> Grab the static one, it's the simplest.
[19:09] <hannes2> nice, that looks fantastic
[19:11] <hannes2> you made my/our day, thanks!
[19:12] <sacarasc> :)
[21:20] <viddy> Hello. I have a file which has a change in the audio stream layout like 10~ minutes in. It seems ffmpeg mostly cares about the stream-layout when it starts, so when a new audio stream is introduced suddenly it ends up being dropped (not ending up in the encoded file). Can anyone point me in the direction of a solution to this? Can it be done? Thanks.
[21:56] <fp> Trying to decode frames in sync between two files, i.e. get frame 0 from file 1 and then frame 0 from file 2 to do some calculations on the YCbCr-data. Then frame 1 and so on...
[21:56] <fp> Using decoder-loop from ffmpeg/doc/examples/demuxing_decoding.c as my example. See http://pastebin.com/kPmczqbB Completely lost, any help would be greatly appreciated!
[22:03] <Mavrik> ok?
[22:19] <IamTrying> ffmpeg -i ITR.wav -ss 00:00:12 -t 00:00:17 sara1.wav Why its not cutting the WAV file between 12 and 17 seconds but making it 17 seconds in length
[22:19] <Mavrik> IamTrying, because that's what you're telling it to do.
[22:19] <Mavrik> -t is length, not end position
[22:20] <IamTrying> Mavrik, i have a 1 hour WAV file for IVR message. how can i cut the audio starts at 00:00:12 and ends in 00:00:17 ?
[22:22] <Mavrik> again.
[22:22] <Mavrik> -t is length of a clip.
[22:22] <Mavrik> you do know basic maths right?
[22:22] <Mavrik> set -t to length you want.
[22:23] <IamTrying> Mavrik, -t 00:00:07 works but its not accurate the audio has Milliseconds too, how can i do in the -t Millisecond adjust?
[22:23] <klaxa> use 00:00:06.123 instead
[22:23] <IamTrying> OK
[22:23] <klaxa> i think that's even documented in the manpage
[22:24] <Mavrik> mhm.
[22:24] <Mavrik> :)
[22:24] <IamTrying> Thank you Mavrik , klaxa
[22:24] <klaxa> you can also use -to to specify a position rather than a duration
[22:32] <IamTrying> How can i merg "goodbye" in the sara5.wav?  "Unfortunately nobody is available to join, please call back later or send us an email" =  $ ffmpeg -i ITR.wav -ss 00:00:42 -t 00:00:7.500 sara5.wav  but i need to add "GoodBye" in sara5.wav from -ss 00:01:55.
[22:35] <klaxa> http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files#demuxer
[22:36] <IamTrying> Thank you klaxa works
[00:00] --- Mon Mar 10 2014


More information about the Ffmpeg-devel-irc mailing list