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

burek burek021 at gmail.com
Thu Apr 5 02:05:02 CEST 2012

[02:37] <burzum> hi
[02:38] <burzum> when i try to convert a wav to flac and my output file has no extension im getting this:
[02:38] <burzum> [NULL @ 000000000036AE10] Unable to find a suitable output format for 'C:\xampp\htdocs\music\tmp\processing\4f7b9711-07e4-4664-a06c-1210e1a32268
[02:39] <burzum> But I'm using -acodec flac
[02:39] <burzum> How can I get this to work without using an extension?
[02:40] <burzum> meh found it now...
[02:41] <burek> burzum,
[02:41] <burek> can you please use pastebin.com, to show your command line and its output?
[02:41] <burzum> i usually do that but i thought its not require for a single line
[02:42] <burzum> i've just got it fixed, found the -f parameter
[02:42] <burzum> but thanks :)
[02:43] <burek> well yes :) -f flac :)
[02:46] <Durmush> a question: how does '/.configure' search for installed packages? using pkg-config? if the lib is installed but pkg-config doesnt detect it, is there a way to add it manually?
[02:46] <relaxed> Durmush: --extra-cflags="-I/path/to/prefix/include" --extra-ldflags="-L/path/to/prefix/lib"
[02:47] <Durmush> hmm thanks. i'll try it.
[07:11] <Durmush> any help?
[07:13] <relaxed> what are you doing?
[07:16] <Durmush> i'm trying to build ffmpeg a static build, i have configured the build with --enable static, and built, however when i run the excutable, ffmpeg is complaining about some libraries which it cannot find, such as libmp3lame-0.dll
[07:17] <Durmush> how do i add link these libraries statically to the excutable?
[07:18] <mjevans> I have no idea how to do that under windows...
[07:19] <zap0> Durmush, ffmpeg windows binaries static linked are already available
[07:20] <Durmush> could it be something i missed passing it to configure? my configuration line is this: http://pastebin.com/Svs1Q6LB
[07:20] <Durmush> zap0: I'm aware of that. i'm trying to build my own binaries.
[07:21] <mjevans> I also have a brain teaser.     I have a video container; I want to completely ignore what ffmpeg reads as the framefrate from it; I either want to be able to specify a framerate or fieldrate.  I've tried variations of -r number -i (it says framerate does not exist) and this: avplay -vf setpts='N/(30000.0/1001.0*TB)' -ss 300  which also doesn't work.  Since the source is from an NTSC DVD I expect 30FPS to be correct and provide possibly telecined content.
[07:21] <Durmush> (just for learning purpose)
[07:21] <relaxed> Durmush: maybe --disable-shared
[07:21] <mjevans> Since the source is from an NTSC DVD I expect 30FPS to be correct and provide possibly telecined content.
[07:21] <zap0> Durmush, ok.  the fact they are available static, means someone has done it/figured it out.
[07:22] <mjevans> Durmush: google for stuff like 'configure windows static binary "gnu make" OR "gmake"'
[07:22] <relaxed> Durmush: On linux I use --extra-ldflags="-static" --enable-static --disable-shared
[07:24] <mjevans> If you're doing something like this... http://www.gooli.org/blog/building-ffmpeg-for-windows-with-msys-and-mingw/  then what relaxed said will probably work.
[07:25] <Durmush> hmm, ok guys, i'll try these. thanks
[07:27] <mjevans> So if I just regular avplay -ss time input.vob the frames that ARE displayed are in sync with the audio.  However the output is MASSIVE jittery, it's like a strobe effect without the flash.
[08:09] <Durmush> mjevans, zap0, relaxed, thanks, your tips solved the problem!
[08:16] <zap0> :)
[11:28] <bauerj> what does the .xxx mean in hh:mm:ss[.xxx]?
[11:29] <Durmush> milliseconds
[11:30] <bauerj> ah, okay, so if I want to specify it precisely, I need to give the time in the hh:mm:ss.xxx format or can I also just use ssss.xxx, eg. 1206.120?
[11:30] <burek> yes
[11:31] <bauerj> yes I can use it or yes I need to recalculate it?^^
[11:31] <Tjoppen> yes
[11:32] <burek> you specify time either in seconds or in hh:mm:ss.xxx format
[11:33] <bauerj> yeah, but if I want to use milliseconds too, can I just use seconds and miliseconds or will I have to convert the seconds into minutes, if they are greater than 60?
[11:35] <burek> you can use both
[11:35] <bauerj> thank you
[11:49] <PeterKraus> hi guys, i was wondering if it's possible to record the alsa output somehow. Recording the input (front/rear mic via /dev/dsp or hw:0,0) works fine...
[11:53] <brontosaurusrex> what would be uber-fast downscaling to some predefined max-width, max-height?
[11:56] <burek> PeterKraus, if your sound card supports it, then yes
[11:56] <burek> otherwise, you'll need to use jack audio
[11:56] <zap0> brontosaurusrex, 1/2
[11:56] <burek> to create virtual input from your output
[11:57] <burek> brontosaurusrex, many latest video encoders require video size to be divisible by 4
[11:58] <burek> so it depends on the video codec used, because, if you just use 1/2, you might end up with unsupported video size
[11:58] <brontosaurusrex> burek: right, thanks, i forgot about that
[11:58] <burek> imo, if you start with original (valid) video size, if you do 1/4 I think you'll still be at the valid size
[11:59] <brontosaurusrex> so ill just go with say: -vf scale=100:100 -sws_flags neighbor , or is there something faster?
[11:59] <burek> what exactly do you want to achieve
[11:59] <zap0> brontosaurusrex, do you understand 4:4:4 4:2:2 4:2:0 ?
[11:59] <brontosaurusrex> burek: just pipe data to scene-cut finder
[12:00] <brontosaurusrex> and since that data can be hd, this might get very slow
[12:01] <brontosaurusrex> zap0: and mod limits?
[12:19] <rsv> what is the difference between rgb24 bit and bgr32 bit apart from the change in order
[12:20] <Tjoppen> bgr32 seems to imply the presence of padding bytes
[12:22] <rsv> i have written a routine which use 0x00 as padding. what i see is the red component is replaced by orange. so i dont know what could be wrong
[12:24] <Tjoppen> the sounds a bit strange.. maybe you mixed up blue and green?
[12:25] <Tjoppen> you could always try all combinations of ordering - they's only 24 of them :)
[12:25] <rsv> Tjoppen: nice point, let me do a quick check
[12:26] <Tjoppen> you can also look at the definition of PIX_FMT_BGR32. it should say quite explicitly
[12:27] <Tjoppen> lunch
[12:44] <emhs> Tried converting a .mpg video to divx, specifying -vtag DIVX, -vcodec mpeg4 and -acodec libmp3lame, but though the audio is fine, the video freezes after the first quarter-second.
[12:45] <emhs> Anyone know why this would happen?
[14:16] <ahuillet> hello
[14:16] <ahuillet> I'm looking for help using swscale - I have a YUV420 image decompressed by libavcodec and I would like to use swscale to convert it to RGB24
[14:17] <ahuillet> this seems simple enough and I've got code that *seems* to work, but it behaves strangely whenever the width of the image is not a multiple of 16
[14:18] <ahuillet> http://paste.pocoo.org/show/Ghjd33aF0iGGrLQBor7u/
[14:18] <ahuillet> this is my code
[14:18] <ahuillet> on line 22, I'll decode some H.264 video, and try to convert it to RGB24 on line 35
[14:19] <ahuillet> it works just fine if !(width % 16)
[14:19] <ahuillet> otherwise, the last pixels on the right are incorrect, I'll post a picture
[14:20] <ahuillet> http://serv.agoctrl.org/~arthur/up/before.png
[14:20] <ahuillet> http://serv.agoctrl.org/~arthur/up/after.png
[14:20] <ahuillet> before is the normal image, after is the image after compression + decompression + colorspace conversion
[14:20] <ahuillet> I've investigated and the problem really comes from the swscale() call I made
[14:21] <ahuillet> help appreciated. :)
[14:28] <qbi_> ahuillet just a hint, but maybe you should try allocating your pic so each line is 16-byte aligned
[14:29] <ahuillet> the *output* of sws_scale you mean? (line 31)
[14:29] <qbi_> yep
[14:29] <ahuillet> I knew the malloc() here was courageous
[14:29] <qbi_> instead of using the width of your pic, make it width + rest of /16
[14:29] <ahuillet> I guess I can use avpicture_alloc() and it will do the right thing?
[14:30] <qbi_> and I think ffmpeg provides its own alloc method which make sure it's aligned
[14:30] <qbi_> it will align it, yes, but I don't know if it makes each line aligned too
[14:30] <ahuillet> that's the whole point of stride != width, so I'd expect it to
[14:31] <ahuillet> but that's irrelevant: by the time I do this malloc(), the notion of "line" is not yet defined
[14:31] <ahuillet> it's just a big linear buffer
[14:32] <ahuillet> anyway, it doesn't work any better with avpicture_alloc, same issue
[14:32] <qbi_> yeah but your buffer is w*h*3 large
[14:32] <qbi_> not stride*h*3
[14:32] <qbi_> k
[14:32] <qbi_> then I don't know, sry :)
[14:32] <ahuillet> qbi_ : the output stride is exactly = width so it's fine, but I agree with you that in theory the malloc here is rather fishy
[14:33] <ahuillet> anyway, what I know so far: the decode call outputs data with a 16 byte alignment
[14:33] <ahuillet> the padding happens to be filled with black in this case
[14:33] <ahuillet> then when I run it through sws_scale, I get some of my "legit" pixels replaced by the padding
[14:50] <ahuillet> qbi_ : SWS_ACCURATE_RND
[14:50] <ahuillet> what isit?
[14:50] <ahuillet> it seems to fix my problem.
[14:51] <qbi_> I think it the scaling algorithm
[14:51] <qbi_> what was your sws creation line ?
[14:53] <ahuillet> 	ctx->yuv2rgb = sws_getContext(ctx->width, ctx->height, PIX_FMT_YUV420P, ctx->width, ctx->height, PIX_FMT_RGB24, SWS_FAST_BILINEAR, NULL, NULL, NULL);
[14:53] <ahuillet> I used that
[14:53] <ahuillet> adding SWS_ACCURATE_RND seems to fix the issue, but I'd like to understand more
[14:54] <ahuillet> I found this that doesn't explain a lot: http://mailman.videolan.org/pipermail/vlc-devel/2009-April/058800.html
[14:57] <qbi_> sorry ahuillet this is beyond my small experience with ffmpeg
[14:58] <qbi_> still, the bug you point is 3 years old
[14:58] <ahuillet> it's not really a bug by itself, but it points to the fact that SWS_ACCURATE_RND seems to do some black magic that worked in some cases
[14:58] <ahuillet> and it worked in mine
[15:01] <qbi_> ah yes it's the vlc mailing list, not ffmpeg, didn't see that
[18:34] <emhs> Anyone know why a divx avi encoded with ffmpeg would play the audio just fine all the way through but the video would freeze after less than a second?
[19:14] <Nagy> "Some decoders may support multiple frames in a single AVPacket, such decoders would then just decode the first frame." does this ever happen for avcodec_decode_video2? neither fmpeg nor ffplay seem to take this into account
[19:14] <Nagy> is that comment superflous?
[19:22] <DarthGandalf> Hello, I'm trying "ffmpeg -i in.flv -vcodec copy out.flv" to repack a file without reencoding. But it reduces fps from 50 to 25. I tried to add "-r 50" but that doesn't help... How to copy stream without any losing?
[19:23] <relaxed> that should do it
[19:24] <relaxed> make sure you're using a recent version. (lastest version or git)
[19:25] <DarthGandalf> Ok, thanks, I'll try to update...
[19:26] <relaxed> Are you sure it reduced the frame rate?
[19:27] <DarthGandalf> relaxed: http://pastebin.com/02Nt7vN0 and new file becomes 2 times smaller
[19:31] <relaxed> pastebin the command and all output
[19:38] <DarthGandalf> http://pastie.org/private/wjjrrbyw69s8qmkhdxc8g
[19:43] <DarthGandalf> Hm, updated ffmpeg from 0.7.8 to 0.10.2 (and x264 from 0.0.20110426 to 0.0.20120327 as a dependency), and copying stopped working at all... http://pastie.org/private/nq9jyomrfllv9clfevma
[19:57] <DarthGandalf> relaxed: any idea?
[20:02] <relaxed> why do you want to remux the file anyway?
[20:03] <DarthGandalf> It has length of 4 hours, but VLC shows only 1 hour. The remuxed version is shown fully.
[20:05] <relaxed> perhaps the file is broken? did you try another container, like mkv?
[20:05] <DarthGandalf> Well, remuxing somehow fixes it...
[20:06] <DarthGandalf> As for mkv, "ffmpeg -i in.flv -vcodec copy out.mkv" doesn't work, and without "-vcodec copy" it tries to reencode
[20:07] <relaxed> If you remuxed it and it's fixed, what the problem?
[20:07] <relaxed> what's*
[20:08] <DarthGandalf> It got smaller, I don't want to lose anything...
[20:08] <relaxed> then it's not fixed
[20:40] <Shimmy> Hi! Can anyone please help me with my issue: https://ffmpeg.org/trac/ffmpeg/ticket/747
[20:49] <DarthGandalf> relaxed: hm, thanks, you're right...
[21:42] <lesshaste> I would like to take a single frame snapshot from my webcam (from the command line)
[21:42] <lesshaste> how can I do that in ffmpeg?
[21:45] <ubitux> using -frames:v 1 out.png maybe ?
[21:49] <lesshaste> ubitux, mplayer   tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 plays the video
[21:49] <lesshaste> but I can't get a matching ffmpeg line to work
[21:49] <lesshaste> what should it be?
[21:51] <ubitux> ffmpeg -f v4l2 -i /dev/video0 -frames:v 1 /tmp/out.png ?
[21:51] <ubitux> but generally the first frames are "bad"
[21:51] <ubitux> you can play the video with ffplay -f v4l2 -i /dev/video0
[21:52] <ubitux> ffmpeg -f v4l2 -i /dev/video0 -frames:v 1 -vf 'select=eq(n\,50)' /tmp/out.png
[21:52] <ubitux> this waits for 50 frames
[21:52] <ubitux> extract one, and outputs it to /tmp/out.png
[21:54] <ubitux> you can request the size with "-s 1600x1200" (for example) before the -i
[21:54] <ubitux> ’ ffmpeg -f v4l2 -s 1600x1200 -i /dev/video0 -frames:v 1 -vf 'select=eq(n\,50)' /tmp/out.png
[21:56] <ubitux> lesshaste: is that what you needed?
[21:56] <juanmabc> mmm, why so the first and last frames are bad?
[21:57] <ubitux> last?
[21:57] <juanmabc> i made an avi
[21:59] <juanmabc> nvm, weird, i inclined a little the screen an it worked again, damn, some hardware stuff could be going on
[22:00] <juanmabc> no bad frames
[22:01] <juanmabc> used with ffplay is nice
[23:33] <burek> emhs, try -vcodec libxvid
[23:37] <emhs> Good idea.
[23:37] <emhs> Think an Aluratech photo frame will play fair with it? The aluratech people say DivX is what it wants.
[23:38] <burek> DarthGandalf, your video stream is damaged
[23:38] <emhs> burek: Didn't fix it.
[23:38] <burek> [flv @ 0x6226e0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 16777101 >= 5,    av_interleaved_write_frame(): Invalid data found when processing input
[23:38] <burek> emhs, remove -vtag
[23:39] <emhs> Tried that earlier while it was still -vcodec mpeg4.
[23:40] <burek> well -vtag just fakes the fourcc
[23:40] <burek> in the output file
[23:40] <burek> if your video codec is not divx then vtag is just making more problems
[23:40] <burek> -vcodec will set the proper fourcc
[23:40] <burek> so you shouldn't be using -vtag ever
[23:40] <burek> only in some testing situations
[23:41] <burek> what exactly are you trying to do?
[23:42] <emhs> Actually, haven't used vtag in the past three commands. Anyway, a friend needs this converted from .mpg to divx/avi for a photo frame.
[23:43] <burek> ubitux, can -ss be used instead of -vf? ( juanmabc's case )
[23:43] <ubitux> not sure
[23:43] <ubitux> seek will likely request a seek to the device, doesn't mean anything
[23:43] <burek> emhs, then just do: ffmpeg -i input.mpg -vcodec copy -acodec copy out.avi
[23:44] <ubitux> video filter means the frames are sent to libavfilter
[23:44] <ubitux> and select will eat the frames until the 50th
[23:44] <emhs> Will that be divx enough for the frame?
[23:44] <burek> ubitux, I thought more like -f v4l2 -i ... -ss X
[23:44] <ubitux> burek: but you can use PTS variable in ffmpeg if you prefer the timers
[23:44] <ubitux> just try :)
[23:44] <burek> true :)
[23:44] <burek> :beer:
[23:45] <ubitux> :love:"
[23:45] <burek> emhs, you are mixing formats and codecs
[23:45] <emhs> Ahh
[23:45] <burek> do you need divx encoded video inside avi format?
[23:45] <burek> or what?
[23:45] <emhs> That's what they say.
[23:46] <burek> ok, then try: ffmpeg -i input.mpg -vcodec libxvid -acodec copy -f avi out.avi
[23:46] <emhs> And the dropped frame problem happened again.
[23:46] <burek> can you please use pastebin.com, to show your command line and its output?
[23:46] <emhs> And they specified mp3 audio
[23:47] <emhs> http://pastie.org/3729561
[23:49] <burek> the command is right
[23:49] <burek> you just might want to
[23:49] <burek> set some encoding parameters
[23:49] <burek> to configure your output quality
[23:49] <burek> I'm not sure what are exact parameters for libxvid
[23:50] <burek> but for libmp3lame (and audio codecs generally in ffmpeg), you might use: -ar 44100 -ac 2 -ab 128k
[23:50] <burek> audio rate, channels, bitrate
[23:51] <burek> for libxvid, well, you can use goole :) http://forum.doom9.org/showthread.php?t=133645
[23:52] <burek> it seems -b option is the key :)
[00:00] --- Thu Apr  5 2012

More information about the Ffmpeg-devel-irc mailing list