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

burek burek021 at gmail.com
Mon Apr 30 02:05:02 CEST 2012


[00:11] <robertzaccour> I'm recording with ffmpeg and wanna record the audio from my webcam instead of internal mic. How do I know what to input for my webcam?
[00:32] <burek> robertzaccour, type: arecord -L
[00:32] <burek> and use it like: ffmpeg -f alsa -i <here>
[00:32] <burek> like -i hw:0
[00:32] <burek> or -i default:front
[00:33] <burek> etc
[00:36] <robertzaccour> burek, If I paste the command I know to use would you be able to help me adjust it accordingly?
[00:37] <robertzaccour> burek, ffmpeg -f alsa -ac 2 -i pulse -r 30 -s 1366x768 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 screencast.avi how do I adjust the input from here?
[00:41] <robertzaccour> burek, I did ffmpeg -f arecord -L -i pulse -r 30 -s 1366x768 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 screencast.avi and it said this version has nonfree parts and not legally distributable but didn't record
[00:43] <ZodiacMentor> http://www.rizeofthefenix.com/
[00:45] <burek> robertzaccour, if you use -i pulse, then you need to configure pulse
[00:46] <burek> ZodiacMentor, what's the point of your spam?
[00:46] <robertzaccour> burek, I don't know a lot about ffmpeg I just need to switch the audio recording from the internal mic to the webcam mic. would you be able to tell me the the input needed to capture from the webcam mic instead of the internal?
[00:46] <burek> robertzaccour, first of all type: arecord -l
[00:46] <burek> (small L)
[00:47] <burek> and paste the output to pastebin.com
[00:47] <ZodiacMentor> burek, no point. no more spam if that's the rule/general idea of the channel. sorry.
[00:47] <burek> ZodiacMentor, do you need any help with ffmpeg or what?
[00:47] <robertzaccour> burek, http://pastebin.com/j10UssnH
[00:48] <ZodiacMentor> had once, the problems have been solved since then... decided to stay, just in case I need help and/or I could help
[00:48] <burek> robertzaccour, try -i hw:1
[00:49] <burek> ZodiacMentor, ok :)
[00:49] <robertzaccour> burek, command not found
[00:50] <burek> :)
[00:50] <burek> ffmpeg -f alsa -ac 2 -i hw:1 -r 30 -s 1366x768 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 screencast.avi
[00:51] <burek> also, if your mic is mono, you might change -ac 2 to -ac 1
[00:51] <robertzaccour> http://pastebin.com/0dCGji1R
[00:52] <robertzaccour> trying it brb to let you know thanks
[00:52] <burek> "cannot set channel count to 2"
[00:52] <burek> as I said, try -ac 1
[00:55] <robertzaccour> burek, the sound is clearer but now the audio is out of sync with the video
[00:56] <robertzaccour> burek, perhaps there's a way to sync it or record both audio and video directly from the webcam?
[00:56] <burek> robertzaccour, if you are recording both from webcam (audio/video) there should be no sync issues
[00:57] <burek> but since you are using x11grab (grabbing your desktop) some sync issues can exist
[00:57] <burek> which you can resolve with -async or -vsync or -isync
[00:57] <burek> http://ffmpeg.org/ffmpeg.html
[00:57] <robertzaccour> burek, where would I input -async or -vsync?
[00:58] <burek> I'm not quite sure, I didn't use it a lot
[00:58] <burek> try and see :)
[01:03] <robertzaccour> :( no dice
[01:03] <robertzaccour> the tutorials are confusing to me
[01:06] <robertzaccour> burek, do you know how to capture both audio and video directly from the webcam? instead of x11grab what should I do?
[01:06] <burek> ffmpeg -f alsa -ac 2 -i pulse -r 30 -s 1366x768 -f video4linux2 -i /dev/video0 -vcodec msmpeg4v2 -qscale 2 screencast.avi
[01:07] <burek> or /dev/video1 if you have multiple devices
[01:09] <burek> need to go, I hope you'll make it :)
[01:10] <robertzaccour> oh didn't yet but thanks
[01:34] <praedo> hello
[01:35] <praedo> i try to catch a png photo from a mp4 video and being ntsc it shows with blue and red lines
[01:35] <praedo> i use this:
[01:35] <praedo> ffmpeg -i file.mp4 -vframes 1 -ss 00:01:00 -an -vcodec png -f rawvideo -s 93x70 file.png
[01:36] <praedo> do i need to specify something for ntsc input?
[01:40] <pasteeater> praedo: what are you useing to view the output?
[01:40] <pasteeater> also "-an -vcodec png -f rawvideo" are unnecessary
[02:00] <praedo> why?
[02:00] <praedo> i just double click to open the png
[02:01] <praedo> http://www.ixac.tv/tramuntana_live/reportatges_sports/load/images/uef_lorenzo_2a_part.jpg
[02:01] <praedo> this is ranamed to jpg but it's png
[02:01] <praedo> no problem there
[02:01] <praedo> but you can see how it looks
[02:31] <elkng> using 2 pass ecoding ensures exact bitrait but is there different in CPU load if I create video using regular one pass way or using 2 pass way ? will 2 pass encoding generate video that will load CPU less while playing it ?
[05:52] <Shimmy> I have a video that is working on my device. Here is its details: http://pastebin.com/10AigrQ1
[05:53] <Shimmy> I want to convert videos to match its same details so the converted ones should also work on my device. I'm an ffmpeg noob, please help me with what params I should pass.
[07:34] <elkng> I encoded video using libvorbis for sound using "ffmpeg version 0.10.2" and when I played it on another PC with "MPlayer 1.0rc1" there
[07:34] <elkng> is a problem with a sound its appeared every few seconds for half a second is that problem with incorrectly encoded libvorbis or with version of mplayer ? I've no problems using "libmp3lame" for sound
[08:18] <Shimmy> Anyone around?
[08:19] <Shimmy> Is there anything in ffmpeg that can mimic params from a different file?
[08:19] <Shimmy> I need to convert a file so it should have the same configurations like a third file, can i extract a preset/params list from it?
[08:22] <elkng> ffprobe ?
[08:28] <Shimmy> what's ffprobe?
[08:29] <Shimmy> second, im checking
[08:35] <Shimmy> elkng, it doesn't do what I want, I want to get a ready command line configuration/preset for a specific file, i.e. if the video size is WxH, it should add a parameter -s WxH and so on, is there anything that does it?
[08:36] <Shimmy> This file: http://pastebin.com/10AigrQ1 works on my device, I'm trying to convert another video to have the same configuration but it doesn't work on my device
[08:37] <elkng> I want the same
[08:42] <elkng> "ffwavesynth Internal wave synthetizer. This decoder generates wave patterns according to predefined sequences. Its use is purely internal and the format of the data it accepts is not publicly documented.", what does "not publicly documented" means ?
[08:57] <Plorkyeran> it means it's not documented and don't use it
[09:31] <Shimmy> How to convert a video it should be like his one: http://pastebin.com/10AigrQ1
[10:33] <elkng> -vcodec mpeg4 -vb 400k -s 160x128 -ab 128k -ar 44100 -ac 2 -acodec mp2
[10:43] <Shimmy> elkng, it doesn't work on my device.
[10:45] <Shimmy> Here is the converted file.
[10:46] <Shimmy> The converted file doesn't work: http://pastebin.com/r5825AVF
[10:46] <Shimmy>  This file however, works on the device: http://pastebin.com/10AigrQ1
[10:46] <Shimmy> What did I miss out?
[10:54] <Shimmy> Anyone?
[11:05] <elkng> try to add "-vtag xvid" option
[12:38] <fantastic001> hi, i am trying to compile opencv but i get error, there is not any function/variable needed for opencv in ffmpeg, i need to compile ffmpeg with something but what ? i asked on #opencv but no answer, this is error /tmp/fantbuild-work/opencv-2.3.1-1/OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1485:25: error: av_write_header was not declared in this scope
[12:39] <fantastic001> i compiled ffmpeg without libavdevice
[12:40] <burek> it could be that you need to use exact version of opencv and ffmpeg
[12:40] <burek> in order to bind those together
[12:41] <fantastic001> i use ffmpeg from git
[12:41] <fantastic001> and opencv 2.3.1a
[12:44] <burek> you need to read documentation of opencv
[12:44] <burek> to see what exact version of ffmpeg you need
[12:46] <fantastic001> i'll try opencv from svn
[12:48] <fantastic001> and when i was compiling ffmpeg i set --libdir=/usr/lib64 but make install installed .so libraries to /usr/lib, why ?
[12:49] <burek> you need to use --prefix
[12:49] <fantastic001> i used
[12:49] <burek> type ./configure --help
[12:49] <burek> and read it
[12:51] <fantastic001> this is my ./configure command http://pastebin.com/dWLxpc8b
[12:51] <fantastic001> $LIBSUFFIX is set to 64
[12:53] <burek> Shimmy, try using MEncoder
[12:53] <burek> Metadata:     encoder         : MEncoder dev-SVN-r27958-4.2.2
[12:54] <burek> fantastic001, read ./configure --help
[12:54] <burek> nobody is gonna solve your problem for you
[12:54] <burek> if you don't want to read, well be it
[12:56] <fantastic001> agh, there is --shlibdir :D
[13:08] <ashka> hello
[13:09] <ashka> as you may know, ffmpeg introduced a support to stream with rtmp
[13:09] <ashka> is it possible to get a avi/mkv file from a live rtmp stream ?
[13:12] <ashka> nvm
[17:56] <Adys> Trying to record from webcam and keep audio in sync, this has audio running behind by 3-4 seconds
[17:56] <Adys> ffmpeg -f alsa -i pulse -f video4linux2 -s 800x600 -i /dev/video0 -sameq -acodec libmp3lame -ab 96k out.mkv
[17:58] <burek> can you please use pastebin.com, to show your command line and its output?
[18:01] <Adys> burek: http://paste2.org/p/2000408 - first part recording it with ffmpeg, 2nd part playing it with mplayer
[18:02] <burek> is this an usb webcam
[18:02] <Adys> yes
[18:02] <burek> i suppose usb 2.0
[18:02] <Adys> ya
[18:03] <burek> 153600 kb/s
[18:03] <Adys> input comes from a separate usb mic if that makes any difference
[18:03] <burek> im not sure if 2.0 can support such speed
[18:03] <burek> well audio is not a problem
[18:03] <burek> but video is
[18:03] <burek> although they most probably share the same usb host controller
[18:03] <burek> try lowering your video resolution to 320x240
[18:04] <burek> just to see if it works
[18:04] <Adys> hmm
[18:04] <Adys> i get some weird speedup
[18:04] <Adys> and lots of PTS 4254653, next:4716287 invalid dropping st:0
[18:05] <burek> try 400x300
[18:06] <Adys> same
[18:06] <burek> try using v4l2-ctl
[18:06] <burek> to see webcam capabilities
[18:06] <burek> which resolutions it supports
[18:07] <Adys> gives me usage, what do I use?
[18:08] <burek> v4l2-ctl --list-formats-ext
[18:08] <Adys> burek: http://paste2.org/p/2000416
[18:10] <burek> ffmpeg -f video4linux2 -s 320x240 -r 25 -i /dev/video0 -f alsa -i pulse -sameq -acodec libmp3lame -ab 96k out.mkv
[18:10] <Adys> no errors but sound still lagging about 1 second behind
[18:11] <burek> well, it's a bug then :/ and you should report it if you can :)
[18:11] <burek> http://ffmpeg.org/bugreports.html
[18:12] <burek> several people experienced this sync problem between audio/video, myself including, but it wasn't fixed so far :s
[18:12] <burek> I'm not sure if it's an ffmpeg bug at all, maybe even alsa or video4linux2..
[18:13] <Adys> using mp4 solves it
[18:13] <Adys> hm
[18:14] <Adys> even works in 1280x720
[18:14] <burek> cool :)
[18:14] <burek> still you could report it for mkv to fix it if there is a problem
[18:15] <Adys> will do
[18:15] <burek> thanks :)
[18:16] <drewfulton> hello, i'm looking for some help compiling from the git, i keep getting an error that kills it during the make ->http://pastebin.com/r701A4SS
[18:16] <Adys> burek: though wouldnt mind if you could file it for me, I have a strong distaste for creating new accounts nowadays
[18:17] <burek> ok
[18:23] <burek> drewfulton, just a sec
[18:24] <drewfulton> no hurry
[18:25] <burek> drewfulton, are you cross-compiling
[18:26] <burek> Adys, this is for your reference: https://ffmpeg.org/trac/ffmpeg/ticket/1259
[18:26] <drewfulton> to be honest, i'm new to git and this process as I usually use MacPorts but needed some external AAC libraries
[18:26] <Adys> burek: keeping in mind i use pulse
[18:27] <drewfulton> this is my configure line -> http://pastebin.com/EtW2jBHc
[18:28] <drewfulton> and then i do 'make' and it runs through a ton of code and ends with that error from the first paste above
[18:29] <burek> Adys, yes but -f alsa :)
[18:29] <Adys> mmh yeah
[18:29] <burek> drewfulton, try running: ldconfig
[18:29] <burek> and then repeat make, to see if it will succeed
[18:30] <drewfulton> burek, just type ldconfig in the command line?
[18:30] <burek> yes
[18:31] <drewfulton> command not found
[18:32] <burek> as root?
[18:34] <drewfulton> yup, BTW, i'm on a Mac running Lion...
[18:35] <burek> I really wouldn't know then.. Never used it..
[18:35] <kami8785> how can i get ffmpeg to give me a 5 second clip of a flv? ``ffmpeg -i ogs.flv -ss 1000  -t 5  -acodec copy -vcodec copy -scodec copy s.flv`` gives me a broken 5 sec clip (probably because there's no keyframes) and putting the -ss before the -i gives me a working clip that is 12 seconds long..
[18:36] <drewfulton> looks like dyld is the mac's version of it, one sec
[18:36] <burek> kami8785, maybe the original file has got key frames which are not in those 5 seconds
[18:36] <burek> so you naturally get defective output
[18:37] <burek> for 5 seconds it is wise to reencode anyway
[18:38] <kami8785> hi again burek :)
[18:38] <kami8785> yeah i want to crop it and then resize that crop /2
[18:39] <kami8785> so i cant get around reencoding?
[18:39] <drewfulton> burek, thanks for your help, i'll keep trying things and see what I can figure out.  i might be back later
[18:42] <drewfulton> burek, separate question taht might end up avoiding all of this to start with, what is the best AAC encoder to use for x264 video?
[18:42] <burek> NeroAACEnc
[18:42] <burek> :)
[18:43] <burek> "to use for x264 video" ?
[18:43] <burek> I don't understand
[18:43] <burek> kami8785, well, you'll need to reencode anyway :)
[18:44] <drewfulton> when i'm encoding something for web display, and i want to set my vcodec to x264, don't i also need to set a separate acodec?
[18:46] <burek> well, there is no "best match for x264" if that's what you are asking me
[18:46] <burek> there are several aac encoders ffmpeg supports
[18:46] <burek> internal aac, libvo-aaenc
[18:47] <burek> faac (I'm not sure if this has been deprecated)
[18:47] <burek> and libaacplus (non-redistributable)
[18:47] <burek> with libaacplus you can create 32kbps audio, which most radio stations online use for broadcasting, because of its superb qualityu
[18:48] <drewfulton> ok, let me step back a minute...  if I want to create HTML5 compatible video, what would you recommend for the mp4 side of things?
[18:49] <drewfulton> sorry for my ignorance, i've been doing a lot of research and feel like i know just enough to get myself in trouble but not have a really full understanding
[18:49] <burek> :)
[18:50] <burek> my understanding of html5 is that you just create your video/audio and let the client's machine decide how to play it
[18:50] <burek> so, it really depends on what client is accessing your media
[18:50] <burek> flash player was so far the best choice
[18:51] <burek> and flv container with libx264 video + aac audio in it
[18:51] <drewfulton> right, one of those optoins needs to be a H.264 compatable file with a H.264 video stream and an AAC audio stream
[18:51] <drewfulton> exactly, so what is my best option using ffmpeg to create that file
[18:52] <burek> well you can try ffmpeg -i input.wav -f aac -strict experimental -ab 96k -ac 2 -ar 44100 out.aac
[18:52] <burek> or use NeroAacEnc and create your audio.aac file
[18:53] <burek> and later merge it into media with: ffmpeg -i video.flv -i audio.aac -vcodec copy -acodec copy out.flv
[18:53] <drewfulton> alright, i'll give it shot
[18:53] <drewfulton> thanks for your help
[18:56] <burek> :beer: :)
[19:18] <echelon> how do i record a stream that i'm using ffplay to play
[19:19] <burek> ?
[19:21] <echelon> i use "ffplay -rtsp_transport tcp -probesize 20480 rtsp://208.86.19.32:8000/crtn" to watch a stream
[19:21] <echelon> how do i save it
[19:22] <burek> ffmpeg rtsp://208.86.19.32:8000/crtn -acodec copy -vcodec copy -scodec copy save.flv
[19:23] <echelon> so i don't use -i?
[19:23] <burek> pardon, use -i
[19:25] <echelon> Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
[19:26] <burek> try: ffmpeg -rtsp_transport tcp -probesize 20480 -i rtsp://208.86.19.32:8000/crtn out.mpg
[19:26] <burek> or mkv, mp4, avi
[19:26] <burek> can you please use pastebin.com, to show your command line and its output?
[19:29] <echelon> ah, it worked
[19:29] <echelon> thanks :)
[19:29] <burek> :beer: :)
[19:29] <echelon> ^_^
[19:30] <kami8785> ok if i want to reencode a flv file like this http://pastebin.com/tJNiUEQ8, what would be some good settings so it doesnt look like crap?
[19:32] <burek> kami8785, do you see the line (for video) that starts with: Encoding settings:
[19:33] <kami8785> yes, but honestly that looks like chinese to me :| can i plug that stuff into ffmpeg?
[19:35] <burek> well, I'm not aware of any on-the-fly way to re-encode a file with exact same options
[19:36] <burek> but you can try ffmpeg -i ogs.flv -vcodec libx264 -crf 20 -b 888k out.flv
[19:36] <kami8785> k cool i will try :)
[19:37] <burek> and -acodec copy
[19:37] <kami8785> it has to play in flash player. is x264 a good choice for that?
[19:37] <burek> ffmpeg -i ogs.flv -acodec copy -vcodec libx264 -crf 20 -b 888k -t 60 out.flv
[19:37] <kami8785> something like this would be good http://pastebin.com/2E0CSUXB
[19:37] <burek> that would give you 60 seconds of output, just for test
[19:37] <kami8785> but ill try yours first
[19:37] <burek> which flash player exactly
[19:39] <kami8785> the one these guys are using for mouseover previews http://www.videocopilot.net/tutorials/ :  http://www.videocopilot.net/assets/public/flash/player.swf
[19:45] <burek> web flv player I guess
[19:45] <burek> well flv with h264+aac will work generally
[19:47] <kami8785> k im recompiling ffmpeg with x264 now
[19:48] <burek> good idea :)
[21:20] <kami8785> thanks burek, that worked very well, if i want to crop a video and then resize it, what would be the best approach? do it in 2 commands or do one before the other?
[21:21] <kami8785> this ` ffmpeg  -i s.flv -an -vcodec libx264 -crf 20 -b 888k -vf crop=760:420:260:100  -s 380x210  s2before.flv` doesnt work
[21:21] <burek> what exactly doesn't work
[21:22] <kami8785> http://pastebin.com/RP35bGyb
[21:22] <burek> oh
[21:23] <burek> well, ffmpeg first resizes the input
[21:23] <burek> and then proceeds to your -vf
[21:23] <kami8785> ah ok
[21:23] <kami8785> so rework those crop params for the resized version
[21:23] <burek> or remove -s
[21:23] <burek> and add 'scale' into -vf
[21:23] <burek> http://ffmpeg.org/ffmpeg.html#Video-Filters
[21:24] <kami8785> oh cool :)
[21:26] <kami8785> mhh that doesnt work
[21:26] <kami8785> ffmpeg  -i s.flv -an -vcodec libx264 -crf 20 -b 888k -vf crop=760:420:260:100 -vf scale=380:210 s2before.flv
[21:26] <kami8785> video comes out uncropped
[21:28] <burek> no
[21:28] <burek> one -vf
[21:28] <burek> http://ffmpeg.org/libavfilter.html
[21:28] <burek> ffmpeg  -i s.flv -an -vcodec libx264 -crf 20 -b 888k -vf 'crop=760:420:260:100,scale=380:210' s2before.flv
[21:28] <kami8785> i tried that first but it gave me Unable to find a suitable output format for 'scale=380:210'
[21:28] <kami8785> oh
[21:28] <kami8785> ok :D
[21:29] <kami8785> anyway i got the other way to work already
[21:29] <kami8785> thanks so much burek
[21:29] <burek> ok
[21:29] <burek> :beer: :)
[21:29] <kami8785> ill give you a shoutout on this project's website when it's done :)
[21:29] <burek> does it include a free beer? O.O :)
[21:29] <kami8785> seriously i wouldnt be able to do it without your help
[21:29] <kami8785> hmm im afraid my website doesnt service beer t_t
[21:30] <burek> :) we're glad we can help :)
[23:29] <burek> what is a proper way to compile ffmpeg as 32bit lib/bin using 64bit linux (debian)?
[23:41] <cbreak> doesn't debian's gcc support -m32?
[23:41] <MooingLemur> burek: well, you need 32 bit versions of the dependency libs as well.  Depending on your objectives, you might want to create a full-on 32 bit chroot on your system (see the debootstrap and setarch utils).
[23:42] <cbreak> afaik, linux doesn't support multi-arch libs like mac os
[23:42] <cbreak> so you probably need to put all your 32bit libs into a different prefix
[23:42] <cbreak> (including those required by your compiler)
[23:42] <burek> cbreak, that's what I did
[23:42] <burek> in libx264 only configure --host=.. was needed to set the output to 32bit
[23:43] <burek> but in ffmpeg there are obviously some more things I need to set, to make it 32bit
[23:43] <burek> I've set --arch=x86_32 --cc='gcc -m32'
[23:44] <burek> is that all or there is something else that is needed to be set?
[23:44] <cbreak> you forgot the linker
[23:44] <burek> is there any doc/tutorial or something?
[23:44] <cbreak> I'd put -m32 into LDFLAGS and CFLAGS
[23:44] <cbreak> but I have no idea if ffmpeg uses those
[23:44] <burek> well, I think gcc is used for linking too
[23:44] <MooingLemur> not sure, but some things look at the machine type (uname -m)
[23:45] <cbreak> burek: yes, but not cc
[23:45] <cbreak> cc stands for c compiler
[23:45] <MooingLemur> setarch (or linux32) might help there
[23:45] <burek> I've looked into config.log and it puts -m32 in both compile and link lines
[23:45] <burek> MooingLemur, yes, I'll take a look at that too :)
[00:00] --- Mon Apr 30 2012


More information about the Ffmpeg-devel-irc mailing list