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

burek burek021 at gmail.com
Mon Nov 10 02:05:01 CET 2014


[11:09] <shevy> I have a large .mp3 file - is there a way to radically compress it? I don't mind losing audio quality
[11:16] <relaxed> shevy: try, ffmpeg -i input.mp3 -q:a 9 output.mp3
[11:37] <NasUser> Hello there!
[11:38] <shevy> cool relaxed
[11:38] <shevy> from about 184 MB to 44 MB
[11:40] <NasUser> Could someone please help me? I want to convert a whole folder (and the other folders inside!), with some .avi files, into .webm
[11:41] <NasUser> I'm a bit lost into ffmpeg documentation, as I'm a noob on file conversion and I don't understand so much English ^^'
[11:43] <NasUser> Maybe a commnd line, or a good GUI for ffmpeg... ?
[11:49] <NasUser> I found this one : ffmpeg -i input.avi -vcodec libxvid output.avi
[11:50] <NasUser> but That's only for ONE file... And I have dozen of videos to convert
[11:51] <NasUser> Is it working with *.avi ?
[12:12] <relaxed> NasUser: hold on a sec
[12:15] <relaxed> NasUser: In the top level directory run the following:
[12:15] <relaxed> find . -name "*.avi" -print0 | xargs -0 bash -c 'for i; do ffmpeg -i "$i" -c:v libvpx -crf 10 -b:v 2M -c:a libvorbis "${i%.*}".webm; done' -
[12:20] <relaxed> it may take a while ;)
[13:04] <emilsedgh> Hi guys. I use ffmpeg as encoder for an rtmp stream from my webcam. All is fine with flv. but when I use mp4, it says: http://paste.kde.org/pwscrfrac
[13:04] <emilsedgh> I'd appreciate any help
[13:06] <relaxed> "muxer does not support non seekable output"
[13:15] <emilsedgh> relaxed: which means?
[13:15] <emilsedgh> (please note that when I use /tmp/1.mp4 instead of rtmp:// it works fine
[13:17] <JEEB> rtmp is FLV only
[13:18] <JEEB> FLV can contain various video and audio formats, but rtmp is an adobe-only, FLV container only streaming format
[13:19] <JEEB> and the error means that mp4 cannot be written a->b (it wants to seek in the end and write a header, which of course is impossible with a non-seekable output)
[13:33] <emilsedgh> JEEB: ooh, i didnt know rtmp is FLV only
[13:34] <emilsedgh> thanks
[13:34] <emilsedgh> my main problem is that I play baseline h264 flv through rtmp but some clients dont get any video output
[13:36] <emilsedgh> avconv -y -f alsa -i hw:2,0 -f video4linux2 -itsoffset 4.8 -i /dev/video1 -vcodec libx264 -vprofile baseline -b:v 220k -b:a 40k -pix_fmt yuv420p -strict -2 -acodec aac -f mp4 rtmp://...
[13:36] <emilsedgh> this is the command I use. I read somewhere that vprofile baseline and pix_fmt yuv420p will help
[13:36] <emilsedgh> but they didnt
[13:40] <relaxed> you meant -f flv ?
[14:51] <PacketCarriage> Hey folks
[14:51] <PacketCarriage> just wanna find out what's the best setup to do live transcoding
[14:51] <PacketCarriage> Xeon , i7 ?!
[14:52] <PacketCarriage> Any recommended hardware
[14:53] <JEEB> newest arch intel cpu, as fast as your budget lets
[14:54] <PacketCarriage> so you think i7 is better at transcoding with FFmpeg rather than Xeon ?
[14:54] <PacketCarriage> anyone has experience with FFmpeg in production
[14:54] <PacketCarriage> I would appreciate it
[14:55] <JEEB> many people do, but it's basically down to your exact use case and budget as well as quite a few other things
[14:55] <PacketCarriage> well the budget is not so restricted as this is for a business
[14:55] <JEEB> and no idea about "standard" cpus versus xeons, although I guess the xeons could be a bit faster with a larger cache and all
[14:55] <PacketCarriage> not for home use
[14:56] <JEEB> well, yes
[14:56] <JEEB> but you still have one
[14:56] <JEEB> and you then have the use case
[14:57] <PacketCarriage> we are pushing a multicast to one interface on the transcoder and getting a transcoded stream out of another
[14:57] <PacketCarriage> well few streams I should say
[14:57] <PacketCarriage> coz the multicast has about 7 of them
[14:57] <PacketCarriage> Transcoder == x86 server really
[14:57] <PacketCarriage> running ubuntu and FFmpeg
[14:58] <PacketCarriage> with a script to manage the streams and a web interface
[14:58] <JEEB> basically the best way to test is to have some kind of hardware and see how well it fares, and then seeing what should be gotten next. Also some hints can be gotten by what kind of resolution/frame rate of content it is, and the preferred compression efficiency (I will guess you will use libx264)
[14:58] <PacketCarriage> I want to find out if there is an optimal hardware config that can give the best performance hence allowing me to squeeze in more streams per transcoder
[14:59] <PacketCarriage> we do have few xeon servers
[14:59] <PacketCarriage> :)
[14:59] <JEEB> there's no random recommendation really
[14:59] <PacketCarriage> the streams are not all HD
[14:59] <PacketCarriage> some are SD
[15:00] <PacketCarriage> We are currently producing about 80 streams so we have few servers running but we are thinking about scaling up
[15:01] <PacketCarriage> so it makes sense to find the best optimal configuration
[15:01] <JEEB> just that AMD doesn't cut it these days, newest architecture is good and that quad/nice amount of cache is good. RAM always helps, but it gets more useful after a few gigs after the resolutions get higher or when the compression efficiency is pushed further (more reference frames and lookahead in memory etc)
[15:02] <JEEB> multiple streams on a single machine of course means that more cores still helps, and cache gets more important, as well as RAM
[15:02] <relaxed> xeons offer more threads than i7s, so I would go with those if it's in the budget.
[15:02] <relaxed> and everything else
[15:03] <PacketCarriage> the latest Gen maybe
[15:03] <PacketCarriage> we currently use HP 160 G6 with dual xeons
[15:03] <PacketCarriage> and also some Dells
[15:03] <PacketCarriage> but they are not cutting edge
[15:03] <PacketCarriage> I would say 2008 or 2009
[15:04] <PacketCarriage> maybe the new Xeons will do better
[15:04] <JEEB> yeah, if you are going to be using libx264 you'll get a nice boost with newest generation stuff
[15:04] <PacketCarriage> so its pure CPU
[15:04] <PacketCarriage> no GPU needed
[15:04] <JEEB> yes, unless you like expensive heaters
[15:04] <relaxed> correct
[15:04] <PacketCarriage> haha
[15:05] <PacketCarriage> those can be helpful for the cold winters yh
[15:05] <JEEB> aye, but there's cheaper ways to do it ;)
[15:05] <PacketCarriage> indeed unless the Russian decide to cut our (UK ) Gas supply
[15:05] <PacketCarriage> then we start using GPUs :P
[15:05] <PacketCarriage> lol
[15:05] <PacketCarriage> but yh anyway
[15:06] <PacketCarriage> so latest Xeons maybe
[15:06] <PacketCarriage> with good Ram
[15:06] <JEEB> yeh
[15:06] <relaxed> If I was a rich man... http://ark.intel.com/products/75290/Intel-Xeon-Processor-E5-4657L-v2-30M-Cache-2_40-GHz
[15:07] <relaxed> 12 cores, 24 threads
[15:07] <JEEB> that isn't exactly current gen
[15:07] <JEEB> and lacks f.ex. AVX2
[15:07] <PacketCarriage> so $5000
[15:08] <PacketCarriage> for the processor
[15:08] <JEEB> also depending on the use case 12 cores can be too much, as depending on your settings x264 doesn't use all of those cores well
[15:08] <PacketCarriage> I need to look into full server solutions to be honest
[15:08] <JEEB> if you have multiple encodes going then of course that will work better
[15:08] <PacketCarriage> yh I do
[15:08] <PacketCarriage> I have a multicast full of Mpeg transport streams
[15:09] <PacketCarriage> that needs to be picked one by one and transcoded
[15:09] <JEEB> but still, I'd rather favor raw speed and newer architecture instead of pure amount of cores
[15:09] <PacketCarriage> great thanks for the advice
[15:12] <relaxed> oh, v3 is the new hotness. Cheaper too  http://ark.intel.com/products/81059/Intel-Xeon-Processor-E5-2697-v3-35M-Cache-2_60-GHz
[20:48] <skyman3> can someone suggest if IRC servers are having issues?
[20:49] <skyman3> can't join channels on servers
[20:49] <c_14> Maybe you should ask in #freenode?
[20:50] <klaxa> maybe he can't join that channel
[20:50] <klaxa> skyman3, if you are in many channels already try parting one
[20:51] <skyman3> usim in this channel only
[20:51] <skyman3> im in *
[20:51] <c_14> Can you join #freenode?
[20:51] <skyman3> facing the issue since lastday
[20:52] <skyman3> u mean irc.freenode.net?
[20:52] <c_14> Nah, the channel #freenode
[20:53] <skyman3> no
[20:53] <skyman3> im now in #ffmpeg
[20:53] <c_14> I can see that.
[20:53] <relaxed> welcome
[20:54] <relaxed>  /j #freenode
[20:55] <skyman3> ok
[20:55] <skyman3> yes joined freenode relaxed
[20:55] <skyman3> thro the CMD u provided
[20:57] <skyman3> i wanted to join #linuxmint-help etc channels vide Greenbean.GeekShed.net or Neptune.GekShed.net which i cant
[20:57] <relaxed> good. maybe you need to read up on your irc client's manual
[20:57] <relaxed> which client are you using?
[20:57] <skyman3> hexchat
[20:57] <skyman3> im on Mint Mate17
[20:58] <relaxed>  /j #hexchat  (for support)
[20:58] <skyman3> had okie
[20:58] <skyman3> okie*
[20:58] <skyman3> never had such issue earlier
[21:24] <LanDi> can I record just a relangular region on the screen with ffmpeg ?
[21:24] <c_14> https://trac.ffmpeg.org/wiki/Capture/Desktop
[21:24] <c_14> Use the x and y initializers along with the video_size to draw your box.
[21:26] <LanDi> c_14: great
[21:26] <LanDi> another question... can I record an specific window ?
[21:28] <c_14> Not with the current implementation.
[21:28] <c_14> Other than adjusting the box.
[21:29] <LanDi> ok
[21:29] <LanDi> thanks
[21:37] <leopardb> Is there a way under linux to grab a specific window as input with the "x11grab" device using the window ID (or something else) without taking anything else ? and if not, is there a way to achieve such a goal ? i'm trying to stream a game, and i'd like my stream to stay on the game even when i'm looking at something else (with alt-tab).
[21:43] <c_14> None I know of.
[21:45] <LanDi> leopardb: I don't think it's possible
[21:45] <LanDi> I think using another display would be interesting for you
[21:46] <leopardb> yeah that's the only way i see :/ isn't it more taxing on the GPU to start another display ?
[21:48] <LanDi> I think it is
[21:48] <leopardb> duh >_<
[21:48] <LanDi> but I don't think it will affect your recording at all
[21:49] <LanDi> I use a ffmpeg command to record skype in
[21:49] <LanDi> skype out
[21:49] <LanDi> and my emulator area
[21:49] <LanDi> works great
[21:49] <wolfman2000> Morning/afternoon. I help maintain a project that uses...well, I lost track on what version of ffmpeg at this point. However, I think it was definitely before version 1.x.x came out. I'm now seeing that 2.4.3 is out, which sounds like a major leap. How stable is it right now, relatively?
[21:52] <c_14> Relative to a pre 1.xx version?
[21:53] <c_14> Very stable.
[21:53] <c_14> More features.
[21:53] <c_14> More bugfixes.
[21:53] <wolfman2000> Are there any API programming changes either myself or another member would have to worry about updating on our end?
[21:55] <c_14> Probably.
[21:56] <c_14> They should all be in doc/APIchanges
[21:56] <wolfman2000> if it goes back old enough, I may have a chance. I don't know if I'll be able to just say "we're using a more stable/consistent ffmpeg build" to the team, though.
[21:57] <c_14> The APIchanges file goes back to 0.6
[21:57] <c_14> The oldest date is 2009-03-01
[21:58] <wolfman2000> I'll have to hope my instinct is wrong, then. I have to wonder if we use 0.4.8 or some fork of it. Checking our repo now to better determine that.
[21:59] <wolfman2000> ......holy crap. I'm actually behind on the times. We have moved on to 2.1.3.
[22:12] <Wireless> Anyone know what could cause this error: Assertion len >= s->orig_buffer_size failed at libavformat/aviobuf.c:452
[22:16] <AndyS90> anyone have any idea on how to duplicate the first audio stream and re-encode as an aac stream to be added as an extra stream? (the rest of the file remains unchanged)
[22:21] <AndyS90> I've got " -map 0:v -c:v copy -map 0:a -c:a copy -map 0:a -c:a:1 libvo_aacenc -b:a:1 320k" so far but it seems to duplicate all the audio streams
[22:23] <c_14> ffmpeg -i input -map 0:0 -c:a:0 aac -map 0:0 -c:a:1 copy [etc]
[22:23] <c_14> assuming the 0th stream is thet audio
[22:23] <c_14> You can use -map 0:a:0 as well
[22:23] <c_14> That'll be the first audio stream.
[22:24] <c_14> The important part is the -c:a:0 and -c:a:1
[22:24] <AndyS90> ah okay, and that would copy the stream and encode it in a different format? what I've had happen is it just re-encodes the first stream rather than leaving it untouched
[22:26] <c_14> It will do both.
[22:26] <c_14> Ie encode the first stream to aac and copy it untouched.
[22:29] <AndyS90> it strangely seems to be duplicating the video stream
[22:29] <AndyS90> Stream mapping:
[22:29] <AndyS90>   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[22:29] <AndyS90>   Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))
[22:30] <c_14> Because the first stream in your input file was the video stream. Either change the -map 0:0 s to the stream id you want or use -map 0:a:0
[22:32] <AndyS90> ah okay - I see what you mean
[22:32] <AndyS90> assuming the stream was for example;     Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, bt709), 1920x800 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn,
[22:32] <AndyS90>  47.95 tbc (default)
[22:32] <AndyS90>     Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
[22:32] <AndyS90>     Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
[22:33] <AndyS90> I did -map 0:1 but that just re-encodes the first stream in-place
[22:33] <c_14> You need -map 0:1 -c:a:0 aac -map 0:1 -c:a:1 copy
[22:37] <c_14> Oh, and whatever you do, don't add another -c:a whatever, that'll (probably) override everything again. (though it might work if you have that one first and the other ones later).
[22:37] <AndyS90> ah okay, awesome - appreciate your help c_14
[22:38] <AndyS90> annoyingly though, it's not copying the stream, just re-encoding it
[22:38] <AndyS90> Stream mapping:
[22:38] <AndyS90>   Stream #0:0 -> #0:0 (copy)
[22:38] <AndyS90>   Stream #0:1 -> #0:1 (dts (dca) -> aac (native))
[22:38] <AndyS90>   Stream #0:1 -> #0:2 (copy)
[22:39] <AndyS90> oh I see, so, stream 0:1 is copied to 0:2 - how would I be able to copy "other" audio streams directly? Assuming, I don't know how many streams there are
[22:39] <AndyS90> but, I do know I always want to take the first audio stream
[22:41] <c_14> -map 0:a:0 -map 0 -c:a copy -c:a:0 aac <- might work
[22:44] <AndyS90> that's kind of there, i seem to be duplicating the video stream though; Stream mapping:
[22:44] <AndyS90>   Stream #0:0 -> #0:0 (copy)
[22:44] <AndyS90>   Stream #0:1 -> #0:1 (dts (dca) -> aac (native))
[22:44] <AndyS90>   Stream #0:0 -> #0:2 (copy)
[22:44] <AndyS90>   Stream #0:1 -> #0:3 (copy)
[22:44] <AndyS90>   Stream #0:2 -> #0:4 (copy)
[22:44] <AndyS90> my command so far; -map 0:v -c:v copy -map 0:a:0 -map 0 -c:a copy -c:a:0 aac -strict -2
[22:44] <c_14> turn -map 0 to -map 0:a
[22:44] <c_14> Or get rid of -map 0:v
[22:45] <c_14> -map 0 will map every stream
[22:45] <c_14> video, audio, data, subtitle
[22:45] <c_14> etc
[22:46] <AndyS90> ah awesome - i think that worked :D
[22:46] <AndyS90> Stream mapping:
[22:46] <AndyS90>   Stream #0:1 -> #0:0 (dts (dca) -> aac (native))
[22:46] <AndyS90>   Stream #0:0 -> #0:1 (copy)
[22:46] <AndyS90>   Stream #0:1 -> #0:2 (copy)
[22:46] <AndyS90>   Stream #0:2 -> #0:3 (copy)
[22:46] <AndyS90> however, is there a way i can push the re-encoded aac stream to the last stream ?
[22:46] <AndyS90> (apologies for all the questions)
[22:47] <c_14> Only if you know exactly how many audio streams you have.
[22:48] <AndyS90> yeah, let's say i do (trying to automate this, got a php script so i have a count of audio streams)
[22:48] <AndyS90> i'm actually doing this as the Roku doesn't support DTS unfortunately
[22:49] <c_14> Let's assume 3 audio streams, -map 0:a -map 0:a:0 -c:a copy -c:a:3 aac
[22:49] <c_14> should do it
[22:49] <AndyS90> so, -c:a:3 would put it as the 4th stream? would that be right?
[22:49] <c_14> yes
[22:50] <c_14> Well, it won't "put it", it takes the 4th mapped audio stream and encodes it to aac.
[22:50] <c_14> Since -map 0:a maps the first three, -map 0:a: maps to the fourth
[22:51] <AndyS90> i think that worked;
[22:51] <AndyS90> Stream mapping:
[22:51] <AndyS90>   Stream #0:0 -> #0:0 (copy)
[22:51] <AndyS90>   Stream #0:1 -> #0:1 (copy)
[22:51] <AndyS90>   Stream #0:2 -> #0:2 (copy)
[22:51] <AndyS90>   Stream #0:1 -> #0:3 (dts (dca) -> aac (native))
[22:51] <AndyS90> c_14 - you are awesome, appreciate your knowledge and help on this!
[22:52] <c_14> np
[23:21] <BtbN> Does ffmpeg have some functionality to continously record/restream a stream, and display a static image when the source is down, while it continously retries to open the source stream?
[23:21] <c_14> not internally, no
[23:22] <BtbN> It's a hls source, so my idea was to just make one 2 second .ts segment with the static image, and insert that every time i can't get a segment in time. But that propably causes chaos because of timestampf
[23:22] <BtbN> *timestamps
[00:00] --- Mon Nov 10 2014


More information about the Ffmpeg-devel-irc mailing list