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

burek burek021 at gmail.com
Thu May 17 02:05:02 CEST 2012


[02:22] <tibo> hi, I'm working on a video player that decodes frames in a thread and render in another one. The frames are stored in a queue. But what I see, it's a distorded image... I think it comes from the way I save the frame (av_picture_copy etc). Does anyone has the correct method to allocate and copy an AVFrame ?
[03:12] <Yuhjn> I've build ffmpeg using homebrew, but when i run ffmpeg it's trying to dynamically link to files inside /usr/local/Cellar/ffmpeg/0.10.2/lib/libavdevice.dylib.... but I need to re-distrubute this ffmpeg build with my app.  That means I need those dylibs built into ffmpeg, not linked in at runtime from the homebrew folders.  Can anyone help me get those libraries complied in?
[03:13] <Yuhjn> because i have installed and built ffmpeg on my machine, it runs... but when i distribute my app to someone I include ffmpeg that I built, and it tries to find that /usr/local/Cellar... path which wont exist... hopefully this is clear
[04:25] <tg2> any idea what causes this type of message?
[04:25] <tg2> DTS 14793, next:14864912 st:1 invalid dropping
[04:25] <tg2> PTS 14793, next:14864912 invalid dropping st:1
[04:25] <tg2> DTS 14803, next:14875578 st:1 invalid dropping
[04:25] <tg2> PTS 14803, next:14875578 invalid dropping st:1
[04:25] <tg2> DTS 14813, next:14886244 st:1 invalid dropping
[04:25] <tg2> PTS 14813, next:14886244 invalid dropping st:1
[04:25] <tg2> DTS 14823, next:14896910 st:1 invalid dropping
[04:25] <tg2> PTS 14823, next:14896910 invalid dropping st:1
[04:25] <tg2> DTS 14833, next:14907576 st:1 invalid dropping
[04:25] <tg2> PTS 14833, next:14907576 invalid dropping st:1
[04:25] <tg2> DTS 14848, next:14918242 st:1 invalid dropping
[04:25] <tg2> PTS 14848, next:14918242 invalid dropping st:1
[04:25] <tg2> DTS 14858, next:14928908 st:1 invalid dropping
[04:25] <tg2> PTS 14858, next:14928908 invalid dropping st:1
[04:25] <tg2> DTS 14868, next:14939574 st:1 invalid dropping
[05:14] <floater_f432c> ffmpeg's png output is lossless? same as bmp ?
[05:16] <sacarasc> PNG is lossless, yes.
[05:21] <floater_f432c> neat
[05:55] <floater_f432c> http://ffmpeg.org/ffmpeg.html
[05:55] <floater_f432c> just found the documentation
[05:55] <floater_f432c> howcome it is not in the topic?
[06:17] <floater_f432c> i'd like to record 1 frame every 12 seconds from my webcam, and if i specify -r 1/12 after -i ffmpeg hangs, and before -i drops all frames but needed
[06:18] <floater_f432c> wasting my system bandwidth...
[06:24] <mystica555> floater_f432c: i don't think that the v4l2 api is able to take such a slow framerate, and indeed some cameras just spit out whatever they feel like
[06:30] <floater_f432c> is this the correct form to make my video 30 fps?
[06:30] <floater_f432c> ffmpeg -f image2 -r 30 -i "./tmp/gt%06d.png" -vcodec libx264 -preset placebo -vf hqdn3d "./tmp/gt_hqdn3d.mkv"
[06:31] <floater_f432c> if i put -r after -i then interprets source as 25fps, then converts/hangs right?
[06:58] <Bonz> gday sumone please tell me what yasm is needed for to build ffmpeg
[07:02] <floater_f432c> Bonz<< i think it might have to do something with performance
[07:03] <floater_f432c> anybody know a simple way to generate preview images at fixed file percentage like 10 images spaced at 10% ?
[07:03] <floater_f432c> ffmpeg -i 37D7A45-59592275.flv  -ss "10%" /mnt/z/tmp/webcamrecord/gomba/0/prev10.png
[07:03] <floater_f432c> this fails to seek to 10%
[07:04] <Bonz> ahh ok im building eithout it using provided option but thought i should ask before i go to far
[07:04] <floater_f432c> Bonz<< asm will give best performance, lower your cpu usage.
[07:05] <Bonz> cool ill try without it first and if i manage to make it function will try to butcher yasm into place for it
[07:06] <Bonz> the system i am building it on is critically broken so i am trying to make it useful for something at least
[07:06] <floater_f432c> would be interesting to compare with and without
[07:06] <Bonz> i think a gloeified mp3 player is a bit of a waste of hardware
[07:20] <Bonz> ok time to go thanks for the advoce
[07:20] <Bonz> arrgh advice
[07:20] <SubJunk> Does anyone know what would cause compilation to output incomplete binaries but report no compiling error? This is with MinGW BTW
[07:21] <SubJunk> It gives an unusable 8.7MB ffmpeg.exe
[07:34] <floater_f432c> how should i grab a single fram from a file using ffmpeg?
[07:35] <floater_f432c> -t 1 does not stop always and ffmpeg compains [image2 @ 0x2949580] Could not get frame filename number 2 from pattern
[07:51] <floater_f432c> fn="59592275.flv"; vlen=$(ffmpeg -i "$fn" 2>&1 | grep -i lasttimestamp | sed -E 's;[^:]*:[ ]*([0-9]+).*;\1;'); v10=$(expr $vlen / 10); seq 0 1 9 | while read count; do ffmpeg -ss "$(expr $count \* $v10)" -i "$fn" -r 1 -an "/tmp/asd/prev_"$count".png"; done
[07:51] <floater_f432c> this should extract 10 preview images from the input video, apparently it extracts 4 and gives errors
[08:53] <UKCoder> I have a question, but not so sure about the terminology so please be tolerant :)  I've been segmenting some files (for HLS) and I've been trying to string them together in an m3u8.  Inside the m3u8 is a collection of segments from 2 original clips (clip 1 comprises 7 segments, clip 2 comprises 5 segments).  My problem is, is the player is getting hung up on the transition between the two clips
[08:54] <UKCoder> well I look at the key difference, the only thing I can see is that the start time (when I do a ffmpeg -i filename) on the first segment of the 2nd clip is back to zero
[08:54] <UKCoder> so my question is, how can I set the start time using ffmpeg to be something other than zero?
[09:25] <UKCoder> k, I found out part of how to set the time code (using -timecode), is there any way to make the timecode constant when using the segmenting options?
[09:43] <UKCoder> argh
[09:44] <UKCoder> the segmenting options of ffmpeg aren't honoring the segment duration and so while I've asked for 10 second segments, it's created a 16s segment :(
[11:35] <emr> hi how i can convert file ISO Media, MPEG v4 system, version 2, from flv, i'm using ffmpeg -i x.flv -sameq -ar 22050 x.mp4 this command generates version 1
[17:48] <Metam_o> Sry, i'm lagging, thought it's a regged name. So hi all, does ffplay able to play multiple parts of a file continously?
[17:48] <Metam_o> For example play the first 5 seconds, then 10-15, then 30-35 etc?
[17:53] <Metam_o> (i know -ss and -t, but they have no effect if i'm specifying multiple times, -i cannot be duplicated)
[17:53] <Metam_o> with the same file
[17:56] <burek> Metam_o, what exactly is the point of such behavior for ffplay?
[17:57] <Metam_o> I would like to play a file but only it's definied sections, i could tell you the whole story but you might not intrested:)
[17:57] <Metam_o> It's not that ffplay should be able to do this crazy thing, i'm happy for everything that it can do, and i like ffmpeg very much
[17:57] <Metam_o> but if it is possible, it would be great
[17:58] <burek> well, ok, but I just ask that because I don't understand it
[17:58] <burek> you can run ffplay several times, for example, each time specifying -ss and -t
[17:58] <Metam_o> but it would be great to have as little glitch/pause between them as possible, starting new instances is overhead imho
[17:59] <burek> then use some scripting video editor (like virtual dub)
[18:00] <burek> in which you can cut off parts you don't want
[18:00] <burek> and just hit play
[18:00] <burek> it will skip cutted parts
[18:00] <burek> without changing the original file
[18:01] <shevy> anyone knows this error happens how http://pastie.org/3921086 ? too recent libX11 version perhaps?
[18:02] <shevy> libavdevice/libavdevice.so: undefined reference to `_XGetRequest'
[18:02] <burek> shevy, if ldconfig doesn't help
[18:02] <burek> then, you need to recompile libx11
[18:02] <burek> or something
[18:03] <burek> try apt-file search "_XGetRequest" to see which library exactly it is
[18:03] <burek> and then apt-get install libx11-dev
[18:03] <burek> or whatever lib name it is
[18:03] <burek> or compile from source
[18:03] <shevy> yeah, source it shall be
[18:04] <burek> the error you got is due to different versions of libs
[18:04] <burek> you have (probably) older version of that lib..-dev installed
[18:04] <burek> and it requires newer
[18:04] <shevy> that makes sense
[18:05] <shevy> I am kinda attracting chaos on my computers
[18:06] <burek> :)
[18:32] <wthivierge_> I need to capture a screen with sound using x11grab, i've install Pulse Audio Volume manager which shows that there is actually volume in the recording but the final video turns out not having any sound at all
[18:32] <wthivierge_> http://zendev.learnquebec.ca/sources/Enjeux3PHP/upload/Recordings/til_november_2012___Wed_May_16_2012_12_18_18_PM.mp4
[18:32] <wthivierge_> How can i make sure the sound it being grabbed
[18:33] <burek> wthivierge_, read this: http://ffmpeg.gusari.org/viewtopic.php?f=16&t=593
[18:33] <wthivierge_> thanks I'll do
[18:35] <slorbast> I'm having a streaming/screencap issue as well, the audio is there but after a few minutes it desyncs with the video. No mic, just internal sound. More info here: http://pastebin.com/0P7wMV0X
[18:35] <burek> slorbast, try -async -vsync or -isync
[18:36] <burek> if none of them helps, make sure you have the latest git version of ffmpeg
[18:36] <slorbast> I've tried -vsync 1 but nothing good
[18:36] <burek> and then submit a bug report
[18:37] <wthivierge_> burek if i type in arecord -l i get "no soundcard found" but the same thing can be done from another "older" vm and the sounds does work.
[18:38] <burek> well, then buy a sound card?
[18:38] <wthivierge_> i used to be able to set which channel was recorded while recording directly in Pulse Audio Volume control and now i do not have theses options anymore, there is no selection in pulse audio volume control only a graphic displaying sound activity
[18:39] <wthivierge_> :P its actually in a KVM container
[18:39] <burek> well, then the problem is not in the ffmpeg :P
[18:40] <wthivierge_> its a closely related practice :)
[18:40] <burek> when you get some other message than "no soundcard found" then you can continue :)
[18:51] <wthivierge_> this is what i'd need if the option was present : http://3.bp.blogspot.com/_WsTORb8RdYw/StLvvY39WVI/AAAAAAAAALY/bkwkWET717s/s1600-h/pavucontrol_example.png
[18:55] <burek> wthivierge_, you obviously don't have sound card installed in your computer (or required drivers)
[18:55] <burek> so there is really no point asking for help here
[18:55] <burek> when you install your sound card correctly
[18:55] <wthivierge_> i got a second of it here : http://zendev.learnquebec.ca/sources/Enjeux3PHP/upload/Recordings/til_november_2012___Wed_May_16_2012_12_41_38_PM.mp4
[18:55] <burek> only then ffmpeg will be able to see it
[18:55] <burek> until then, use google
[18:56] <burek> and solve that problem
[18:56] <wthivierge_> there will never be any sound card of theses machines
[18:56] <burek> well, then what sound do you intend to capture at all? :)
[18:57] <wthivierge_> thank you, i've found the way before, theses are session recording machines which assist to a classroom and record interactions and sound, it worked with e very old version of Ubuntu/ffmpeg/pavuControls, now we have to set up a new Container and updated component
[18:58] <wthivierge_> but currently pavuControl does not give me the options i used to have to capture the incoming stream from FFMPEG even tho i don't have a sound card
[18:59] <wthivierge_> As you can see in the video, there is a stream, and it is being activated, i just need to catch it and pavucontrols latest update does not offer this feature
[18:59] <wthivierge_> i'll need to find it somewhere else
[19:05] <slorbast> burek: I guess the one from the apt repository is bugged because the updated ffmpeg is working great so far. Thank you for your help!
[19:05] <burek> :beer: :)
[19:13] <tibo> hi, how can I take ownership of an AVFrame after calling avcodec_decode_video2 ? Or, what's the way to save the frame in a queue. I looked a avpicture_copy / fill etc, but I get a distored image... any idea ?
[20:00] <Freakshow> anyone know how long we'll be able to use ffpresets moving forward?
[20:01] <Freakshow> it was my understanding that they're being deprecated
[20:01] <ubitux> huh?
[20:01] <ubitux> how so?
[20:01] <Freakshow> no, I thought that was what I had seen in passing on the channel... if this is incorrect, that's even better
[20:02] <ubitux> that may be true but i'm not aware of that and i don't remember anything like this
[20:02] <Freakshow> long live the preset!
[20:02] <ubitux> i did some work a bit on it recently
[20:02] <burek> Freakshow, you can still use -vpre
[20:02] <burek> only it is better to use -preset
[20:02] <ubitux> that's the ffpresets
[20:03] <ubitux> -vpre are just something else
[20:03] <burek> which maps x264 presets directly to libx264
[20:03] <burek> type x264 --help
[20:03] <burek> and see all of them
[20:03] <ubitux> burek: you have ffpreset for libx264
[20:03] <malinens> is there any chance to get rtmpdump support here? I want to enable Akamai authentification for ffmpeg....
[20:03] <burek> but you can still create a preset file and use it with -vpre
[20:03] <ubitux> burek: presets/libx264-ipod320.ffpreset  presets/libx264-ipod640.ffpreset
[20:03] <ubitux> these are special use case of libx264
[20:03] <burek> ubitux, I know :)
[20:04] <ubitux> you can of course you -vpre and -preset
[20:04] <burek> I'm just explaining the guy why ffmpeg stopped distributing x264 preset files for -vpre
[20:04] <JEEB> *most preset files
[20:04] <malinens> I can not apply patches from here: http://lists.mplayerhq.hu/pipermail/rtmpdump/2012-March/001862.html
[20:04] <Freakshow> otherwise, -preset maps back to the ffpresets?
[20:04] <burek> malinens, go to rtmpdump support channel?
[20:05] <malinens> is there such? I can not find
[20:05] <Freakshow> wait, there's an rtmpdump channel?
[20:05] <burek> google :)
[20:05] <JEEB> I would guess so Freakshow -- unless they completely separated -vpre (ffpresets) and -preset (actual encoders' presets)
[20:05] <burek> Freakshow, -preset maps x264 presets only to libx264 lib
[20:05] <malinens> I get this error: http://pastebin.com/2K3tbhEC
[20:05] <burek> -vpre just uses some text files (also named presets) in which you can put all your encoding options
[20:05] <burek> to make your cmd line smaller
[20:06] <malinens> I don't know how to patch :/ git am patch_name gives errors
[20:06] <Freakshow> great... thanks burek
[20:06] <JEEB> (-preset is probably going to be widened to other encoders in case other encoders get internal presets)
[20:06] <JEEB> currently only (lib)x264 has made itself easily usable like that
[20:07] <burek> malinens, https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump
[20:07] <burek> subscribe and post your question there
[20:08] <malinens> thanks
[20:09] <dmalice> ok then, after a while off of my project I'm back on it, and still stuck on some ffmpeg stuff, anyone here used JNI to call ffmpeg native c methods before and can maybe give me some tips? Or otherwise know of a good open source android video app that uses ffmpeg?
[20:11] <burek> dmalice, this is not an android support channel..
[20:11] <burek> and JNI has got nothing to do with ffmpeg specifically
[20:11] <burek> you'll have the same problem no matter what binary you try to use with JNI
[20:11] <burek> so it's not really ffmpeg related..
[20:12] <dmalice> it is, i'm not having problems with the binaries
[20:13] <dmalice> i'm having issues figuring out what ffmpeg functions to actually use
[20:13] <dmalice> i've got it compiled and running fine on android, that isn't really my issue
[20:13] <burek> what is your issue actually?
[20:13] <dmalice> my issue is there's very little documentation/examples aside from command line stuff, and I can't get a good handle on which C functions to use to accomplish what I need done
[20:14] <burek> did you check examples/ directory in ffmpeg source code tar archive?
[20:14] <dmalice> basically, I want to take a video, open it, decode it, break the video into 3 sections, then timescale the middle section in slow-motion, and reencode/save the parts back as one video
[20:15] <burek> did you read these: http://git.videolan.org/?p=ffmpeg.git;a=tree;f=doc/examples;h=d6ab4e9e53ea4b1d67e1e14f7f5b12f22a3fd401;hb=HEAD
[20:16] <dmalice> yeah, I've used those examples to decode video to pgm/ppm images, but I can't seem to figure out how to get it to decode to color pngs which I also need
[20:18] <burek> then find the image2 filter source code
[20:18] <burek> and see how it handles png images
[20:19] <burek> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/img2enc.c;h=175b854b6a655f8eab5a3cdd512e0f147c914dad;hb=HEAD
[20:21] <burek> or directly png encoder: http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pngenc.c;h=c29435b1a857806d47d8a09b6019519c934bb684;hb=HEAD
[20:22] <dmalice> yeah, i've looked into pngenc.c, do you know how i can actually invoke those methods tho?
[20:26] <burek> well, take a look at how ffmpeg includes them and do the same
[20:26] <burek> probably just a couple of includes and then you call whatever method you need
[20:28] <dmalice> i don't seem to get the header files when I build my ffmpeg, that might be my problem, when I build ffmpeg it includes png in the list of encoders that will be built
[20:28] <dmalice> but I don't get a pngenc.h
[20:30] <burek> there is no pngenc.h
[20:30] <burek> look at the pngenc.c header
[20:30] <burek> it includes png.h
[20:31] <dmalice> err sorry, that's what i meant, png.h
[20:32] <burek> then you are not using the latest ffmpeg from git
[20:32] <burek> pull the latest git version and you'll have png.h
[20:32] <dmalice> I have png.h in the source
[20:33] <dmalice> but when I compile ffmpeg source for use in android, it compiles static binaries and headers that I can use in my project
[20:48] <Yuhjn> is it possible to get ffmpeg to combine 2 mp3 files into a single mp3 file?
[20:49] <burek> Yuhjn, maybe using concat: protocol?
[20:49] <burek> did you try it?
[20:50] <Yuhjn> i did, I was only able to get that to contatenate them, ie it would play the first mp3, then the second.  I need them mixed
[20:50] <Yuhjn> doesnt mean concat: cant do it, but i was unable to get it to
[20:50] <sacarasc> Yuhjn: SoX can do that, I believe.
[20:50] <burek> or audacity
[20:51] <burek> basically an audio editor
[20:51] <burek> or this :D http://ffmpeg.org/ffmpeg.html#amerge
[20:52] <Yuhjn> it must be command line, and it must be win and mac compatible, and open source
[20:52] <burek> and then stack it with the pan filter
[20:52] <burek> I figure it could also do the job
[20:52] <Yuhjn> yes I tried to use amerge, no luck... will continue to try
[20:53] <burek> amerge will create multiple channel stream, like 5.1
[20:53] <burek> and then pan filter will take 5.1 and create simple stereo out of it, mixing channels
[20:53] <burek> and yes, keep in mind that using audio filters in ffmpeg is currently a bit clumsy
[20:54] <burek> because you can't just type -af "filter1,filter2,..."
[20:54] <burek> you need to use -lavfi
[20:54] <burek> here is an example: http://ffmpeg.gusari.org/viewtopic.php?f=25&t=517
[20:56] <Yuhjn> that's awesome, thank you very much
[20:56] <Yuhjn> i'll stay after it
[20:57] <burek> :beer: :)
[21:24] <floater_f432c> hi
[21:25] <floater_f432c> how do i tell ffmpeg the audio is over when the video stream is over ?
[21:25] <floater_f432c> and it would be even nicer if ffmpeg would fade out the last 1-5 seconds
[21:30] <cbsrobot> floater_f432c: -shortest
[21:30] <cbsrobot> or something similar
[21:31] <madwill> is this true that most of the ffmpeg dev have moved to libav
[21:31] <madwill> and ffmpeg a lonely trunk that's going to be left to die ?
[21:32] <burek> madwill, that's just a propaganda
[21:32] <madwill> i thought so
[21:39] <floater_f432c> cbsrobot<< thanks, cool , can ffmpeg fade out audio as well?
[21:42] <Guest69545> Is there any way to stream video using ffmpeg as a UDP server, not as a UDP client (as it runs by default)?
[21:46] <burek> Guest69545, yes there is
[21:47] <Guest69545> Could you please tell me how to do it?
[21:50] <Guest69545> Or at least where I can find the answer, I read quickly through the documentation. But I cannot find the answer.
[21:58] <burek> Guest69545, just a sec
[22:00] <ubitux> madwill: half of the dev is done on ffmpeg, ffmpeg takes everything from libav, libav ignore most of ffmpeg stuff
[22:00] <ubitux> madwill: where did you hear this?
[22:01] <burek> Guest69545, do you need to send stream from ffmpeg to another machine, over udp?
[22:01] <madwill> red5 community, so its a bit unrelated
[22:02] <Guest69545> burek, yes
[22:03] <burek> ffmpeg -i input.avi -vcodec ... -acodec ... -f mpegts udp://remote_addr:port
[22:04] <Guest69545> burek, in your example, ffmpeg is udp client, not a server as far as I see.
[22:05] <burek> Guest69545, explain to me what is "UDP server" ?
[22:08] <Guest69545> OK, there is no really a UDP server. The actual problem is that I do not know the remote machine's (that is te machine which will recieve the video)  IP, because it's a dynamic IP
[22:09] <Guest69545> basically I want ffmpeg to wait (listen) for an incoming packages, and when there is one, it should start streaming video to that host over UDP
[22:11] <Guest69545> I am able to stream the video when I know the remote's machine IP. In this case I use the following url on that remote machine: rtp://IP1:PORT1, but this IP1 is actually the remote machine IP, because it has to LISTEN on that interface
[22:12] <burek> Guest69545, ffmpeg -i udp://localhost:port
[22:13] <burek> Guest69545, you need tcp, not udp
[22:14] <Freakshow> is there any chance that ffmpeg would strip out ad-cuepoint atoms inserted into an flv when using -acodec copy -vcodec copy?
[22:14] <Guest69545> Streaming video through UDP is better for real streming, isn't it?
[22:15] <burek> then use rtsp
[22:15] <Freakshow> or rtmp even
[22:16] <Guest69545> rtsp uses tcp as a transport, right?
[22:16] <Freakshow> not natively
[22:16] <Freakshow> but you can force it
[22:16] <Freakshow> -f rtsp -rtsp_transport tcp -muxdelay 0.1
[22:17] <Guest69545> I actually would like to use UDP for transport
[22:17] <Guest69545> or anything which can provide real time, rather then reliaility
[22:18] <Freakshow> then leave it as is
[22:19] <Freakshow> i.e. don't force it to use tcp
[22:19] <Freakshow> why do you not want it to use tcp?
[22:19] <Guest69545> well TCP is slower
[22:19] <Freakshow> and udp will look generally, umm... bad
[22:20] <Freakshow> unless you don't care about dropped frames
[22:20] <Guest69545> I don't care about dropped frames
[22:20] <Guest69545> real time is more inportant in my case
[22:20] <Freakshow> I  completely understand.
[22:21] <Guest69545> thanks, I'll try your command
[22:22] <Freakshow> just fyi, I'm using rtsp over tcp and getting roughly d 4s delay on a live stream
[22:23] <burek> Freakshow, yes but the delay increases
[22:24] <burek> as the network gets busier
[22:24] <nijm> I'm trying to iterate over the streams in a AVFormatContext and print out the index of any video streams. av_dump_format() is able to print out all the info, but my code is segfaulting and I don't know why: http://pastebin.com/D1PM5aAm
[22:24] <Guest69545> 4sec is too much for use, we are controlling a robot
[22:24] <nijm> It seems to segfault when I try to access any members of the streams. Any ideas?
[22:24] <Freakshow> burek: agreed... but I'm looking for quality over delay
[22:25] <Freakshow> hold the phone. A robot?
[22:25] <Freakshow> awesome
[22:25] <Guest69545> yes :)
[22:27] <Freakshow> so anyone have any thoughts on my previous question about ad-cuepoints in a static flv being stripped?
[22:27] <killown> can anyone help me to use ffmpeg as screen recorder? I am recording a gameplay and by now I was using recordmydesktop but it has alot lag and I was using mic too, is there a way to record my screen and record the any OS sound using ffmpeg? using mic isn't seems right
[22:27] <Guest69545> Freakshow, but in the rtsp:// url for the ffmeg parameter should I enter the streaming machine IP, or the receiving machine IP?
[22:28] <Freakshow> I would think it should be the receiving machine's ip... you'll need to deal with rtsp's basic authentication mechanism somehow as well
[22:29] <Guest69545> but this is the problem, I do not know the recieving machine's IP
[22:29] <Freakshow> ah, if you left those details above, I'm sorry... I missed that point
[22:30] <Freakshow> reading again
[22:32] <nijm> Do I have to do anything other than avformat_open_intput() & avformat_find_stream_info() before I try to dereference the AVFormatContext.streams pointers?
[22:38] <burek> nijm, check the examples/ directory in ffmpeg source
[22:38] <burek> docs/examples/
[22:44] <burek> killown, http://ffmpeg.gusari.org/viewtopic.php?f=25&t=594&sid=b8f0718ee9a33354fd5bb15734f9b1a6
[22:45] <killown> burek, thank you
[22:46] <phillips321> hi guys, first time posting in #ffmpeg and have a relaively simple question:
[22:46] <phillips321> how can i surpress output from ffmpeg? im using it within a script and dont want the output to hit the interactive shell
[22:46] <phillips321> -loglevel 0 doesnt seem to do alot
[22:47] <killown> is there something wrong here ffmpeg -f alsa -ac 2  -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i hw:0.0 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 test.mkv    ¿¿¿
[22:47] <killown> it hangs on [x11grab @ 0x9375240] device: hw:0.0 -> display: hw:0.0 x: 0 y: 0 width: 1920 height: 1080
[22:48] <killown> This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
[22:48] <killown> 0.o
[22:48] <burek> killown, I don't know really, it always works for me using that tut I gave you
[22:49] <killown> something wrong with my Xorg then, let me restart
[22:55] <Freakshow> phillips321: do you have an example of your cmd line?
[22:56] <phillips321> Freakshow:  this as an example ffmpeg -i P3210078.AVI -vcodec libx264 -vpre medium -ar 44100 FILM_M2.mp4
[22:56] <phillips321> i'm wanting verbosity to be minimal as it doesnt look tidy within the script
[22:57] <phillips321> first time ive really used ffmpeg within a script and im not entirely sure of all the flags, did look thru man pages but loglevel was all i got
[22:57] <Freakshow> have you tried redirecting the log output to a file?
[22:58] <phillips321> no i havent,  so
[22:58] <phillips321> ffmpeg -i P3210078.AVI -vcodec libx264 -vpre medium -ar 44100 FILM_M2.mp4 > /dev/null        #will work?
[22:58] <burek> phillips321, ffmpeg ... 2>/dev/null
[22:58] <phillips321> nothing is better than everything, but it would be nive for one or two lines
[22:58] <Freakshow> not unless you want everything to go to /dev/null, try something like: ffmpeg -i P3210078.AVI -vcodec libx264 -vpre medium -ar 44100 FILM_M2.mp4 2> /tmp/logfile
[22:58] <Freakshow> yeah
[23:00] <phillips321> shame ffmpeg doesnt have a --quiet flag or a -v0 or -v1 etc...
[23:00] <killown> hi
[23:00] <killown> anyone here does know why this ffmpeg -f alsa -ac 2  -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i hw:0.0 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 test.mkv    shouldnt work?
[23:01] <killown> it hangs at this output [x11grab @ 0x9f64480] device: hw:0.0 -> display: hw:0.0 x: 0 y: 0 width: 1920 height: 1080
[23:05] <burek> "<phillips321> shame ffmpeg doesnt have a --quiet flag or a -v0 or -v1 etc..." ---> "<burek> phillips321, ffmpeg ... 2>/dev/null"
[23:07] <phillips321> burek: yeah, sorry, what i meant was a surpressed output, if im converting 100 videos i dont need 20-30 lines per video, just one would be ample, dev null it is though ;-)
[23:08] <killown> http://bpaste.net/show/5DbqfY6bhBCbi6wcjT0f/
[23:09] <burek> killown, update your ffmpeg
[23:09] <burek> it's way too old
[23:09] <killown> burek, ubuntu 12.04 here how could it be too old?
[23:09] <killown> maybe its now avconv?
[23:13] <killown> I am following here http://ffmpeg.gusari.org/viewtopic.php?f=25&t=14
[23:17] <nijm> burek: Thanks, I've had a look at the examples, but I'm still not sure why I can access any of the AVFormatContext.streams.
[23:18] <nijm> *can't
[23:20] <phillips321> guys, one last question: to improve efficiency in my script is there a way i can tell ffmpeg to use more than 1 core of my processor? ffmpeg -threads 2 -i in.avi out.avi  seems to only be for on the fly conversion
[23:21] <burek> killown, it's not avconv.. that avconv is just an ffmpeg fork, nothing more.. some people decided to do something in a different way and created a fork
[23:21] <burek> that's all it is
[23:21] <burek> and this sentence is a complete lie "This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes)."
[23:22] <burek> if that was true, you wouldn't be in this channel getting help from me, would you ? :)
[23:22] <burek> so, get the latest git source
[23:22] <burek> compile it and try again your example
[23:23] <burek> nijm, maybe you can ask in #ffmpeg-devel but be patient, because developers usually don't have a lot of time/patience
[23:24] <burek> phillips321, use -threads 0
[23:24] <killown> burek, thanks
[23:24] <killown> I am compiling it right now
[23:24] <burek> that will automatically determine the number of your cpu cores and set number of threads accordingly
[23:24] <killown> burek, I have 4 cores here
[23:24] <killown> do I need use -threads 4?
[23:24] <phillips321> burek: thanks for that, as the script is for others that helps loads, as i wont need to do some form of detection first :-)
[23:24] <burek> killown, then, when running make, use: make -j 5
[23:25] <burek> it will speed up build process dramatically
[23:25] <killown> thank you
[23:25] <killown> ./configure --enable-gpl --enable-libx264
[23:25] <burek> :beer:
[23:25] <killown> is that enough?
[23:25] <burek> killown, if you need just x264, then yes
[23:25] <killown> I just need record my desktop with sound
[23:26] <burek> killown, well, you can try a quick test with http://ffmpeg.gusari.org/static/
[23:26] <burek> just unpack and run
[23:26] <burek> and see if it works
[23:27] <burek> and then paste the command on pastebin.com and I'll tell you what exactly you'll need to compile additionally (if needed)
[23:27] <burek> so you can have a properly built ffmpeg for your machine
[23:35] <phillips321> burek: [mjpeg @ 0xb639a0] automatic thread number detection not supported by codec, patch welcome
[23:35] <phillips321> seems like threads is that reliable at the moment
[23:41] <burek> phillips321,
[23:41] <burek> can you please use pastebin.com, to show your command line and its output?
[23:43] <phillips321>  [[ !(-f "$vidDir"/"@eaDir"/"$vidName"/'SYNOPHOTO:FILM.flv') ]] && ( echo "" ; ffmpeg -threads 0 -i "$vidDir""/""$vidName" -s 426x240 -f flv -deinterlace -ab 64k -acodec libmp3lame -ar 44100 "$vidDir"/"@eaDir"/"$vidName"/'SYNOPHOTO:FILM.flv' 2> /dev/null ; echo "   -- "$vidName "flv created";)
[23:43] <burek> please use pastebin
[23:44] <burek> wait
[23:44] <burek> first change 2>/dev/null to 2>/var/log/test.log
[23:44] <burek> and then use pastebin to just put the content of the test.log
[23:51] <killown> doesnt work http://bpaste.net/show/5efMXv4jahpo5ey0tAUI/
[23:51] <killown> :(
[23:52] <burek> your command line is so wrong
[23:52] <burek> -f ... <params> -i <input>
[23:52] <burek> and then another combination of that follows
[23:52] <burek> that's how you should use ffmpeg
[23:53] <burek> but you did -f ... -f ... -i .. -i ...
[23:53] <burek> which obviously won't work
[23:53] <killown> burek, what about this http://bpaste.net/show/TtrNO4ACvlaMFZfsMxUB/
[23:54] <burek> ffmpeg -f alsa -ac 2 -i hw:0.0 -f x11grab -r 30 -s 1920x1080 -i 0:0 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 nop.mkv
[23:54] <burek> try that
[23:55] <killown> -i hw:0.0+100,200 hangs ffmpeg
[23:55] <burek> that's invalid anyway
[23:55] <killown> ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
[23:55] <killown> [alsa @ 0xa2bf460] cannot open audio device hw:0.0 (No such device)
[23:55] <killown> hw:0.0: Input/output error
[23:55] <burek> hw:0.0 means first audio card - first recording device on that audio card
[23:55] <killown> ok
[23:56] <burek> try the example I gave you
[23:56] <killown> i did
[23:56] <burek> no such device?
[23:56] <killown> that last error was about your example
[23:56] <burek> try -i hw:0 instead
[23:56] <killown> [x11grab @ 0xa2a27c0] Could not open X display.
[23:56] <killown> 0:0: Input/output error
[23:57] <burek> read this http://ffmpeg.gusari.org/viewtopic.php?f=25&t=594
[23:57] <burek> I made a mistake in that line above
[23:57] <killown> ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0+100,200 -f alsa -ac 2 -i pulse output.flv was the first try
[23:57] <burek> instead of "-s 1920x1080 -i 0:0" put "-s 1920x1080 -i :0.0+100,200"
[23:57] <killown> anything on this link fails with could not open x display
[23:58] <killown> :0.0+100,200: Input/output error
[23:59] <killown> killown at killown:~$ echo $DISPLAY
[23:59] <burek> ffmpeg -f alsa -ac 2 -i hw:0 -f x11grab -r 30 -s 1920x1080 -i :0.0 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 nop.mkv
[23:59] <killown> :1
[23:59] <burek> try that
[23:59] <burek> oh
[23:59] <burek> ffmpeg -f alsa -ac 2 -i hw:0 -f x11grab -r 30 -s 1920x1080 -i :0.1 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 nop.mkv
[23:59] <burek> http://ffmpeg.org/ffmpeg.html#x11grab
[23:59] <killown> :0.1: Input/output error
[23:59] <burek> ffmpeg -f alsa -ac 2 -i hw:0 -f x11grab -r 30 -s 1920x1080 -i :1 -acodec pcm_s16le  -vcodec libx264 -preset ultrafast -crf 0 -threads 0 nop.mkv
[00:00] --- Thu May 17 2012


More information about the Ffmpeg-devel-irc mailing list