[Ffmpeg-devel-irc] ffmpeg.log.20120801
burek
burek021 at gmail.com
Thu Aug 2 02:05:01 CEST 2012
[00:14] <ylluminate> How do you place a video at a specific location on top a larger static background image using ffmpeg?
[00:15] <ylluminate> i've attempted to use the following `ffmpeg -loop 1 -i background.png -i overlay.mov -filter_complex overlay -shortest -y output.mov`
[00:15] <ylluminate> however the output.mov only has a single frame composed of the background.png file with no video overlay
[01:06] <ylluminate> How do you place a video at a specific location on top a larger static background image using ffmpeg? i've attempted to use the following `ffmpeg -loop 1 -i background.png -i overlay.mov -filter_complex overlay -shortest -y output.mov` - however the output.mov only has a single frame composed of the background.png file with no video overlay
[01:17] <raven> hi
[01:17] <raven> i need to encode videos with very smooth color gradients. they are causing steps. any way to encode such a gradient with mpeg in general? if yes how?
[01:19] <relaxed> libx264 has -tune animation
[01:19] <iive> you may want to use libx264 and at least 10 bit sample per channel color format. also lower quant levels until gradients are smooth.
[01:20] <raven> what are the commands for that?
[01:24] <ylluminate> anyone with ideas for the above question regarding overlaying a video atop a static background?
[01:25] <iive> ylluminate: doesn't -loop 1 indicate that the image should be repeated only once?
[01:25] <relaxed> you need to use the movie filter for the video
[01:25] <ylluminate> hmm, i was under the impression that it would loop the first frame, let me go look at the man page again
[01:26] <ylluminate> being an image, i looked at it for so long using a previous version packed with ubuntu
[01:26] <ylluminate> then updated to the most recent version so i'd not have to use that relaxed
[01:26] <ylluminate> i thought that the new -filter_complex eliminated that
[01:27] <relaxed> perhaps, I haven't tried it in a while.
[01:29] <iive> looking at the source i think it is flag and is used as flag.
[01:30] <raven> i cannot find the right command for setting colordepth to 10 - how to do that?
[01:30] <ylluminate> interesting, my compilation did not update the man page
[01:30] <iive> so no fancy numbers. ylluminate could you try only the single image input, without the second and the stream?
[01:30] <ylluminate> although all else installed just fine
[01:31] <iive> raven: try the encode and see if it is good enough.
[01:31] <raven> iive no it is not
[01:31] <iive> tried quant=1?
[01:31] <raven> yes
[01:31] <iive> -qf 1 probably.
[01:31] <iive> try with 0.
[01:32] <ylluminate> iive: which arg is the stream?
[01:33] <iive> ylluminate: try just ffmpeg -loop 1 -i background.png output.mov
[01:33] <iive> hum... i guess you need something to limit the size...
[01:34] <ylluminate> kay iive yes, that will just go on ad infinitum without -shortest
[01:34] <ylluminate> *okay
[01:34] <iive> -t 0:1:0
[01:34] <iive> i think.
[01:34] <iive> (1 minute)
[01:36] <ylluminate> alright interesting
[01:36] <ylluminate> i ran `ffmpeg -loop 1 -i background.png -t 0:0:5 output.mov`
[01:37] <ylluminate> after spinning away for 125 frames, i checked it and it actually yielded no time index on the output .mov
[01:38] <ylluminate> the file was about 32k
[01:38] <ylluminate> hmm
[01:39] <iive> 60*25=1500.
[01:39] <ylluminate> no, i take that back
[01:40] <iive> if the image is black, then it compress quite well.
[01:40] <ylluminate> it seems to have worked properly
[01:41] <ylluminate> the bg is not blank, it's a static image over which i'm inserting some various data fields with imagemagick
[01:41] <ylluminate> so that did indeed encode the video properly
[01:41] <ylluminate> my goal is to take a video, resize it and overlay it at a certain position over this static bg i'm generating
[01:43] <ylluminate> hmm, so we have the static background encoding to video properly
[01:43] <ylluminate> but how now brown cow?
[01:43] <ylluminate> i've gotta, it seems, do what we were doing initially
[01:43] <ylluminate> use the -filter_complex overlay
[01:44] <ylluminate> and pull in a second input that is being overlaid atop the static initial input bg image
[01:46] <iive> is the background video bigger than the second video?
[01:48] <ylluminate> yes
[01:48] <ylluminate> about 2x larger
[01:51] <ylluminate> could it somehow be getting underlaid instead of overlaid iive?
[01:52] <iive> this is possibility. But I know almost nothing about the filters.
[01:53] <ylluminate> hm. unfortunately i flipped the inputs and still it did not change the overlay order as far as i can tell
[01:53] Action: iive pokes saste
[01:53] <iive> are there more options about the overlay?
[01:54] <iive> i guess you use recent git build.
[01:54] <saste> ylluminate: start by hacking the overlay examples
[01:55] <saste> i'm pretty sure we already have a basic examples covering your problem
[01:55] <saste> *basic example
[01:55] <ylluminate> really
[01:56] <ylluminate> where prey tell is that url wise?
[01:59] <ylluminate> saste: do you have an example url for the overlay examples?
[02:01] <saste> ylluminate: http://ffmpeg.org/ffmpeg.html#overlay-1
[02:01] <saste> movie docs also may help
[02:02] <ylluminate> wow, interesting
[02:03] <ylluminate> but as i've seen in some other examples saste it seems to cover overlay pngs just fine, but not seeing anything flipped
[02:03] <ylluminate> it seems as though it should work essentially the same
[02:03] <ylluminate> yet it doesn't seem to be so far
[02:03] <saste> what's the problem
[02:04] <ylluminate> i have a larger static bg image (1280x720) over which i'm placing a video that's 200x200 being resized to 660x660
[02:04] <ylluminate> the problem seems to be that each time it's rendered the static bg renders out just fine, but no overlay video appears
[02:05] <ylluminate> i've thought perhaps it's being underlaid rather than overlaid, but i don't think so from the examples i'm seeing
[02:05] <saste> ylluminate: pastebin with command
[02:05] <ylluminate> it seems that the first input is the back most layer and then it increases in height on each additional input
[02:06] <ylluminate> `ffmpeg -loop 1 -i background.png -i overlay_video.mov -filter_complex overlay -shortest -y output.mov` yields http://j.mp/R5HGm4
[02:08] <saste> -shortest
[02:09] <saste> that is ending the video when the shortest input is ending
[02:09] <saste> in this case the background, since it is a single image
[02:09] <ylluminate> however background.png is looping indefinitely and therefore should no longer be the shortest... no?
[02:09] <saste> ah loop 1 ok...
[02:09] <saste> lemme try
[02:12] <saste> look it works fine here...
[02:12] <saste> and your ffmpeg seems pretty recent
[02:12] <saste> maybe a timestamp issue with video.mov?
[02:13] <ylluminate> hrm
[02:13] <ylluminate> effectively this is what i'm trying to do: https://img.skitch.com/20120801-raeuuubw681x7uqj7n99mfi6eq.png
[02:13] <saste> try ffprobe -show_frames on video.mov, check that the video timestamp start from 0
[02:15] <saste> ffmpeg -f lavfi -i color=c=red:s=200x200 -f lavfi -i testsrc=s=100x100 -filter_complex overlay -shortest -y output.mov
[02:15] <saste> also try this (which works fine here, and doesn't depend on possibly bogus files)
[02:16] <ylluminate> ffprobe output: https://gist.github.com/1e06794c75025e8f40a7
[02:16] <EhevuTov> anyone have source piping to ffmpeg working on Mac OS X? ppm is not working for me anymore
[02:17] <EhevuTov> gource*
[02:18] <saste> ylluminate: no check the output on video.mov, don't show it to me, just verify that timestamps are in order and starting from 0 (pts_time values)
[02:18] <saste> use setpts to fix them otherwise
[02:18] <ylluminate> the ffmpeg test you gave me with overlay does indeed work iive
[02:19] <ylluminate> i can't help but think something's wrong with that video i'm trying to place over the static bg now
[02:19] <ylluminate> i wonder if some kind of an initial conversion on it to sanitize it first might be wise
[02:19] <saste> ylluminate: ffprobe -show_frames, setpts in case it has bogus timestamps
[02:20] <soulstitchmmo> I am currently reading: http://ffmpeg.org/ffmpeg.html#Detailed-description and would like to know if I am correct in assuming that -vcodec libx264 is what defines the values for -preset:v ?
[02:21] <ylluminate> so you're saying `ffprobe -show_frames, setpts overlay_video.mov` saste?
[02:21] <ylluminate> (returning an error for me as to why i ask)
[02:22] <saste> ylluminate: i'm tired and sleepy, and i compress my sentences
[02:23] <ylluminate> lol i know what you mean. just went through a string of gall, kidney stones and kid breaking arm
[02:23] <saste> that's mean, use ffprobe -show_frames on the file to check, read carefully the output, use your guessing skills if something seems obscure, in case of problems with timestamps use the setpts filter and see if it helps
[02:24] <saste> look it's much easier to just do ffmpeg -i video.mov -vf showinfo -f null - to check the timestamps
[02:24] <saste> or ffplay video.mov -vf showinfo
[02:25] <ylluminate> no, he didn't break my arm. he fell and broke his. just been a very long month for me. lol
[02:25] <ylluminate> i've been up the last few days tending him so -.- zzzzzz
[02:27] <ylluminate> ah yes saste
[02:27] <ylluminate> i think it is a corrupted overlay vid
[02:29] <ylluminate> bingo saste
[02:29] <ylluminate> thanks, that really helped to look at the frames
[02:32] <saste> ylluminate: i'm going to sleep, good night/day/whatever
[02:32] <ylluminate> sleep well
[02:32] <soulstitchmmo> I am currently reading: http://ffmpeg.org/ffmpeg.html#Detailed-description and would like to know if I am correct in assuming that -vcodec libx264 is what defines the values for -preset:v ?
[02:39] <soulstitchmmo> how do I increase my bitrate from the command line?
[05:39] <darkstarbyte> What are some options I could use with libxvid to increase quality?
[05:48] <soulstitchmmo> how do I increase my bitrate?
[05:50] <darkstarbyte> -b What_ever_you_want_here
[05:50] <darkstarbyte> like
[05:50] <darkstarbyte> -b 6000k
[05:50] <darkstarbyte> The default is a little low.
[05:51] <soulstitchmmo> darkstarbyte: the bitrate, corresponds to my upload speed right?
[05:51] <darkstarbyte> upload speed?
[05:51] <soulstitchmmo> right the bitrate is how fast I can transmit, or how fast it gets encoded.
[05:51] <soulstitchmmo> what exactly does the bitrate do.
[05:52] <darkstarbyte> The bitrate corresponds to how many bits output from the video file per second.
[05:52] <darkstarbyte> average.
[05:52] <darkstarbyte> or
[05:52] <darkstarbyte> on average.
[05:52] <soulstitchmmo> so does that affect CPU?
[05:52] <soulstitchmmo> like how much CPU ffmpeg uses?
[05:53] <darkstarbyte> cartoon don't take much, I gave one at the resolution 720p, and I gave it 4000k and it only take 1500k
[05:53] <soulstitchmmo> I want to stream gaming.
[05:53] <darkstarbyte> Usually not by much.
[05:53] <soulstitchmmo> So the stream will be running while I'm gaming.
[05:53] <darkstarbyte> That is a tough one.
[05:53] <soulstitchmmo> and currently it's sitting at 70-90% cpu.
[05:53] <darkstarbyte> What kind of cpu do you have?
[05:54] <darkstarbyte> Please say multicore.
[05:54] <soulstitchmmo> Intel Core i7 cpu 860 @ 2.80ghz x 8
[05:54] <darkstarbyte> oh, then this should be great and easy
[05:54] <darkstarbyte> What format do you need?
[05:55] <darkstarbyte> mkv, mp4, avi?
[05:55] <soulstitchmmo> I'm pretty sure I need flv for twitch.
[05:55] <darkstarbyte> avi, etc*
[05:55] <darkstarbyte> ok
[05:55] <soulstitchmmo> i'm streaming directly to twitch
[05:55] <darkstarbyte> Do have the code needed for capturing the screen?
[05:56] <soulstitchmmo> ffmpeg -f x11grab -s $INRES -r $FPS -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -preset:v $QUAL -s $OUTRES -acodec libmp3lame -ab 96k -ar 44100 -b 6000 -threads 0 -f flv rtmp://live.justin.tv/app/$STREAM_KEY
[05:56] <soulstitchmmo> I just added the -b 6000
[05:56] <darkstarbyte> it is live, which complicates things.
[05:56] <soulstitchmmo> yeah. which is why I'm trying to tweak all that to get maximum quality with minimal lag.
[05:56] <darkstarbyte> hold on while I grab options for that x264 encoder.
[05:57] <soulstitchmmo> tyvm and if there is a better encoder as well.
[05:57] <soulstitchmmo> I am used to XSplit for Windows which handles everything beautifully.
[05:57] <darkstarbyte> They have easier ways of doing things, but they can take more cpu power.
[05:58] <darkstarbyte> -tune zerolatency should be added for live streaming.
[05:58] <soulstitchmmo> Well I'm trying to get Linux Gaming more recognized on Twitch, but to do that I need to be able to stream and not lag my ass off.
[05:58] <soulstitchmmo> what does that do?
[05:59] <darkstarbyte> lower latency for live streaming.
[05:59] <darkstarbyte> How fast is your internet by the way, upload that is?
[05:59] <soulstitchmmo> 2.5mbps
[05:59] <darkstarbyte> They might need to be a change in bit rate, so you don't lag when sending stuff to the sight.
[06:00] <soulstitchmmo> well I know I have to balance that against my Q
[06:01] <darkstarbyte> The current options need tweaking
[06:01] <darkstarbyte> change -b 6000k to -b 2000k or it will lag when sending the info.
[06:01] <soulstitchmmo> done
[06:01] <darkstarbyte> One last thing
[06:01] <darkstarbyte> Is the game cartoony?
[06:01] <soulstitchmmo> Qual = Medium.
[06:02] <soulstitchmmo> League of Legends, and Team Fortress 2.
[06:02] <darkstarbyte> Ok never mind.
[06:02] <soulstitchmmo> So yeah kinda cartoony.
[06:02] <darkstarbyte> I forgot that we are using -tune for the low latency.
[06:02] <darkstarbyte> If it does not have to be live, we can make the video look better.
[06:02] <soulstitchmmo> has to be live :p p
[06:03] <soulstitchmmo> I can record locally just fine.
[06:03] <soulstitchmmo> ffmpeg -f x11grab -s $INRES -r $FPS -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -preset:v $QUAL -s $OUTRES -acodec libmp3lame -ab 96k -ar 44100 -tune zerolatency -b 2000 -threads 0 -f flv rtmp://live.justin.tv/app/$STREAM_KEY
[06:03] <darkstarbyte> well check the quality on that, see if that is ok.
[06:03] <soulstitchmmo> ok
[06:04] <soulstitchmmo> lol my q=69.0 :p
[06:05] <soulstitchmmo> is the b 2000 supposed ot have a k?
[06:06] <darkstarbyte> yeah
[06:06] <darkstarbyte> It might not change though.
[06:06] <darkstarbyte> This is a very light compression, for band width constraints.
[06:07] <soulstitchmmo> ok q = 0.0
[06:07] <soulstitchmmo> http://www.twitch.tv/soulstitchmmo#
[06:07] <soulstitchmmo> Just streaming chat atm though.
[06:07] <darkstarbyte> check the quality on this, man
[06:08] <darkstarbyte> If we could delay the broadcast, you can have much better quality.
[06:08] <soulstitchmmo> how much delay?
[06:12] <darkstarbyte> I would say if you record it a head of time, you can have really great quality.
[06:13] <darkstarbyte> also, set -threads to 4, as in -threads 4
[06:15] <soulstitchmmo> This quality, is kinda fantastic so far. about to actually get in game though.
[06:16] <soulstitchmmo> what does that do?
[06:16] <darkstarbyte> so it can distribute the work load over the cores of your cpu.
[06:16] <soulstitchmmo> wow I can't believe I'm just now learning about that lol.
[06:16] <darkstarbyte> even if it is really low, it should make it spread out more.
[06:16] <relaxed> that's what -threads 0 does
[06:17] <darkstarbyte> auto detect?
[06:17] <relaxed> yes
[06:17] <darkstarbyte> What he said.
[06:17] <soulstitchmmo> this is amazing.
[06:19] <soulstitchmmo> haven't even done the thread 4 thing yet and it's worlds better.
[06:23] <darkstarbyte> You have a task manager, please pull it up.
[06:24] <darkstarbyte> It should tell you how much cpu is left for your game.
[06:25] <darkstarbyte> Good night everyone, I am really tired.
[07:24] <soulstitchmmo> darkstarbyte: thanks a ton there was a huge improvement.
[08:03] <powerNET> Do I need to open source a GUI application that I'm writing for ffmpeg if I use ffmpeg through CLI without modifying anything?
[08:04] <powerNET> I'm compiling it with --enable-gpl --enable-libmp3lame --enable-libx264
[08:06] <powerNET> i'm using the software as a ffmpeg exe launcher but it allows user to set x264 preset levels to convert xvid videos to x264. Not really sure if i actually need libmp3lame because I'm using -acodec copy parameter.
[08:20] <relaxed> no
[08:33] <kcm1700_> I'm receiving video from rtsp/rtp server. decoder is native ffmpeg mpeg4. is it possible to detect if any packet is lost? (as a result the decoded frame is not clear?)
[10:12] <Xgates> hey guys
[10:12] <Xgates> anyone here ever use WinFF? I'm trying to figure out these problems with; http://code.google.com/p/winff/issues/detail?id=171 maybe I need to use an older version of ffmpeg?
[10:16] <JEEB> uhh, I never knew 'kb' worked for bitrates, it was always k AFAIK,
[10:30] <Xgates> I changed it to k for one and got it work
[10:57] <Xgates> well I finally figured it out, I just needed a different present :)
[10:57] <Xgates> thanks
[10:57] <Xgates> later...
[12:24] <cinelli> Trying to convert *.umv to *.avi can't find any documentation for it anywhere.. *.umv are from a CCTV
[12:24] <sacarasc> If you can do ffplay blah.umv, then you don't need any documentation specifically about that. Then again, if that doesn't work, you probably can't use ffmpeg to reencode it.
[12:25] <cinelli> sacarasc: noted, what would the command be to reencode it? Not to savy with ffmpeg
[12:41] <Gupp> Anyone seen/solved this before? I'm trying to transcode to a H264 MP4 for HTML5 video. libx264 works fine for mkv, but when I change the extention to mp4 it gives an error: http://pastebin.com/sa3dFdcq
[12:41] <Gupp> I have searched high and low and tried adding various bit/sample rates, sizes etc as suggested in a lot of forums, but always the same error.
[12:46] <saste> Gupp: Codec is experimental but experimental codecs are not enabled, try -strict -2
[12:47] <Gupp> i added -strict -2 to the command line but that didnt suppress the message
[12:47] <Gupp> is there a non-experimental eay to get an HTML5 MP4?
[12:48] <Gupp> eay/way
[12:48] <Gupp> oh no, adding -strict -2 changed the error:
[12:48] <Gupp> [mp4 @ 0x1ea47c0] track 1: could not find tag, codec not currently supported in container
[12:50] <JEEB> Stream #0:1(eng): Audio: none, 32000 Hz, stereo, flt, 128 kb/s
[12:50] <JEEB> what on earth is it trying to select as the audio codec :D
[12:51] <CodeFriar> Can anyone share example code showing how to trim video using the *c api* without re-encoding the video?
[12:52] <JEEB> also Gupp -- I can't say using a non-release 4.7.0 GCC is a good idea either
[12:53] <JEEB> CodeFriar, you would most probably have to look at the ffmpeg command line app's sources for that, look at how it deals with the -ss and other similar commands and having the video codec set to 'copy'
[12:54] <saste> CodeFriar: check the segment.c muxer
[12:54] <JEEB> ugh
[12:54] <JEEB> he left
[12:54] <saste> impatient...
[12:55] <JEEB> Gupp, I'm somewhat wary of that GCC you're using in relation to the fact that ffmpeg seemingly selected something NULL/none as the audio codec
[12:55] <JEEB> oh, it's Stream #0:0 -> #0:1 (pcm_s16be -> aac)
[12:56] <Gupp> hmm, not sure what to do about the gcc issue
[12:56] <Gupp> i didnt compile ffmpeg myself, prehaps i should try that?
[12:56] <JEEB> if you're not going to distro your ffmpeg, I just recommend you to try out the fraunhofer aac encoder
[12:58] <JEEB> Gupp, can you give a pastebin with -strict experimental
[13:00] <Gupp> JEEB, will do, do you want "-strict -2" like the error suggested, or "-strict experimental" or just "-strict" ?
[13:11] <Gupp> JEEB, http://pastebin.com/b6273xqe -strict -2 and -strict experimental dont seem to have made any difference
[13:11] <Gupp> http://pastebin.com/b6273xqe
[13:11] <Gupp> it was -acodec copy that gave the other error
[13:11] <Gupp> getting very confused with all the things i've tried now
[13:12] <JEEB> I think experimental is -2 internally
[13:12] <Gupp> i dont know what that means!?
[13:12] <JEEB> they are the same internally :P
[13:12] <JEEB> that's all
[13:13] <JEEB> so you can either write it as a word
[13:13] <JEEB> or a number
[13:13] <Gupp> oh ok
[13:13] <JEEB> also, yes -- uhh
[13:13] <JEEB> both pastebins seem to be doing copy
[13:13] <JEEB> for audio
[13:13] <JEEB> which will naturally fail
[13:13] <JEEB> as mp4 doesn't support PCM audio
[13:14] <JEEB> (there's a specification for that under writing, but it's far from being finalized)
[13:14] <JEEB> -c:a aac
[13:14] <JEEB> that'll use the experimental aac encoder that you needed the -strict experimental/-2 for
[13:15] <Gupp> how come -strict -2 still gives the warning? is that expected?
[13:16] <Gupp> -c:a aac doesnt seem to have mad any difference
[13:16] <JEEB> give a pastebin
[13:16] <Gupp> is there not a non-expermental way to make a H264 MP4?
[13:16] <Gupp> coming up
[13:16] <JEEB> it's not MP4 or H.264 that needs experimental
[13:16] <JEEB> it's the fact that you don't have any other aac encoder
[13:17] <JEEB> than the internal one, which is still under the experimental flag
[13:17] <Gupp> http://pastebin.com/kmnhcWmM
[13:18] <JEEB> try ffmpeg -i test.mov -c:v libx264 -b:v 800k -c:a aac -b:a 192k -strict experimental -g 30 test.mp4
[13:21] <Gupp> genius! its encoding :D
[13:21] <JEEB> so it was enabling experimental stuff for the decoders...
[13:21] <JEEB> (or ignoring it before the -i)
[13:21] <JEEB> basically, if you set something before the -i, the settings touch input/decoding
[13:21] <JEEB> after -i, it's output/encoding
[13:22] <Gupp> ohhh right
[13:22] <Gupp> such a complex tool!
[13:22] <Gupp> many thanks for your help :)
[13:22] <Gupp> lets just hope the web browsers are happy with the output
[13:23] <JEEB> they should be
[13:23] <JEEB> H.264/AAC
[13:23] <JEEB> in mp4
[13:23] <JEEB> also if you're going to be loading this up via some limited connection like an internet connection, you might want to set vbv
[13:24] <JEEB> also, bitrate-based encoding is less than optimal with just one pass
[13:24] <JEEB> vbv is set by -maxrate and -bufsize
[13:25] <JEEB> where maxrate is the maximum average bit rate over the buffer (basically the minimum connection needed to watch something without extra buffering). and bufsize is the maxrate * how many seconds you will be buffering at first
[13:25] <JEEB> and a rate control mode that is optimal with just one pass is the crf parameter (it is limited to libx264, though)
[13:26] <JEEB> it is basically a quality based rate control mode
[13:26] <JEEB> ("constant rate factor")
[13:26] <JEEB> default is 23, and by making it higher you make it compress more and by lowering it you make it compress less
[13:26] <JEEB> and yes, "crf that looks good" + vbv would keep the bit rate within the vbv limitations, naturally
[13:27] <JEEB> also, regarding libx264 you might want to use the internal presets with -preset most probably (default is 'medium')
[13:27] <JEEB> http://mewiki.project357.com/wiki/X264_Settings#preset
[13:27] <Gupp> wow soo much stuff, very interesting though
[13:27] <Gupp> will have a play with a few things
[13:28] <JEEB> regarding presets, you just use the slowest you can take, it will enable various things that help with compressing things
[13:28] <JEEB> (more cpu power used for compression vs less cpu power)
[13:28] <JEEB> also, I don't really recommend the slowest and fastest preset
[13:28] <JEEB> both are for benchmarks usually
[13:28] <JEEB> (or if you have extra time to spend)
[13:29] <Gupp> its quite a short vid, so slowest might be tolerable, in this case
[13:32] <JEEB> also, maxrate/bufsize probably work with more video encoders. crf is libx264-specific and the presets I mentioned are too
[13:33] <JEEB> (I think for example libvpx does have separate preset files that you can call though)
[13:34] <JEEB> if you have any extra questions, just ask
[13:34] <Gupp> ok, thanks again, defo saving this chat to re-read and will have a play with a few things
[13:34] <Gupp> i may be back ;)
[13:35] <JEEB> also, if you build ffmpeg yourself you might want to try out fraunhofer's lately open sourced AAC encoder
[13:35] <JEEB> https://github.com/mstorsjo/fdk-aac
[13:36] <JEEB> also, if you build ffmpeg yourself you usually want to build the current git HEAD :)
[13:36] <JEEB> (not one of the releases, as they can become old in one way or another quite quickly)
[16:33] <sb1066> Hello! I'm trying to transcode a dvb stream in real time using libavcodec, libavformat and so on. Then mux it to webm and spit out on a http socket.
[16:33] <cbreak> there's no such thing as an http socket
[16:34] <sb1066> tcp socket
[16:34] <sb1066> that spits out http formatted data then :)
[16:34] <cbreak> you want to post stuff to a server?
[16:34] <sb1066> no, the other way arround
[16:35] <cbreak> ffmpeg is not an http server.
[16:35] <sb1066> I know
[16:35] <cbreak> when I did HTTP Live streaming, I used vlc and apache to split/serve
[16:35] <cbreak> and ffmpeg to transcode
[16:35] <sb1066> the application I'm working on, called tvheadend, contains a http server
[16:36] <sb1066> https://www.lonelycoder.com/tvheadend/
[16:37] <sb1066> atm, I can transcode the dvb source (usually mpeg ts) into mkv
[16:37] <sb1066> but I was having some trouble with the vobis codec so I thought I'd pop in here and ask a few things
[16:38] <sb1066> to be specific, the timestamps for vorbis is a bit different than for example aac, mp2 and so on
[16:40] <sb1066> and also, the frame size is alot smaller for vobis than the source, usually mp2
[16:43] <sb1066> so my first question is: can I just append a bunch of vorbis frames collected from a mp2 frame, then send it to the webm muxer with the first "pts"
[16:43] <sb1066> or do I need to send in one frame at a time?
[17:10] <burek> sb1066 sounds like you are looking for vorbis user manual, specs, docs, etc
[17:12] <sb1066> k, I'll see if I can dig anything up
[17:12] <sb1066> thanks
[17:19] <dooley> I'm working on a basic transcoding app and was wondering what good presets for x264 would be to use for standard (base SD mp4) and hd (base 720p mp4) encoding?
[17:27] <teratorn> dooley: the ones ffmpeg ships with, I think
[17:28] <teratorn> sb1066: usually you encode one frame at a time
[17:39] <Diogo> hi one question i have one movie mkv with subtitles...i need to convert to mp4 file but with subtitles...
[17:39] <Diogo> /servers/ffmpeg/bin/ffmpeg -i filme_comlegendas.mkv -vcodec copy -acodec copy -scodec copy filme_legendas.mp4
[17:39] <Diogo> if i convert directaly /servers/ffmpeg/bin/ffmpeg -i filme_comlegendas.mkv copy filme_legendas.mp4 (i loose the subtitles)
[17:42] <raposinha> hi
[17:42] <raposinha> I need capture two video from webcam with ffmpeg
[17:43] <raposinha> but I run first command the second command not responde and block capture process
[17:43] <raposinha> ex: avconv -f video4linux2 -i /dev/video0 video0.avi
[17:43] <raposinha> avconv -f video4linux2 -i /dev/video1 video1.avi
[17:44] <raposinha> It is possible?
[17:44] <Mavrik> avconv?
[17:53] <Diogo> anyone?
[17:53] <Diogo> hi one question i have one movie mkv with subtitles...i need to convert to mp4 file but with subtitles...
[17:55] <raposinha> yes
[18:01] <raposinha> Mavrik, Yes
[18:02] <Mavrik> raposinha, people on avconv support channel are probably more fit to help you with your problem
[18:03] <raposinha> Mavrik, Ok
[19:03] <rexbron> I'm having trouble transcoding a mov file with a timecode track and get the following error: http://pastebin.com/fyQHtTqn
[21:09] <silly_> i have a problem, when i want to stream audio in additon to the webcam.. webcam alone works.. http://pastebin.com/raw.php?i=WRmYCp0W any ideas?
[21:18] <silly_> the strange thing is, without audio it works perfectly, but as soon as i add the alsa part if fails
[21:36] <bwalker8981> Hi, I'm streaming a flv from ffmpeg to red5 media server. My frame rate is very low (7fps), even though I specified -r 30. Here is my command, along with the video formats from my webcam: http://pastebin.com/bfZnwRCn
[21:45] <Mavrik_> bwalker8981: your camera is telling you it can't stream 30fps @ 720p
[21:45] <Mavrik_> so it probably defaults back to 7fps
[21:45] <Mavrik_> bwalker8981: you didn't paste the actuall ffmpeg output
[21:45] <Mavrik_> so we can't know if that's the case.
[21:53] <bwalker8981> mavrik: sorry, i'll paste the ffmpeg output...
[21:56] <bwalker8981> mavrik: here is the ffmpeg output. http://pastebin.com/8cbb75q6 I'm new to ffmpeg. Between this and the output of the webcam in the previous paste, do you think there is any way to get a higher fps with that resolution?
[21:58] <Mavrik_> bwalker8981: if you look at your output
[21:58] <Mavrik_> you can see your camera outputs either up to 10fps @ 720p RAW video or up to 30fps @ 720p h.264 encoded video
[21:58] <Mavrik_> you probably just have to tell ffmpeg to switch the camera to the second mode
[21:59] <Mavrik_> yeah, see in the input segment:
[21:59] <Mavrik_> Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x720, 165888 kb/s, 15 tbr, 1000k tbn, 15 tbc
[21:59] <Mavrik_> [video4linux2,v4l2 @ 0xac2d680] The driver changed the time per frame from 1/30 to 1/15
[22:01] <Mavrik_> bwalker8981: try putting "-vcodec h264" BEFORE "-i"
[22:01] <bwalker8981> mavrik: so it's streaming Raw video now, but if i go to the h.264 codec I should be able to go up to 30fps? I think I see what you're saying now. To use the h.264 codec, that's th- oh you just answered my question with -vcodec
[22:01] <bwalker8981> mavrik: Thanks! I'll have to install that and give it a try, ill do that now
[22:01] <Mavrik_> see if you're getting h264 from the camera in the "input segment" :)
[22:03] <llogan> bwalker8981: you don't need to install anything to decode H.264
[22:04] <bwalker8981> llogan: oh, so I guess im confused then, i should just add the vcodec line?
[22:04] <llogan> sure, you can try it
[22:05] <bwalker8981> llogan: i get http://pastebin.com/mYUB5RN8 error message
[22:05] <llogan> always include your complete command and the complete output
[22:06] <llogan> you can also test decoding only so you can determine if it is decodng or encoding that is the bottleneck
[22:06] <llogan> ffmpeg -benchmark -f v4l2 -s 1280x720 -r 30 -i /dev/video0 -f null -
[22:06] <bwalker8981> llogan: sorry! here it is http://pastebin.com/H87iGReR
[22:08] <Mavrik_> bwalker8981: can you do somethin glike ffmpeg -f v4l2 -list_formats all -i /dev/video0 dummy.mp4
[22:08] <Mavrik_> that should list supported formats as ffmpeg sees them
[22:09] <bwalker8981> mavrik: llogan: here is that output http://pastebin.com/K1jW8hkC
[22:10] <Mavrik_> hmm, "h.264" says unsupported
[22:10] <llogan> bwalker8981: refer to "V4L2 indev AVOptions" in ffmpeg -h
[22:10] <Mavrik_> bwalker8981: mjpeg is supported though, use "-vcodec mjpeg" before "-i"... that should give you 30 fps :)
[22:11] <Mavrik_> (of course use "-r 30" before "-i" to actually set 30 fps input :) )
[22:12] <llogan> v4l2 has -framerate, -input_format, -video_size private options, so you may have to use those instead
[22:13] Action: llogan has never used v4l2
[22:13] <Mavrik_> llogan: -vcodec / -r / -s get translated if passed before -i :)
[22:14] <llogan> i'm just regurgatating what the documentation and examples show
[22:14] <llogan> corn? when did i eat corn?
[22:15] <Mavrik_> and I'm telling you what works ;)
[22:15] <llogan> good for you. here's a cookie.
[22:15] <bwalker8981> mavrik: logan: cool, using vcodec mjpeg I can get it up to 30 fps. However, now there is a very large lag in the video. We are trying to have a real time feed from a blimp, so this 4 sec lag is too much. Any suggestions for how to deal with this? would the h264 codec eliminate this option?
[22:16] <Mavrik_> hmmm, the question is where the lag is coming from
[22:16] <Mavrik_> if it's the camera, the encoder, player, streaming server or all of those :)
[22:18] <bwalker8981> Mavrik: I don't think its the player, because I set the buffer to 0 for that...
[22:20] <Mavrik_> bwalker8981: I suggest you run "ffplay" on your camera
[22:20] <Mavrik_> with same parameters (except encoding/output) as you're running ffmpeg
[22:20] <Mavrik_> to see if there's lag with camera
[22:21] <bwalker8981> Mavrik: okay ill give it a try, i'll have to figure out the command...
[22:21] <Mavrik_> the syntax is probably almost identical
[22:21] <Mavrik_> probably just remove output file and -i
[22:23] <bwalker8981> Mavrik: is this supposed to be installed with ffmpeg? I don't think I have it
[22:23] <Mavrik_> yeah, it's part of ffmpeg
[22:23] <llogan> it requires sdl
[22:24] <llogan> if it is missing it is silently not built i think
[22:27] <bwalker8981> llogan: i didn't have sdl installed. it looks like ill have to to reinstall ffmpeg
[22:28] <llogan> libsdl1.2-dev specifically
[22:31] <llogan> bwalker8981: sounds like an interesting project...a blimp.
[22:31] <bwalker8981> llogan: i know! we're going to have it fly around our research building, and let anyone control it from a webpage with a live video feed from the blimp
[22:33] <llogan> i propose you name it "Coppens" after the Belgian balloon buster
[22:35] <llogan> bwalker8981: what board are you using?
[22:35] <bwalker8981> llogan: ha ha. beaglebone
[22:41] <bwalker8981> llogan: you know, I think the problem is my internet connection. my connection is 10,000 kbits/s, but with 30fps at 1280x720 the datarate is over 20Mb/s
[22:42] <sacarasc> Depends on the compression.
[22:42] <bwalker8981> sacarasc: im streaming mpeg's now. is h264 more compressed? if so, I would like to figure out how to get this codec working with ffmpeg
[22:43] <sacarasc> Technically, H264 is an MPEG...
[22:45] <sacarasc> It does have the best quality:size ratio, though.
[23:27] <slackyman> hi
[23:27] <slackyman> nedd a help to recompile sdl and make ffmpeg using the new one (static)
[00:00] --- Thu Aug 2 2012
More information about the Ffmpeg-devel-irc
mailing list