[Ffmpeg-devel-irc] ffmpeg.log.20130113
burek
burek021 at gmail.com
Mon Jan 14 02:05:01 CET 2013
[05:14] <Tronic> I haven't been able to keep track of the recent changes to PTS calculation in ffmpeg and libda. What is the best way to do that now when decoding with libavformat/codec of the FFMPEG project?
[05:14] <Tronic> I want actual codec-aware timestamps.
[05:15] <Tronic> Apparently the libda project is doing something different and there is hardly any documentation on this.
[05:15] <Tronic> *libav
[06:05] <Demon_Fox> Has anyone else noticed that sound from libvorbis sounds good until you get below 51.5 Kb/s?
[06:05] <Demon_Fox> as in per channel
[10:33] <jacobs1> hi, anyone here that can help with ffserver ?
[10:51] <Demon_Fox> jacobs1, I might.
[10:54] <jacobs1> I am trying to stream a video file via rtsp with mpeg4 video codec but I have frame rate issues.
[10:54] <jacobs1> I am getting this error from ffmpeg:
[10:54] <jacobs1> timebase 125000/2997003 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535.
[10:54] <jacobs1> I tried adding -r 65535/2733 before the input in the ffmpeg command and it worked but I get a high frame rate and I want only 10 fps. if I set -r 8 in ffmpeg it causes AV to not be synced and the video to play in slow motion.
[10:54] <jacobs1> What is the proper way to configure ffserver and ffmpeg to work with mpeg4 and stream a video file in 8 fps ?
[10:55] <Demon_Fox> Which mpeg4?
[10:55] <jacobs1> here are the detailes : http://ffmpeg-users.933282.n4.nabble.com/ffserver-ffmpeg-feed-mpeg4-video-file-rtsp-config-frame-rate-problem-td4656326.html
[10:56] <Demon_Fox> As in mpeg4 part 2 or 10
[10:56] <jacobs1> I dont know I just configured ffserver with 'VideoCodec mpeg4'
[10:57] <jacobs1> how can I check ?
[10:57] <Demon_Fox> What container?
[10:57] <jacobs1> rtp
[10:58] <Demon_Fox> Let me see if I can give this a try
[10:59] <Demon_Fox> I need the command you used
[10:59] <Demon_Fox> or equivalent
[11:00] <jacobs1> I postged here the ffserver config and the ffmpeg command: http://ffmpeg-users.933282.n4.nabble.com/ffserver-ffmpeg-feed-mpeg4-video-file-rtsp-config-frame-rate-problem-td4656326.html
[11:01] <Demon_Fox> Don't add it before the input
[11:01] <Demon_Fox> add it after
[11:02] <Demon_Fox> jacobs1, http://pastebin.com/Bs3CSYTU
[11:02] <Demon_Fox> That is where the command is supposed to be and it is not there.
[11:04] <jacobs1> sorry try this: http://pastebin.com/S4XhDLKX
[11:05] <Demon_Fox> Could you input a video for the log?
[11:06] <Demon_Fox> Try something like:
[11:06] <Demon_Fox> ffmpeg23 -i input website -r 8
[11:07] <Demon_Fox> though I can give that a try
[11:07] <jacobs1> I will give it a try, the video file is very large but I can run ffprobe on it if it helps
[11:08] <Demon_Fox> or shorten the file
[11:08] <Demon_Fox> like
[11:08] <Demon_Fox> dd if=filename of=output bs=1024 count=1024
[11:09] <Demon_Fox> That will give you a 1MB file
[11:13] <Demon_Fox> any questions?
[11:13] <jacobs1> this is the file: https://www.dropbox.com/s/qx2tp291d5d8fuj/video.avi
[11:15] <jacobs1> I tried ffmpeg23 -i input website -r 8 and same timebase error
[11:16] <Demon_Fox> Hold on I am going to give this a try
[11:16] <Demon_Fox> Also you might want to see if it works without the server
[11:19] <luc4> Hi! Is it possible to extract frames of the stream from a container placing it in a buffer I specify?
[11:21] <buhman> while using -target ntsc-dvd; I get crazy obnoxious amounts of error messages like: http://sprunge.us/RGda
[11:21] <Keyboard_Warrior> buhman, thats better
[11:22] <Demon_Fox> I give up
[11:23] <jacobs1> doesnt work for you ?
[11:49] <Demon_Fox> jacobs1, Looks like some error on the side of the programmers, and I don't want to get involved
[11:49] <Demon_Fox> I mean
[11:49] <Demon_Fox> I don't know how to fix it
[11:52] <luc4> Hi! Do I have to allocate the buffer in a AVPacket myself or is it allocated automatically?
[12:17] <jacobs1> Demon_Fox, OK thanks. I also tried another video file that works but no matter what I tried I wasnt able to change the frame rate from the files original 25 fps. when I try either video files from ffmpeg without ffserver I am able to set frame rate, maybe its somthing to do with my ffserver config ?
[12:32] <Demon_Fox> jacobs1, Some containers only support certain frame rates you know
[12:32] <luc4> Anyone who knows if there is a way to provide ffmpeg a buffer to fill with compressed frames?
[12:32] <Demon_Fox> Not sure what you mean
[12:32] <Demon_Fox> as in some sort of piping deal?
[12:33] <luc4> Demon_Fox: sorry, are you referring to me?
[12:33] <jacobs1> Deamon_fox, rtp doesnt support frame rates lower than 25 fps ?
[12:33] <Demon_Fox> luc4, Are you trying to pipe something?
[12:33] <Demon_Fox> jacobs1, I will check
[12:34] <Demon_Fox> jacobs1, the container
[12:34] <Demon_Fox> which I assume is mpg
[12:35] <luc4> Demon_Fox: yes, I would like to get compressed frames from the stream in the container and decode using hw. But I see that AVPacket is filled with a buffer in the data member. Can I provide a buffer myself and have that buffer filled by ffmpeg?
[12:35] <luc4> Demon_Fox: the buffer itself is one used by my hw decoder.
[12:36] <Demon_Fox> If you would like you could encode with ffmpeg and send it to some program to hold so many frames then send them off every time it gets full
[12:37] <luc4> Demon_Fox: sorry, encode? I want to decode.
[12:38] <Demon_Fox> Not sure what you mean, but someone else might
[12:40] <Demon_Fox> jacobs1, try 15 or 18 instead of 8
[12:40] <luc4> Demon_Fox: there is something that I might have misunderstood, when I call the av_read_frame function, passing an AVPacket. This AVPacket I see has the data member set to NULL. So, I guess that function allocates a buffer and returns me the address of that buffer in the data member. Is this correct?
[13:22] <jacobs1> cd ..
[13:48] <jmbclegend> it's no good i still have ffmpeg-0.10.6
[15:38] <luc4> Hi! Given a AVPacket containing h264 from a mov file, can I somehow apply a filter to convert to annexb?
[15:39] <saste> luc4, check bitstream-filters in libavcodec
[15:39] <beastd> hi
[15:41] <luc4> saste: thanks. Can you suggest a page or a sample code so that I can read how it works?
[15:42] <saste> luc4, read ffmpeg-bitstream-filters, then you need to read the implementation in libavcodec and how it is used in ffmpeg.c
[15:43] <luc4> saste: thanks
[16:30] <luc4> Does av_read_frame reads an entire NAL packet in AVC?
[17:42] <matthavener> whats a generally well supported audio codec thats typically paired with h264? mp3? aac?
[17:45] <Mavrik> aac
[17:46] <Mavrik> H.264/AAC in mp4 is such a standard widely supported combo
[17:54] <matthavener> thanks Mavrik
[20:30] <bdrung> hi, i like to port audacity to support newer ffmpeg version. URLContext is gone. what's the replacement for it? is there documentation explaining how to migrate code from deprecated functions to the new ones?
[20:42] <viric> Hello ffmpeg!
[20:42] <viric> I came for wisdom
[20:43] <viric> I've to get some video from a PAL capture card
[20:43] <viric> I want to encode it in something reasonable, for high quality, I don't mind much the size, but that could be encoded realtime
[20:43] <viric> any suggestion?
[20:43] <viric> - for the codec and parameters
[20:47] <JEEB> viric, ffvhuff or utvideo
[20:48] <JEEB> both are lossless and rather quick because they are based on huffman coding
[20:48] <viric> ok
[20:51] <viric> maybe I can't afford so much data though
[20:51] <viric> :)
[20:52] <JEEB> the rest depends on how much CPU power you can throw at it
[20:53] <JEEB> libx264 can handle lossless too, threads well and has a wide variety of presets on the speed vs compression line
[20:54] <JEEB> -preset ultrafast -crf 0 / -qp 0 should make it encode lossless 4:2:0, and if you set the output csp you can make it encode 4:2:2 or whatever you get from the capture card
[20:54] <JEEB> and then by making the preset higher you can try and compress it more if the speed is fast enough
[20:54] <JEEB> http://mewiki.project357.com/wiki/X264_Settings#preset
[20:54] <JEEB> ^ list of internal libx264 presets
[20:55] <viric> hm I can't handle that ultrafast. that gives 16mbps
[20:55] <viric> utvideo gives ~30mbps
[20:56] <JEEB> make sure you had crf 0 or qp 0 set too
[20:56] <viric> sure I hda
[20:56] <viric> had
[20:56] <JEEB> k
[20:56] <JEEB> and libx264 tells you it has set itself to high 4:4:4 predictive profile
[20:56] <JEEB> in the log
[20:56] <viric> exactly
[20:56] <viric> [libx264 @ 0x1ad4520] profile High 4:4:4 Predictive, level 3.0, 4:2:0 8-bit
[20:56] <klaxa> i though-- yeah i thought x264 only supported lossless with high444p
[20:56] <JEEB> yup
[20:56] <JEEB> then all's good
[20:57] <JEEB> you can set the output csp to your input csp if it's not 4:2:0
[20:57] <JEEB> and that should give a more even comparison ground
[20:57] <viric> and audio, flac?
[20:57] <JEEB> I'd just dump raw pcm
[20:57] <JEEB> because it won't cost much
[20:59] <viric> ok I'll try
[21:00] <JEEB> and as I said, make sure it's actually encoding the same csp as the input is if possible :) You might gain something from it when processing it down the line
[21:01] <JEEB> because I think libx264 defaults to 4:2:0 for compatibility reasons
[21:02] <viric> ok I got another computer, that can do 5x mine
[21:02] <viric> :)
[21:02] <viric> (tested the ultrafast)
[21:03] <viric> what is csp?
[21:03] <JEEB> colorspace
[21:03] <viric> it's YUYV
[21:03] <viric> 422
[21:03] <JEEB> ok
[21:03] <JEEB> now see what libx264 is encoding
[21:03] <JEEB> probably 4:2:0
[21:03] <viric> with ultrafast?
[21:04] <JEEB> well, it should default to 4:2:0 in all cases :P
[21:04] <JEEB> just making sure
[21:04] <viric> I fail to understand any report about what does it encode
[21:04] <JEEB> just pastebin the terminal log the :D
[21:04] <JEEB> and link it there
[21:04] <JEEB> *here
[21:04] <viric> thank you
[21:05] <viric> damn driver. Sometimes it doesn't want to allocate buffers
[21:06] <viric> [video4linux2,v4l2 @ 0x1e01400] ioctl(VIDIOC_QBUF): Cannot allocate memory
[21:06] <viric> /dev/video1: Cannot allocate memory
[21:06] <viric> [226870.437339] unable to allocate 185088 bytes for transfer buffer 0
[21:07] <JEEB> anyways, if the input is 422
[21:08] <JEEB> -pix_fmt yuv422p
[21:08] <JEEB> should do it
[21:08] <JEEB> and then libx264 should encode 4:2:2
[21:09] <viric> http://sprunge.us/FULU
[21:09] <JEEB> uh-oh
[21:09] <viric> ?
[21:09] <JEEB> you're not setting an audio codec, right?
[21:09] <viric> is this lossless?
[21:10] <viric> I'm setting, yes
[21:10] <viric> sorry, just testing
[21:10] <JEEB> so you want it to use libvorbis?
[21:10] <JEEB> then yes, it's correct
[21:10] <viric> ok
[21:10] <JEEB> and yes, I can see by [libx264 @ 0x8b2d2e0] profile High 4:4:4 Predictive, level 3.0, 4:2:2 8-bit
[21:10] <JEEB> that you should be encoding lossless 4:2:2 :)
[21:10] <viric> perfect!
[21:10] <JEEB> and by the output part of Stream #0:0: Video: h264, yuv422p, 720x576, q=-1--1, 1k tbn, 25 tbc
[21:10] <JEEB> so yup
[21:10] <viric> aha
[21:10] <JEEB> this should do
[21:11] <viric> Then I've to learn to encode this to some reasonable-quality xvid
[21:11] <viric> (for a specific player)
[21:11] <viric> but first let's capture.
[21:12] <viric> hmmm 15mbps, 120min, how much is it in matroska?
[21:12] <JEEB> uhh
[21:12] <JEEB> matroska itself should have a very small overhead
[21:12] <viric> ok
[21:12] <JEEB> so just calculate by the bit rate and length
[21:12] <viric> 15/8*60*120?
[21:13] <viric> in MB
[21:14] <JEEB> more or less, I guess
[21:14] <viric> ok
[21:14] <viric> can I tell ffmpeg to downmix to one audio channel?
[21:14] <JEEB> -ac 1
[21:15] <viric> The track is mono, but I've only one cable (one channel) to capture, and the card can only capture stereo.
[21:15] <viric> One channel will be muted, the only not.
[21:15] <viric> the other
[21:15] <JEEB> there was a way to control channels better
[21:15] <viric> ah
[21:15] <JEEB> but you'll have to check the documentation for that on ffmpeg.org :)
[21:16] <viric> I'll go for -ac1
[21:24] <viric> JEEB: utvideo takes less kbps
[21:24] <viric> than x264 lossless
[21:24] <viric> well, somehow the 'bitrate' increases and increases...
[21:24] <JEEB> make sure both use the same csp
[21:24] <viric> Stream #0:0: Video: utvideo (ULY2 / 0x32594C55), yuv422p, 720x576, q=2-31, 200 kb/s, 1k tbn, 25 tbc
[21:24] <JEEB> and yes, naturally it will increase and decrease depending on the content
[21:25] <viric> then it's ~50Mbps now.
[21:25] <JEEB> x264 is generally better, so you might want to set a slower preset :P
[21:25] <viric> that's 43GB
[21:25] <JEEB> and yes, you should only see how big it gets after it has encoded some already
[21:59] <viric> will ffmpeg try to keep av syncronous, even if the 'drop' counter increases?
[21:59] <viric> (it's capturing realtime from video + audio, two cards apart)
[22:00] <JEEB> it will try, and matroska has timestamps in the container so in theory you should be able to
[22:00] <JEEB> but
[22:00] <JEEB> I'd just use something that could actually handle it all in real time :P
[22:00] <viric> well, it's 42% of cpu
[22:00] <viric> I don't know why ffmpeg drops
[22:02] <viric> nice -20
[22:21] <viric> what does 'drop' mean, currently?
[22:21] <viric> That it could not make one fit into the stream for whatever reason, and duplicated one frame?
[22:21] <viric> one = one frame
[22:23] <JEEB> no duplication, duplication is separate
[22:24] <JEEB> drop is just that a frame was dropped because it couldn't be encoded quickly enough
[22:25] <viric> umh weird
[22:25] <Mavrik> or you ordered less frames per second than input has
[22:25] <viric> how would that happen, at 40% of cpu usage?
[22:26] <viric> umh maybe come from the capture device more frames than 25fps? no idea
[22:36] <Mavrik> viric, just how many dropped frames are you seeing?
[22:37] <Mavrik> a few?
[22:37] <Mavrik> 10 every second?
[22:37] <Mavrik> having alot of dropped frames is also a warning sign when trying to do something dumb, like encoding interlaced video to progressive without deinterlacing
[22:45] <viric> 120 in one hour
[22:45] <viric> I use "-filter:v yadif" before "-vcodec"
[22:45] <viric> I hope that deinterlaces
[22:46] <Mavrik> yes, it does
[22:46] <Mavrik> 120 dropped frames in 1 hour isn't alot really
[22:46] <viric> no? ok
[22:46] <Mavrik> it shouldn't happen...
[22:46] <viric> ah
[22:46] <Mavrik> but it's not catastrophic
[22:46] <Mavrik> :)
[22:47] <viric> and what may be causing it?
[22:47] <Mavrik> probably your cam creates a broken video
[22:47] <viric> I don't know how dumb the v4l2 device is
[22:47] <JEEB> try removing the yadif?
[22:47] <JEEB> and deinterlacing after the fact
[22:47] <Mavrik> or the v4l2 driver feeds in too many frames
[22:47] <viric> JEEB: yes, going lossless, sounds right
[22:47] <Mavrik> JEEB, btw, ffmpeg doesn't drop frames when it can't keep up, it just slows down :\
[22:48] <JEEB> that's not what I see in general >_>
[22:48] <JEEB> in general it just drops them
[22:48] <JEEB> at least that's what I've seen so far
[22:48] <Mavrik> if it does they're dropped by the input source
[22:48] <Mavrik> and not added to the drop count of the encoder
[22:48] <Mavrik> unless the code changed after 1.1 :\
[22:49] <viric> there is 1.1?
[22:49] <JEEB> I've seen ffmpeg drop frames it can't keep up with for quite a while
[22:49] <viric> oh I'm on 1.0
[22:49] <JEEB> at least looking at the #ffmpeg experiences I've had so far
[23:02] <viric> btw
[23:02] <viric> mh nothing
[23:53] <viric> don't 120min VHS tapes last 120min? grmbl
[00:00] --- Mon Jan 14 2013
More information about the Ffmpeg-devel-irc
mailing list