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

burek burek021 at gmail.com
Tue Feb 24 02:05:01 CET 2015


[03:28] <kolix> hey guys..quick question
[03:29] <kolix> I'm getting a remote mp4 with wget -q -O - and i want to pipe this into ffmpeg to rencode it for mobile/ios devices html5 video
[03:29] <kolix> can someone help me with the command?
[03:29] <kolix> wget -q -O - | ffmpeg -i - ... pipe:1 ?
[03:29] <klaxa> ffmpeg -i - should work just fine
[03:30] <klaxa> or is that not what you are struggling with?
[03:30] <c_14> Note that with some mp4s, you might need to download most or all of the mp4 before you can start decoding it.
[03:30] <klaxa> oh right, that's a thing too
[03:30] <kolix> I'm struggling with rencoding the remote mp4 for ios devices
[03:31] <c_14> x264, aac audio, profile main (maybe baseline depending on the device)
[03:31] <c_14> Think it's mentioned on the wiki
[03:31] <kolix> that's not possible for me
[03:31] <kolix> i'm "streaming" it
[03:32] <kolix> just need to rencode it on-the-fly so it plays on my mobile devices
[03:33] <c_14> for ios you'll need an hls server
[03:34] <kolix> well what's the command to get mp4's happy for mobile devices?
[03:34] <c_14> ffmpeg -i in.mp4 -c:v libx264 -profile:v baseline -level 3.0 -c:v aac -strict -2 out.mp4
[03:35] <c_14> Will give you basic support for pretty much everything.
[03:35] <kolix> THANK YOU
[03:35] <kolix> c_14, if i want to write to stdout it would be pipe:1 instead of out.mp4, correct?
[03:37] <c_14> you can't pipe non-fragmented mp4, the muxer doesn't support non-seekable output (because of limitations in the mp4 format)
[03:37] <c_14> And if you fragment, you'll lose support on many devices/software.
[03:39] <kolix> hmm
[03:39] <kolix> any ideas on what i can do?
[03:39] <kolix> tee maybe?
[03:39] <c_14> tee still isn't seekable
[03:40] <c_14> You're trying to get the encoding to your device while it's being encoded?
[03:41] <kolix> I might be able to avoid ffmpeg entirely....here's my siutation...
[03:41] <kolix> i was able to view the mp4 on my iphone when it was just sitting on the remote server like http://example.com/video.mp4.
[03:42] <kolix> however
[03:43] <kolix> my ip address was the only ip able to view the video so i had to set up a webserver on my machine and pipe the wget command to the http response
[03:43] <kolix> so maybe it's just a headers issue?
[03:49] <c_14> If only your ip can access it, and it's not program/browser bound. It sounds like the web server is whitelisting/blacklisting.
[04:08] <Moonlightning> So I've got some videos here that may have different audio on the left and right speaker channels at some points.
[04:08] <Moonlightning> I've been using `ffmpeg -i $infile -ac 1 $outfile` to convert to mono audio, making the channels the same
[06:45] <Moonlightning> It's taking a while, though.
[06:46] <Moonlightning> Might `ffmpeg` be reencoding the video, too?
[06:48] <Moonlightning> I'm trying to make these go as fast as possible. Ideally I'd be able to run them through `ffmpeg` before they're finished downloading, watch before `ffmpeg` is done with them.
[07:38] <grepper> Moonlightning: you can use -c:v copy to copy the video
[09:04] <guruqu> Hi all
[09:04] <guruqu> If I push through Mpeg TS udp packets through a TCP connection
[09:06] <guruqu> Would client still be able to play back this Mpeg TS?
[09:22] <retry> Hi all, is there some difference between 32 & 64bit version in using arguments? I have wrapper for 32bit version, Can I replace 32bit binary(use case on 64bit machine)
[12:31] <cousin_luigi> Greetings.
[15:19] <gcl5cp> how do i log ffmpeg filtered console information? i usually use "cmd |grep pattern >> ffm.log"
[15:20] <gcl5cp> "ffmpeg ... |grep pattern >> ffm.log" do an empty file
[15:21] <relaxed> console output is sent over stderr
[15:22] <relaxed> you can sens all of ffmpeg's output with ffmpeg -i input ... output 2>ff.log
[15:23] <relaxed> or send it along with stdout with ... output 2>&1 | do domething
[15:31] <Moonlightning> Thanks, grepper
[19:26] <rafael2k> people, are you aware of anyone working in a free software USAC/xHE-AAC decoder?
[19:27] <rafael2k> or at least supporting it in ffmpeg by using the available reference code
[20:46] <rafael2k> xHE-AAC is also used for terrestrial radio broadcasting in the DRM standard...
[20:50] <rafael2k> btw, the reference USAC encoder is here: http://www.itscj.ipsj.or.jp/sc29/open/29view/29n12756att.zip
[21:08] <llogan> rafael2k: submit a patch to the ML, or a feature request on the bug tracker
[21:13] <rafael2k> llogan: ok!
[21:24] <click_> hey, I just did: git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg &&  cd ffmpeg/  && sudo ./configure --enable-encoder=libx264 --enable-libass                        and I get: ERROR: libass not found using pkg-config
[21:25] <click_> this is following this: https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
[21:25] <click_> I've done it before but it seems to be failing right now. Any idea why?
[21:30] <click_> anybody there?
[21:33] <c_14> Do you have libass installed? On debian related distros it's libass-dev
[21:33] <c_14> What does pkg-config --libs --cflags libass print?
[21:35] <click_> oh, I was understanding that it would fetch libass from some other repository
[21:36] <c_14> Nah, still have to do that manually.
[21:36] <llogan> you don't need sudo for configure
[21:36] <click_> ah cool, thanks for helping me out
[21:36] <c_14> that too
[21:36] <click_> ah, my inexperience is showing :$
[21:50] <click_> well it's been compiling for a while now, so thanks llogan and c_14! :) (I had forgotten how long this took)
[21:51] <cartwright> I'm trying to make a clip of an mkv by using `ffmpeg -ss 00:04:34.000 -t 00:00:09.500 -i originalvideo.mkv -c:v copy -c:a copy -c:s copy clip.mkv` how would I copy the font attachments as well?
[21:51] <llogan> click_: i've never seen anyone use --enable-encoder=libx264. usually it's just --enable-libx264
[21:52] <llogan> cartwright: remove the -c:* options and use -c copy to copy all stream types.
[21:52] <llogan> and add -map 0 to copy all streams (default will copy one stream per type)
[21:54] <cartwright> yeah that worked thanks
[22:06] <shevy> anyone happens to know if ffmpeg has a de-colourize filter? e. g. to make a video only black white
[22:10] <kepstin-laptop> shevy: probably a couple ways of doing it, "-vf format=pix_fmts=gray" is likely the simplest.
[22:11] <shevy> aha I will look into that, thanks
[22:11] <cartwright> llogan: how about if I want to make a clip but encode the video and audio, copy subtitles and copy font attachments? do I still use -map?
[22:12] <kepstin-laptop> could use e.g. the colorchannelmixer to do it, there's an example (and that allows you to tweak which colours have influence)
[22:14] <kepstin-laptop> shevy: if you feel like doing something really clever, you could use haldclut, that would allow you do do the greyscale conversion on an example image in e.g. photoshop and apply the result on the video. That's getting a bit advanced tho :)
[22:15] <cartwright> hrm seems I do
[22:19] <z3bra> Morning everyone!
[22:19] <z3bra> I'm trying to make a simple compilation with ffmpeg. I just need to know this
[22:20] <click_> good evening over here ;)
[22:20] <z3bra> Can ffmpeg join videos AND put transitions (fade out/in) between them?
[22:21] <z3bra> I'm not searching a single magic command, but maybe, first add fade in to all videos, then add fade out, and finally concat
[22:21] <z3bra> hi click_, how are you doin' ?
[22:21] <click_> quite well :) almost leaving (I'm no expert)
[22:21] <z3bra> okay, no problem ;)
[22:21] <click_> although for your question, a quick search got me this: http://stackoverflow.com/a/9155479
[22:22] <z3bra> Oh cool !
[22:22] <z3bra> I was already aware of the "concat" filter, to concatenate vids
[22:22] <z3bra> that might help a lot, thanks
[22:22] <click_> cool :)
[22:25] <c_14> z3bra: it'll work, but it might need a bit of pokery
[22:25] <z3bra> that's not a problem :)
[22:25] <z3bra> only then end result count
[22:26] <z3bra> My end goal is to create a script doing: "ffcompile /path/to/directory"
[22:26] <c_14> Look at the fade filter, and the concat filter/demuxer
[22:27] <z3bra> can ffmpeg add overlay text too?
[22:27] <c_14> yes
[22:28] <z3bra> cool :)
[22:28] <c_14> the drawtext filter iirc
[22:28] <z3bra> I guess that will not be hard to find how
[22:28] <z3bra> thanks!
[22:30] <z3bra> I hope the quality will not be lowered too much.
[22:30] <z3bra> cause I'm working with webms here
[22:30] <z3bra> and it looks like webm is a "delicate" format for ffmpeg
[22:30] <c_14> If you use decent settings, it shouldn't be too bad.
[22:31] <z3bra> I usually set the bitrate to 5M
[22:31] <kepstin-laptop> well, quality deteriorates with each lossy encode, so just make sure to do everything in a single ffmpeg pass (or use a higher quality or lossless intermediate format)
[22:31] <c_14> If you have multiple steps though, you might want to think about making all intermediate states lossless.
[22:31] <z3bra> how do you do that?
[22:37] <cartwright> Hrm I'm trying to make a webm clip from a mkv video, but burning in the subtitles, I tried -vf "ass=assfileextractedfrommkv" and -vf "subtitles=mkvfile" but it seems neither can burn in subtitles from the start point of the clip, the subtitles start from the start of the original mkv
[22:37] <cartwright> is this not possible?
[22:38] <c_14> move -ss after -i file
[22:38] <c_14> It'll take longer, but it'll work
[22:38] <kepstin-laptop> alternately, you might be able to use -itsoffset (with the same value as -ss).
[22:38] <c_14> You can also try playing around with setpts, but never really got that to work
[22:41] <z3bra> ok so now I know how the fade filter works. But how do I get the number of frame in a video for use with the fadeout effect?
[22:41] <z3bra> ffmpeg -i video.webm doesn't seems to provide it
[22:41] <c_14> ffprobe -count_frames -somethingorother
[22:42] <z3bra> ah, didn't know it was so simple ^^
[22:42] <c_14> try -show_streams
[22:42] <c_14> There should be a frames tag there
[22:42] <cartwright> c_14: what's different about -ss after -i and why does it take longer? (I'm just curious.)
[22:43] <z3bra> ah
[22:43] <z3bra> nb_frames=N/A
[22:43] <c_14> z3bra: nb_read_frames should have a number
[22:44] <c_14> cartwright: after -i it has to decode the entire stream up to that point, before it doesn't
[22:44] <z3bra> oh yeah, didn't see it
[22:44] <z3bra> thanks
[22:44] <cartwright> oh okay
[22:44] <cartwright> gotcha
[22:44] <cartwright> and yeah that worked :D
[22:44] <cartwright> thanks
[22:44] <c_14> z3bra: -show_entries stream=nb_read_frames
[23:19] <LiaoTao> Hello! I'm getting some stuttering and unsynced output from x11grab when grabbing maximized OpenGL applications. It also seems to make the in-game mouse input stutter at a constant rate proportional to the cursor speed. The problem goes away if I enable the in-game vsync, but it affects performance quite a lot and I'd like to avoid it.
[23:20] <LiaoTao> Is this related to ffmpeg, or should I try troubleshooting the WM and graphics drivers instead?
[23:20] <c_14> depends, if the output framerate of ffmpeg is fine it's wm/graphics
[23:21] <LiaoTao> The output video does not correspond to what is captured. It slows down to a halt and then speeds up momentarily to catch up to the current position
[23:22] <LiaoTao> Or rather, it does not correspond to what is supposed to be captured
[23:42] <LiaoTao> Right, so I've double checked and the output framerate is lower whenever the game is in focus
[23:42] <c_14> Your cpu might not be able to handle rendering the game as well as capturing and encoding it.
[23:43] <LiaoTao> My CPU is not saturated according to top
[23:43] <c_14> Is ffmpeg outputting any interesting info/warnings?
[23:43] <c_14> What version are you running?
[23:43] <Mavrik> Considering the fact he's talking about "V-sync lowering performance"
[23:43] <Mavrik> that probably means he's attempting significantly more than 60fps
[23:44] <Mavrik> Which makes it easy to just kill the GPU bandwidth with capture
[23:44] <Mavrik> Hence the slowdowns.
[23:44] <LiaoTao> I'm using N-70141-g4d1b017, built from git just now on Gentoo
[23:44] <c_14> LiaoTao: do you have threads enabled?
[23:44] <LiaoTao> Yes, with -threads 0 specified
[23:44] <Mavrik> Transferring fullsized frames at 60fps+ over PCIe from VRAM to DRAM will interefere with OGL operation and will not work fast.
[23:44] <LiaoTao> No interesting warnings
[23:45] <Mavrik> That's why CPU is not saturated either.
[23:45] <LiaoTao> So it's a fundamental limitation of the way x11grab works?
[23:46] <LiaoTao> GPU is GF460GTX, by the way
[23:46] <pzich> of how fast your computer can grab
[23:47] <Mavrik> LiaoTao, it's the fundamental limitation of how fast your hardware can grab.
[23:48] <Mavrik> LiaoTao, unless you have a 600+ series GPU which can grab + encode directly on the card instead of transferring everything to DRAM
[23:48] <LiaoTao> But what is the big difference between doing this on Windows and Linux, when it works splendidly on the former?
[23:49] <pzich> so it works fine on the same hardware booted into windows, but stutters on linux?
[23:49] <LiaoTao> Yes
[23:49] <Mavrik> Probably driver difference or capture method.
[23:49] <Mavrik> Hard to say.
[23:49] <LiaoTao> I get some 120fps in TF2 while not grabbing here under Linux
[23:50] <LiaoTao> Even with ffmpeg going on 100% CPU it's not dipping any lower, just stuttering like mad
[23:50] <pzich> right, the bottleneck is not the CPU
[23:52] <llogan> z3bra: ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:nw=1 input.mkv
[23:52] <LiaoTao> When grabbing and encoding at 30fps, the video is slightly speeded up on playback, when doing the same at 60fps it's going at Benny Hill speed
[23:53] Action: llogan plays "Yackety Sax"
[23:53] <z3bra> llogan, I have the command I wanted already :)
[23:53] <z3bra> but thanks!
[23:53] <LiaoTao> While the game always stutters at a constant rate (without in-game fps counter going below 120)
[23:53] <llogan> i just threw that out there because i used it earler today
[23:54] <LiaoTao> So it seems to me it's only grabbing at a certain rate, but you'd think bandwidth being saturated would affect the FPS? Maybe the counter's just broken
[00:00] --- Tue Feb 24 2015


More information about the Ffmpeg-devel-irc mailing list