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

burek burek021 at gmail.com
Mon Apr 8 02:05:02 CEST 2013


[00:07] <durandal_1707> hmm who created that wiki page about guidlines for high audio encoding ?
[00:30] <adms> Hello all. How can I get ffmpeg to capture playback of my current ALSA audio device? (final goal is to use the amix filter to combine it with microphone)
[00:31] <adms> something among the lines of ... ffmpeg -i hw:0,0 -i desktop_INPUT -filter_complex amix=inputs=2:duration=first:dropout_transition=3 OUTPUT
[00:31] <adms> where hw:0.0 would be my microphone
[00:33] <klaxa> you want to record your soundcard's output?
[00:39] <adms> klaxa: yes. I want to record what the output of the playback PCM device is (not the microphone)
[00:39] <adms> in order to later add it to the microphone and have both in one sound file
[00:39] <klaxa> hmm sorry, i don't know how to do that with alsa
[00:40] <klaxa> https://bbs.archlinux.org/viewtopic.php?id=147852
[00:40] <klaxa> maybe that thread helps a little
[00:42] <adms> ALSA duplexing isn't very fast/efficient though, there's no way of assuming the output is the input?
[00:43] <klaxa> no idea, i'm not an alsa expert :/
[00:44] <klaxa> i do this stuff with pulseaudio, it adds a lot of overhead, but the abstraction makes things like this easier
[00:44] <adms> with alsa duplicating it'll wind up about as slow as pulse XD
[00:51] <adms> did a quick set up of what you're suggesting, testing now
[02:22] <adms> klaxa: having trouble getting that .asoundrc working. when I run speaker-test I get
[02:22] <adms> ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable Broken configuration for playback: no configurations available: No such file or directory Setting of hwparams failed: No such file or directory
[02:23] <klaxa> like i said i have no idea how to use alsa
[02:56] <schtinky> I've been using "gnutv blah -out stdout channel | ffmpeg -i - images%9d.png" to grab images from my digital tuner card...
[02:58] <schtinky> recently, I was on here and learned about using "ffmpeg -vsync -i testfile.mpg -vf "select=eq(pic_type\,I)" images%9d.png" instead
[02:58] <schtinky> both methods work as expected on static input video, with the non-filtered way taking about 5x more processor (although not too much for a modern computer)
[02:59] <schtinky> the non-filtered way also works fairly well grabbing live images from the tuner card, although broken pipes are occassionally a problem and sometimes ffmpeg will create thousands of images very quickly in a sort of hiccup of the stream
[03:00] <schtinky> unfortunately the filtered method above always immediately goes to broken pipe when trying to "gnutv blah -out stdout channe | ffmpeg -vfr etc"
[03:00] <schtinky> just wondering if anyone has advice on either how to get the live stream non-filtered way to be more consistent (without broken pipes or the hiccup I described above)
[03:01] <schtinky> or how to make the filtered method work properly on a piped live stream
[03:42] <c4nuck> hey guys
[03:44] <c4nuck> i'm trying to encode x264 with ffmpeg and libx264. The video source is 1920x1080. I need to crop 20 off the top and 20 off the bottom. from what i understand -crop=left:top:right:bottom
[03:44] <c4nuck> but for some reason ffmpeg is expecting the source or cropped resoultion for the first two ??
[03:44] <c4nuck> any help would be appreciated
[03:46] <klaxa> if in doubt use ffmpeg's cropping with -vf
[03:46] <klaxa> https://ffmpeg.org/ffmpeg-filters.html#crop
[03:47] <c4nuck> http://pastie.org/private/3h7yjwqd538uku6mea2a
[03:48] <klaxa> cropping is not done the way you think:
[03:48] <klaxa> >This filter accepts a list of key=value pairs as argument, separated by ’:’. If the key of the first options is omitted, the arguments are interpreted according to the syntax out_w:out_h:x:y:keep_aspect.
[03:49] <klaxa> so try crop=1920:1040:0:20
[03:49] <c4nuck> hmm
[03:49] <c4nuck> i'll give it a shot
[03:50] <c4nuck> crop=in_w-0*0:in_h-2*20
[03:50] <c4nuck> would do the same ?
[03:50] <klaxa> not sure
[03:51] <klaxa> because a) parenthesis, b) would probably start at 0:0 as in: crop=1920:1040:0:0
[03:51] <klaxa> i.e. crop 40 pixels from the bottom
[03:51] <c4nuck> oh okay
[03:52] <c4nuck> so your thinking the 20 will tell it to crop 20 from each top and bottom
[03:52] <klaxa> never really used the crop filter though, i could be wrong
[03:52] <c4nuck> worth a shot
[03:52] <klaxa> as you can see from the documentation, the crop filter takes the arguments as: out_w:out_h:x:y:keep_aspect
[03:53] <klaxa> so you give it the resolution of your output first (1920:1040) then where the top left corner of that selection is (0:20)
[03:53] <c4nuck> makes sense
[03:54] <c4nuck> i'll let you know how i make out
[03:54] <c4nuck> thanks
[03:54] <klaxa> you could do a short test encode with -t 10
[03:55] <klaxa> and see if the crop filter was applied correctly before encoding everything
[03:55] <c4nuck> ya i cut out a 1 minute section i'm testing it on
[03:59] <c4nuck> yup worked great
[03:59] <c4nuck> thanks!
[03:59] <klaxa> nice :)
[04:16] <c4nuck> kde sure didn't like wahtever i did there :P
[04:53] <burek> schtinky, "filtered" way, that you described above, is different than piped way you shown in that the filtered way grabs only I-frames
[04:54] <burek> select=eq(pic_type\,I) tells you that
[04:54] <burek> thus "non-filtered way taking about 5x more processor" is expected, since it processes all frames
[04:56] <burek> btw, you might avoid gnutv by using something like: ffmpeg -f v4l2 -i /dev/dvbdevice
[04:56] <burek> or something
[04:57] <burek> which would solve your issues with pipes too
[04:58] <burek> adms, try ffmpeg -f alsa -i dmix
[04:58] <schtinky> thanks, burek
[04:58] <schtinky> I'll try it the non-piped way. I've been looking for a solution to that whole mess
[05:44] <bigmac> i have encoded a video along time ago and achieved a small file size of 77MB. . . i cant remember how i did this
[05:45] <bigmac> maybe some one can help me decrease file size output with this example command
[05:45] <bigmac> ffmpeg -i 'file.mp4' -vcodec libx264 -preset veryfast -crf 25 -s 480x320 -threads 0 /var/www/output.mp4
[06:25] <c4nuck> bigmac, the higher the -crf number the lower the quality and lower filesize i'd imagin
[06:42] <klaxa> you can also decrease filesize by using a more exhaustive preset like slow or veryslow
[06:50] <relaxed> o/
[06:50] <klaxa> \o
[06:50] <klaxa> literal o
[06:55] <bigmac> klaxa: vpre ? -apre ?
[06:55] <klaxa> -preset slow
[06:55] <klaxa> or -preset veryslow
[06:55] <klaxa> if those are not recognized by your ffmpeg version, update to a recent one
[06:56] <bigmac> it worked. can i see a estamated output file size (preview?)
[06:56] <klaxa> not really
[06:58] <bigmac> my last output file was 210.mb... and now i add preset veryslow to see the end results
[07:00] <relaxed> bigmac: that's determined by the rate control
[07:00] <bigmac> rate?
[07:00] <klaxa> oh wait... right, my bad :X
[07:00] <klaxa> quality will be better though :S
[07:00] <klaxa> actually disregard everything i said
[07:00] <klaxa> i'm too tired to make useful comments
[07:01] <relaxed> bigmac: read about two pass https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
[07:01] Action: relaxed tucks klaxa in
[07:01] <klaxa> thanks
[07:02] <bigmac> -crf  higher value?
[07:02] <bigmac> makes the video kinda ugly any higher
[07:02] <relaxed> READ
[15:56] <megaTherion> hello
[15:57] <megaTherion> http://dpaste.com/1050087/ <- I simply want that 1:2 will be 0:2 and not 0:5 in the output file - what's the correct -map syntax?
[16:00] <megaTherion> my paste is quite clear actually but nevermind
[16:00] <burek> no it's not
[16:01] <burek> if you want help, please paste the entire log
[16:01] <megaTherion> can you at least tell me how to manipulate the mapping of the >output< file? I guess that's all I want to do
[16:01] <burek> what you pasted implicates you didn't specify any -maps, which requires to see what you are trying to do
[16:01] <burek> in order to give you a proper answer
[16:02] <burek> ok
[16:02] <megaTherion> then you're wrong I did specify -map's
[16:02] <burek> you do something like this
[16:02] <megaTherion> but well ok I'll repaste the command
[16:02] <burek> ffmepg -i .. -i .. -map 0.0 -map 1.2 -map 0.1 -map 0.2 -map 0.3 ... output
[16:03] <megaTherion> why dot's?
[16:03] <burek> did you read the docs?
[16:03] <megaTherion> anywhere else it's showed as -map 0:0 -map 1:2
[16:03] <megaTherion> yes I did
[16:03] <megaTherion> I did -map 0 -map -0:2 -map 1:2
[16:04] <megaTherion> which by the docs says, everything from file a except stream 2 and stream 2 from file 1
[16:04] <megaTherion> err file b in this case
[16:04] <burek> oh
[16:04] <burek> right
[16:04] <burek> : instead of . sorry
[16:04] <burek> -map 0 will map entire 0th input
[16:04] <megaTherion> but instead the 2nd audio stream from file b became's the stream 0:2 in the output, it becomes 0:5
[16:04] <burek> 0=1st input
[16:05] <burek> can you please paste what i asked
[16:05] <burek> so we can shorten this
[16:05] <burek> :)
[16:06] <megaTherion> http://pastebin.com/77m96uJ5
[16:06] <megaTherion> that's what the arguments look like
[16:12] <megaTherion> burek: so?
[16:13] <burek> replace "-map 0 -map -0:2 -map 1:2" with "-map 0:0 -0:1 -map 1:2"
[16:13] <burek> wow wait
[16:13] <burek> replace "-map 0 -map -0:2 -map 1:2" with "-map 0:0 -map 0:1 -map 1:2"
[16:14] <burek> you get the idea
[16:14] <megaTherion> burek: thanks, that actually works good but it skips all the other streams
[16:14] <burek> the order of your -maps in the cmd line makes the order of streams at output
[16:14] <burek> so, play around
[16:14] <burek> well, if you want them all
[16:14] <burek> add them
[16:14] <megaTherion> ah ok
[16:17] <megaTherion> burek: well the other's are subtitles, I've to keep them
[16:19] <burek> -map 0:0 -map 0:1 -map 1:2 -map 0:3 -map 0:4 -map 0:5
[16:20] <megaTherion> tried
[16:21] <megaTherion> but then I get a different error: 'Could not write header for output file #0 (incorrect codec parameters ß): Operation not permitted'
[16:21] <megaTherion> well I just did -scodec copy
[16:21] <megaTherion> I dont want to manipulate thema
[16:21] <megaTherion> -a
[16:21] <megaTherion> ah nevermind, Im stupid - I specified mp4 and it should be mkv
[16:22] <megaTherion> burek: works now - thanks for your help
[16:23] <burek> :beer: :)
[18:03] <JodaZ_> does ffmpeg support splicing in subtitles yet ?
[19:03] <mastro> I've encoded a video with ffmpeg into a matroska using x264. Then I streamed it to my PS3 via DLNA using PS3MediaServer (which re-encode on the fly using TsMuxer or Mencoder). I don't know exactly how to describe it but the video keep stopping itself then resuming, very often. Can you suggest a setting to encode the video for PS3? maybe this is just a quality issue but I do not think so... I've another MKV with high qual
[19:03] <mastro> ity and x264 codec that has no issue at all
[19:53] <brontosaurusrex> mastro, what does google say?
[20:01] <LithosLaptop> my guess the bitrate is too high
[20:02] <LithosLaptop> bitrate spikes at key frames might cause it to buffer
[20:02] <LithosLaptop> but I am no expert
[20:02] <LithosLaptop> :)
[20:29] <Granjow> Hello! In which cases must -qscale be > 0?
[20:31] <Granjow> I used -qscale 0 and it always worked, but now I received a bug report that this fails on 0.8.6: http://codepad.org/fzHBMuJ8
[21:13] <kippi> hey
[21:14] <kippi> is there away to output frame rate changes to a file?
[21:48] <gp> kippi: what do you mean?
[21:50] <gp> You can use ffprobe to output all sorts of information about the video to a file.  Including frame rate
[21:51] <kippi> if it's a live stream?
[21:52] <ubitux> JodaZ_: splicing subtitles?
[21:52] <JodaZ_> softsub -> hardsub ya kno
[21:52] <ubitux> ha, hardsubbing
[21:52] <ubitux> yeah you can use -vf subtitles for that
[21:52] <JodaZ_> for live sreaming ya kno
[21:52] <JodaZ_> *streaming
[21:53] <ubitux> and you have an overlay trick for bitmap subs as well
[21:53] <gp> kippi: I don't think so
[21:54] <JodaZ_> do i still need segmenter for splitting up stuff for apples http live streaming or can ffmpeg do that on its own by now somehow ?
[21:56] <ubitux> you can use the segmenter or you can use the hlsenc
[21:56] <ubitux> mostly equivalent
[21:56] <JodaZ_> so the thing is in ffmpeg's code tree now ?
[21:57] <ubitux> yes
[21:57] <ubitux> what's the problem with the segmenter though?
[21:58] <JodaZ_> no real problem, but it felt kinda hackish and i'd hate to depend on it for code i am yet to write
[21:58] <ubitux> ah.
[21:58] <JodaZ_> but how does it work anyways, i mean how does it split the file by seconds ?
[21:59] <ubitux> hlsenc will mostly do the same as the segmenter
[21:59] <JodaZ_> but how did segmenter do it?
[22:01] <ubitux> when it reaches a duration it creates a new file?
[22:02] <ubitux> i don't understand the question
[22:02] <JodaZ_> what boundary does it split on ?
[22:03] <llogan> JodaZ_: have you read the docs yet?
[22:03] <ubitux> http://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment
[22:03] <JodaZ_> llogan, which ones ?
[22:03] <llogan> http://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment
[22:03] <ubitux> :)
[22:04] <llogan> see "segment_time"
[22:05] <viric> anyone using avxsynth?
[22:12] <JodaZ_> llogan, hmm, i don't fully understand it, how would i for example start a transcode of the third 10s segment of a file ?
[22:23] <JodaZ_> ubitux, seems this inbuilt hlsenc does only encode a video/stream from the start on and theres no way to generate segments "on demand"
[22:32] <ubitux> JodaZ_: the hlsenc is a muxer invented by the fork to not do the same as ffmpeg (basically using the segmenter)
[22:33] <ubitux> just use the segmenter unless you have a problem with it
[22:33] <JodaZ_> the fork ?
[22:38] <JodaZ_> ubitux, i haven't actually used segmenter before, i used one of those server tools that did it all for me (air video server), and they seem to be able to a transcode from any point in time in the file onwards, however using segmenter or this hlsenc i see no description of how to do that
[23:11] <saste> ubitux: the segmenter muxer also was "invented" by the fork BTW
[23:33] <CampinSam> so I imagine this comes up often... but I'm trying to stream with this guide/script: http://peerwire.de/?p=248 ... And while my video works just fine, my audio doesn't work, with this error (assuming it's an error): [alsa @ 0x62e100] ALSA buffer xrun
[23:37] <gp> Anyone have any tips on getting ffmpeg on amazon linux?
[23:44] <JodaZ_> xD if you say "the fork" all i hear is "he who must not be named"
[23:44] <durandal_1707> its Libav fork
[23:45] <JodaZ_> durandal_1707, yes, i know
[23:45] <gp> If you were talking to me, then no I don't want the fork
[23:50] <IamTrying> Why its not cutting the original ? $ ffmpeg -sameq -ss 00:20:00 -t 00:03:54 -i 0kxj_99g1mc.flv BabyBaby.MaybeMaybe.flv
[23:52] <IamTrying> durandal_1707, -vcodec copy and -acodec copy also does not work if i ommit the -sameq
[23:53] <IamTrying> OK - found it its the -ss 00:20:00 should be -ss 00:00:20
[00:00] --- Mon Apr  8 2013


More information about the Ffmpeg-devel-irc mailing list