[Ffmpeg-devel-irc] ffmpeg.log.20130226
burek
burek021 at gmail.com
Wed Feb 27 02:05:01 CET 2013
[01:01] <Mista_D> Can I overlay watermark_1 in the beginning of the video for 10 seconds, and watermark_2 at the end 10 seconds before end?
[04:13] <PaulWay> Hi there!
[04:13] <PaulWay> I'm trying to add metadata an MP4 file using ffmpeg, but the file I created didn't seem to get the metadata.
[04:15] <PaulWay> The command I'm using is http://pastebin.com/KUL8yjni
[07:14] <anonus> hello
[07:16] <anonus> i have a live audio stream with a lot of awful noise in background, but silentdetet filter quite well detects silence intervals, but can i somehow make it to put blank audio instead of original noise when silence is detected?
[07:20] <anonus> simply saying i need to reduce to 0 signal below some level
[07:20] <anonus> is ffmpeg capable to do so?
[07:32] <klaxa> anonus: i'm not sure whether or not ffmpeg supports it, but i know that sox can apply a noisegate filter
[07:33] <klaxa> if you google for "sox noisegate" you should find some information on that
[09:13] <Yulth> Hi everyone!
[09:14] <Yulth> Could anybody give me please an example about how to encode to OPUS format?
[09:30] <jeje2> Hi to all
[09:31] <jeje2> I'm back with my problem of high CPU usage when I decompress several different H264 streams from IP camera
[09:33] <jeje2> it seems using swscale take me a lot of CPU usage too
[09:34] <jeje2> if I just decompress and not use swscale to transfrom from YUV420 to RGB32 and resize it seems to be better
[09:36] <jeje2> Is there some condition to use several sw_Getcontext, sws_swscale and sws_freeContext in several threads?
[10:09] <jeje2> I make a pastebin code http://pastebin.com/PGP4K6k0
[10:09] <jeje2> if someone can explain me
[10:11] <jeje2> what's the matter: decompressing 1 stream 0%. Decompmressing 2 stream: 0-2%. Decompressing 3 stream is sometime 3% sometimes 10% depending when I open the decoder it seems. Decompressing 4 streams is 20-25% (a very grow up once)
[11:02] <jeje2> If I play one more (5 decopressing at the same time) my CPU usage grow up to 40-50%
[11:05] <durandal_1707> how many threads?
[11:05] <durandal_1707> how many cpus?
[11:06] <jeje2> I don't specify any thread_count in the FFMPEG codeccontext initialization (so it set to 0)
[11:06] <durandal_1707> did you explored where it wastes most of time in such scenario?
[11:06] <durandal_1707> jeje2: invalid, it is set to something, use -v debug to see it
[11:07] <jeje2> I have a AMD Athlon X2 Dual Core (yes I know not very new)
[11:07] <durandal_1707> and how much cores does it have?
[11:08] <durandal_1707> also what OS?
[11:08] <jeje2> When I add trace in my application after the avcodec_alloc_context3, the thread_count is set to 0
[11:09] <jeje2> In running on Windows XP 32 bits
[11:10] <durandal_1707> what happens if you set -threads 1
[11:15] <jeje2> After the avcodec_open, my CodecContext threadcount is set to 8
[11:16] <jeje2> I 'll try with set thread to 1
[11:16] <durandal_1707> jeje2: experiment with -threads X where x is number between 1 and 8
[11:19] <jeje2> Please confirm me, to set the thread count of the codeccontext, I have to fix the number after avcodec_alloc_context3 and before avcodec_open2 (m_lpCodecCtx->thread_count = 1;)
[11:20] <jeje2> because even if I set 1 to the thread count, I always have thread_count = 8 in the coedccontext after the avcodec_open2
[11:21] <durandal_1707> jeje2: please read documentation
[11:22] <Dominic77> Hi
[11:22] <Dominic77> I have a problem with ffmpeg converter
[11:23] <durandal_1707> Dominic77: what problem?
[11:23] <Dominic77> when I use lighttpd to streaming mp4 file
[11:23] <Dominic77> with start, end arguments
[11:24] <Dominic77> time duration has a little bit difference
[11:25] <Dominic77> eg
[11:25] <Dominic77> mysite.com/abc.mp4?start=0&end=10
[11:25] <Dominic77> but the player just played 7s
[11:25] <ubitux> maybe because the accuracy of the lighty module isn't perfect (cutting at key frames)
[11:26] <ubitux> and afaik it's not using ffmpeg as backend, it's a home made remuxing
[11:27] <Dominic77> I tried another mp4 file
[11:28] <Dominic77> with the same lighttpd
[11:28] <Dominic77> it's perfect
[11:28] <Dominic77> but with my mp4 file
[11:28] <Dominic77> converted from ffmpeg
[11:28] <jeje2> durandal_1707: sorry but I don't find how to set the thread_count in the documentation
[11:29] <Dominic77> problem appear
[11:29] <Dominic77> how can I fix it?
[11:30] <ubitux> fix it in the module
[11:30] <Dominic77> lighttpd module ?
[11:30] <ubitux> yes
[11:31] <ubitux> is this code shop ?
[11:31] <ubitux> or they wrote a builtin module?
[11:31] <Dominic77> it's h264 module
[11:31] <Dominic77> code shop
[11:31] <Dominic77> http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Lighttpd-Version2
[11:32] <ubitux> (btw, you can also put a real flash player in front, being able to perform range requests)
[11:32] <Dominic77> I tried with JW player too
[11:32] <Dominic77> http://www.longtailvideo.com/jw-player/wizard/
[11:34] <Dominic77> You can try with this mp4
[11:34] <Dominic77> http://f26.stream.nixcdn.com/cb9276720daf3b1e394a4fabb493d6eb/512c8032/PreNCT5/IGotABoy-SNSD_gn3.mp4?start=0&end=10
[12:25] <jeje2> to set the thread count, I set m_lpCodecCtx->thread_type =FF_THREAD_FRAME; and m_lpCodecCtx->thread_count = 2; but I have an error in FFMPEG: The maximum value for lowres supported by the decoder is 0
[12:26] <jeje2> I don't understand the reason
[12:27] <jeje2> does I also need to set the lowres?
[12:30] <jeje2> or do I neeed to use avcodec_thread_init
[12:30] <jeje2> before using avcodec_open2
[12:30] <jeje2> ?
[12:31] <jeje2> but it seems avcodec_thread_init is deprecated and also ported directly in the avcodec_open2
[12:32] <durandal_1707> avcodec_thread_init is not available
[12:36] <jeje2> so why UI have this error: The maximum value for lowres supported by the decoder is 0
[12:48] <durandal_1707> jeje2: you are doing something obviously wrong
[12:49] <Grublet> durandal_1707 the question is what is he doing wrong
[12:49] <durandal_1707> i cant know without looking at his code
[12:50] <Grublet> the eternal struggle
[14:05] <jeje2> I sent a link to my code http://pastebin.com/PGP4K6k0
[14:08] <jeje2> I use dynamic link to the library but I hope it is'nt a problem
[14:14] <jeje2> if someone can have a lokk at my code. Thks
[14:17] <jeje2> I have this error evrytime I set the Codeccontext thread_type
[14:29] <jeje2> if i don't set, the thread count is always set to 8 after avcodec_open2
[14:34] <durandal_1707> jeje2: where you allocate data for rgba?
[14:38] <jeje2> My DIBdata is already allocate that's why I just use the avpicture_fill. In fact it's an DirectDrawSurfaceX (it's a windows application using DirectDraw)
[14:40] <jeje2> But even if I don't call the part to use sw_scale (if (iframeFinished) I have the same error
[14:45] <jeje2> The error come just calling avcodec_open2. The function return error -22
[14:46] <jeje2> To be sure, the only things I have to do to use the thread_count of the AVCodecContext, it's to initialize m_lpCodecCtx->thread_type = FF_THREAD_FRAME; and also m_lpCodecCtx->thread_count = 1; I'm right?
[14:49] <jeje2> perhaps my configuration for compiling is bad! I use:./configure --prefix=/mingw/i686-pc-mingw32-last-win32threads --enable-shared --disable-static --enable-runtime-cpudetect --cpu=i686 --arch=x86 --disable-doc --disable-network --disable-devices --disable-avfilter --disable-filters --target-os=mingw32 --disable-encoders --disable-muxers --enable-w32threads --enable-debug (I just add the enable debug to see more)
[15:04] <jeje2> I can't understand why setting the thread_count is modifying the lowres value
[15:12] <durandal_1707> memory corruption
[15:13] <ddhahn> durandal_1707: wanted to ask if you had any chance to look at my issue from yesterday? I was going to post to the mailing list, but wanted to check too..not sure if I should file a bug report.. not sure if I have enough info.
[15:13] <jeje2> Yes I think so. Do I need to set the --enable-memalign-hack for the compilation?
[15:13] <JEEB> that should be automatically enabled if the architecture needs it
[15:14] <JEEB> so you shouldn't have to enable it manually :P
[15:14] <jeje2> ok so my configuration to compile FFMPEG seems to be good (I disable a lot of think because I only need to have the H264 decoding part)
[15:15] <JEEB> also lowres shouldn't even be supported with H.264
[15:15] <JEEB> so something's going quite wrong somewhere
[15:16] <durandal_1707> ddhahn: i cant remmember
[15:16] <jeje2> yes I'm trying to see where. I'm compiling ffmpeg with some av_log more to see the values of lowres during the avcodec_open2 function
[15:20] <ddhahn> durandal_1707: had to do with transcoding from a wmalossless codec and a/v sync issues. Lost of DTS\PTS invalid, clipping in logs and "queue is backwards in time" coming from destination audio codecs. (libmp3lame and AAC). I'll post to the mailing list
[16:03] <jeje2> after adding some traces in util.c in avcodec, I pass in the avcodec_open2 a AVCodecContext* with a value of 0 for lowres, inside the function the value has avctx->lowres=1. I try to find exactly where is the affectation
[16:04] <jeje2> because this is why I have the error The maximum value for lowres supported by the decoder is 0
[16:10] <intracube> hi, can anyone provide usage examples of the -fps video filter?
[16:11] <intracube> I tried; ffmpeg -i input.mpg -vf yadif=1,fps=5 -c:v libx264 -c:a libmp3lame -crf 18 output.mp4
[16:11] <intracube> to convert interlaced source to progressive @ 5fps
[16:11] <intracube> but I get the error "Missing key or no key/value separator found after key '5'"
[16:53] <jeje> After adding traces in the avcodec_open2 function, the lowres value is different in the avctx args of ther function than the codeccontext* value I pass to the function
[16:53] <jeje> perhaps an alignment prob
[16:55] <jeje> how FFMPEG is align?
[17:01] <jeje> JEEB>Do you have any idea?
[17:01] <JEEB> no, other than it works for most people seemingly
[17:08] <relaxed> Was splitting the ffmpeg man page into 10 man pages supposed to simplify things?
[17:09] <JEEB> that was probably the idea, they also split filters etc. off into separate pages on the site's docs
[17:12] <relaxed> I know this is going to sound like crazy talk, but why not list those 9 man pages at the _top_ of the ffmpeg man page.
[17:24] <relaxed> intracube: try quoting it
[17:25] <saste> relaxed, why?
[17:26] <saste> because that is just silly, that's not how MAN works
[17:26] <saste> there is the SEE ALSO section for that
[17:26] <intracube> relaxed: ffmpeg -i input.mpg -vf "yadif=1,fps=5" -c:v libx264 -c:a libmp3lame -crf 18 test.mp4
[17:26] <intracube> ^still doesn't work
[17:35] <relaxed> intracube: That filter chain works here using latest git.
[17:39] <intracube> relaxed: oh ok. I'm using 1.0.4 atm
[17:46] <relaxed> saste: I've been reading man pages for 13 years- I'm well aware how they work. The top is the first thing users view, explain how that is silly. Except that it deviates from the norm.
[17:47] <relaxed> Therefore I propose we move to info pages. They're the new man pages.
[18:01] <creep> nah i grabbed a few motherboards and printer boards and stuff and unsoldered some connectors, ics
[18:06] <jeje> when I call avcodec_open2, do I need to set an AVDictionary or can I pass a NULL struture to the function
[18:06] <Mavrik> you can pass NULL
[18:08] <jeje> I have an "windows" question because I use Visual Studio VC++ to use FFMPEG libraries. Is there any specification about the structure alignment (1 byte, 8bytes?)
[18:34] <Mista_D> Is it possible to overlay watermark_1 in the beginning of the video for 10 seconds, and watermark_2 at the end 10 seconds before end using overlay filter?
[18:43] <tclarke> is there a way (with ffmpeg.exe) to save raw I, P, and B h.264 frames prior to reconstructing them into complete frames?
[18:44] <JEEB> you should be able to get a raw Annex B H.264 stream out of ffmpeg
[18:44] <JEEB> ffmpeg -i welp.file -c:v copy -f h264 out.264
[18:44] <tclarke> ok, I'll try that..thanks
[18:46] <jeje> it seems i need to have structure alignment to 8 using FFMPEG
[18:47] <Mavrik> jeje, usually the av_malloc functions do that for you
[18:47] <Mavrik> that's why they're always used :)
[18:47] <jeje> I'm not sure
[18:48] <jeje> If I use pragam pack (push,8) in my code, I doesn't have the error anymore
[18:50] <JEEB> I don't think I've seen anyone really needed anything specific like that from MSVC
[18:50] <jeje> so in fact if I use an alignment to 8 bytes before declaration of my AV* structure, it seems it work well
[18:50] <JEEB> that said I have no effing idea what on earth you're doing
[18:51] <jeje> only this one:
[18:51] <jeje> #pragma pack( push, beforeffmpeg, 8)
[18:51] <jeje> AVCodecContext* m_lpCodecCtx;
[18:51] <jeje> AVCodec* m_lpCodec;
[18:51] <jeje> AVFrame* m_lpFrame;
[18:51] <jeje> AVPacket m_lpPacket;
[18:51] <jeje> AVPicture m_lpPict;
[18:51] <jeje> SwsContext* m_img_convert_ctx;
[18:51] <jeje> #pragma pack(pop, beforeffmpeg)
[18:51] <jeje> in my class.h
[18:51] <JEEB> uhh, let's just say that I haven't seen anything like that with other code that is using the libav* libraries in ffmpeg
[18:52] <JEEB> not even MSVC-based projects
[18:52] <JEEB> either you are doing something very special
[18:52] <JEEB> or you are doing something very wrong in general
[18:52] <jeje> yes but perhaps other person used an 8 byte alignment per default, for me, I use 1 byte per default
[18:53] <JEEB> I haven't seen any pragmas or compilation options setting that with MSVC-based projects that use ffmpeg
[18:53] <JEEB> that's all
[18:53] <jeje> if I use ffmpeg to decode a whole frame , I need to use thread_type = FF_THREAD_FRAME; can someone confirm me?
[18:54] <JEEB> no, that just decides the threading mechanism used
[18:54] <JEEB> some codecs use slice based threading, some use frame based threading
[18:54] <jeje> and the difference between SLICE and FRAME please?
[18:54] <JEEB> (and some have both slice and frame based threading, like H.264)
[18:55] <jeje> ok so to make the init of my codeccontext I have to set the 2 ones SLICE|FRAME
[18:56] <JEEB> you usually want one of those tho, not sure what happens with h264.c f.ex. if you set both :P
[18:56] <JEEB> a slice is a slice, the exact definition depends on the format, but in general it means that the frame is cut vertically into X independently decode'able parts
[18:56] <JEEB> that means that you can decode them independently in their own threads
[18:56] <JEEB> frame based threading on the other hand means that you use multiple threads to decode multiple frames at the same time
[18:57] <jeje> this is my case... thks for all explanations
[20:47] <WmA> I have a corrupt ts file (avc/mp2)
[20:48] <WmA> is it possible to correct PCR with ffmpeg?
[20:48] <WmA> or reindex so that the timers are set correctly?
[20:58] <Trashlord> hey guys, I'm trying to extract sound from a video file. I'm using -vcodec none, but it throws an error saying "no such codec"
[20:59] <Fjorgynn> yeah?
[20:59] <Fjorgynn> -vn
[21:00] <Fjorgynn> test.mp4 -vn -c:a copy test.wav
[21:00] <Fjorgynn> test.mp4 -vn -c:a copy test.aac
[21:00] <Fjorgynn> maybe
[21:00] <Trashlord> ah
[21:00] <Trashlord> sec, I'll test
[21:00] <Trashlord> that worked, thanks a lot :)
[21:01] <Fjorgynn> :)
[21:25] <burek> hi all :)
[21:26] <burek> if we target quality/bitrate factor, is it better to use -crf option or 2-pass encoding with libx264/ffmpeg ?
[21:27] <JEEB> average bit rate and crf pretty much have the same factor for that
[21:27] <JEEB> so just use the one you need
[21:27] <JEEB> if you just need a general quality level, use crf
[21:27] <JEEB> if you just need a specific average bit rate, use the latter
[21:28] <burek> i see
[21:29] <burek> but does 2-pass also uses variable bitrate throughout the content like crf does?
[21:29] <burek> use*
[21:29] <JEEB> to get CBR from x264, you will have to try hard :P
[21:29] <burek> i see :) great :)
[21:29] <burek> it's no wonder it's the best video codec today :)
[21:30] <burek> although ive been reading about something like h265 already..
[21:30] <JEEB> HEVC, yes
[21:30] <JEEB> which got its ITU-T name "H.264" set on feb 25th
[21:30] <JEEB> uhh
[21:30] <JEEB> *H.265
[21:31] <burek> so, it's the same thing?
[21:31] <burek> oh
[21:31] <burek> ok :)
[21:31] <JEEB> http://iphome.hhi.de/wiegand/assets/pdfs/2012_12_IEEE-HEVC-Overview.pdf
[21:31] <JEEB> have an overview
[21:32] <burek> thanks :)
[21:32] <burek> :beer: :)
[21:33] <JEEB> too bad, while HEVC does base on some of the things from AVC (CABAC for example, as well as many other ideas), it still changes enough that we can't just change x264 around a bit to create a good HEVC encoder
[21:33] <JEEB> f.ex. the change from 16x16 blocks to tree units up to 64x64 of size
[21:34] <burek> so.. back to the lab, eh? :)
[21:34] <JEEB> yeah
[21:34] <JEEB> the not open source stuff is gonna be the first to the cake, because they have the people to pay salaries for :)
[21:34] <JEEB> but libavcodec should get a decoder in some time
[21:36] <burek> it's in their interest also
[21:36] <burek> since a lot of people on the internet are using ffmpeg/libav*
[21:37] <JEEB> smarter has been working on a HEVC decoder at libav from around last may or so, and it's getting pretty good. ffmpeg will also get it through the usual merging process when it gets finished :)
[21:40] <burek> btw, do we have fade in/out audio filter ?
[21:40] <JEEB> not sure
[21:40] <burek> i forgot if i created a ticket
[21:40] <burek> but i think it would be useful
[21:40] <burek> and volume audio filter might be used/upgraded for such purpose i guess
[21:40] <JEEB> http://ffmpeg.org/ffmpeg-filters.html#afade
[21:41] <burek> great :)
[21:41] <JEEB> wouldn't this work?
[21:41] <JEEB> :)
[21:41] <burek> ffmpeg is like a magic box :)
[21:41] <burek> whatever you think of, it's either already implemented or in the process of being implemented :)
[22:04] <ilil> hi, is there a way to differ ffmpeg from its fork at compile time?
[22:05] <ilil> something like #idef FFMPEG_DEFINE ...
[22:05] <ilil> *#ifdef
[22:06] <JEEB> see how ffms2 does it
[22:07] <Plorkyeran> minor versions start at 100 for ffmpeg and 0 for libav
[22:09] <ilil> Plorkyeran: is too unobvious, isn't it?
[22:09] <ilil> JEEB: thanks, is checking out it
[22:09] <Plorkyeran> a simple IS_FFMPEG define would be too hard
[22:10] <ilil> Plorkyeran: ???
[22:10] <ilil> but why? politics again?
[22:13] <Mavrik> the real ffmpeg please stand up -_-
[22:14] <ilil> :))
[22:18] <ilil> oh no, the way ffms doing it: #if LIBAVFORMAT_VERSION_MICRO > 99 || LIBAVUTIL_VERSION_MICRO > 99 || LIBAVCODEC_VERSION_MICRO > 99 || LIBSWSCALE_VERSION_MICRO > 99
[22:43] <PaulWay> Does anyone know how to put correct metadata into an MP4 or WebM file using the -metadata option?
[22:43] <PaulWay> I've tried it but VLC then shows nothing for the fields that I expect it to turn up in.
[22:47] <JodaZ> wow wow wow, yesterday i read about that ffmpeg mutiny for the first time
[22:57] <SubJunk> Is there a way to make FFmpeg create a thumbnail from a video within certain boundaries while keeping the aspect ratio?
[22:57] <Mavrik> what does "within certain boundaries" mean?
[22:58] <SubJunk> For example in MEncoder you use "-vf scale=320:-2,expand=:180" which means the width will be 320 and/or the height will be 180
[22:59] <Mavrik> hmm, there's a scale filter, but not an expand filter
[23:00] <SubJunk> Would another filter achieve the same thing?
[23:01] <SubJunk> I asked about a year ago and it wasn't possible so just checking if it's changed, no problem anyway
[23:01] <beastd> SubJunk: You want to scale or you don't?
[23:02] <SubJunk> If the input video is say 720p then yeah it will need to scale to fit 320x180
[23:41] <JodaZ> does one still need segmenter.c to live transcode to iOS devices or is there a way to do it directly ?
[23:46] <bunniefoofoo> I am using ffmpeg (command line) to write directly to a USB drive. The writes are very slow (800 KB/s), compared to copying the file manually (6000KB/s) and no where near CPU bound... I believe this could be addressed by giving ffmpeg a larger file writing buffer on the output side, is it possible?
[23:47] <hughmanwho> Trying to figure out why my code is not working, it's finally to the point where it is running but just shows the output as frames that are just vertical stripes of black green blue and red. Here is a pastebin: http://pastebin.com/mMSdFCAM Anyone have any thoughts?
[23:47] <hughmanwho> Thanky ou!
[23:48] <JodaZ> bunniefoofoo, on windows you can turn a switch to do this stuff globally i think
[23:49] <JodaZ> bunniefoofoo, i think its propably also the disk cache, not the write buffer thats constraining things
[23:49] <bunniefoofoo> well it is a USB flash drive. In my tests (using stdio), I have to issue writes in 256KB chunks to get good speed
[23:50] <bunniefoofoo> I think stdio defaults to 32KB write buffer, unless ffmpeg is using fflush() ( I am assuming ffmpeg uses stdio )
[23:52] <bunniefoofoo> I don't see any fflush's in code besides stdout/stderr
[23:53] <JodaZ> bunniefoofoo, this linux ?
[23:53] <bunniefoofoo> windows
[23:53] <bunniefoofoo> the switch.. is this an environment var that will set stdio buffer size in the CRT DLL ?
[23:54] <JodaZ> bunniefoofoo, http://support.microsoft.com/kb/259716
[00:00] --- Wed Feb 27 2013
More information about the Ffmpeg-devel-irc
mailing list