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

burek burek021 at gmail.com
Mon Oct 27 02:05:02 CET 2014


[00:12] <deivor__> Hi
[00:13] <deivor__> Does anyone know which AAC library uses the least CPU (live encoding) ? I'm using a raspberry pi and I hit about 30% CPU when encoding from ALSA -> AAC (mono, 64kbps). I'm currently using the native AAC library, but could compile fdk_aac or libfaac
[00:16] <BtbN> try it?
[00:16] <BtbN> fdk with afterburner disabled might be the best, but seriously, just try it.
[00:18] <Lac3rat3d> i'm trying to burn in subtitle stream to video stream, but it's not working. anyone have experience/ideas?
[00:18] <Lac3rat3d> ok hang on
[00:19] <deivor__> @BtbN Ok, I was asking because I'm fiddling with the cross-compiling options and it takes some time to get it right
[00:21] <Lac3rat3d> c_14: http://www.pastebin.com/Bd4H9Vr9
[00:24] <Lac3rat3d> any ideas?
[00:26] <Lac3rat3d> Assertion fs->on_event failed at /home/kyle/software/ffmpeg/source/ffmpeg-git/li
[00:26] <Lac3rat3d> bavfilter/framesync.c:276
[00:26] <Lac3rat3d> that error seems like there is a hardcoded path
[00:26] <c_14> Lac3rat3d: https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideoy <- that's what you're looking for
[00:27] <Lac3rat3d> ya that's the tutorial i used
[00:27] <c_14> that location is compile-time, ie where the loc was when you compiled
[00:27] <Lac3rat3d> i didn't compile it
[00:27] <Lac3rat3d> it was precompiled
[00:27] <c_14> subrip are text iirc
[00:28] <c_14> Therefore, don't use the overlay filter, use the subtitle filter.
[00:28] <Lac3rat3d> i got it from here: http://ffmpeg.zeranoe.com/builds/
[00:28] <deivor__> BtbN you meant that I should disable afterburner at runtime or compile time?
[00:28] <Lac3rat3d> can you give me an example of what you mean?
[00:29] <c_14> ffmpeg -i mkv -vf subtitles=mkv out.mkv
[00:29] <Lac3rat3d> that will burn the subtitles from stream 0:3 into stream 0:0?
[00:29] <c_14> That will burn the first subtitle track it finds in the file 'mkv' into the first video stream it finds
[00:30] <c_14> Which should be what you want judging by the ffmpeg output.
[00:30] <Lac3rat3d> sweet
[00:30] <Lac3rat3d> i'll try it out
[00:30] <Lac3rat3d> thanks, brb
[00:30] <Lac3rat3d> yes, that's exactly what i nt
[00:30] <Lac3rat3d> *want
[00:31] <Lac3rat3d> didn't work :/
[00:31] <c_14> what's it say?
[00:31] <Lac3rat3d> [Parsed_subtitles_0 @ 0000000002c4ec00] Unable to open mkv
[00:31] <Lac3rat3d> [AVFilterGraph @ 0000000002af7cc0] Error initializing filter 'subtitles' with ar
[00:31] <Lac3rat3d> gs 'mkv'
[00:31] <Lac3rat3d> Error opening filters!
[00:32] <c_14> that 'mkv' is supposed to be the name of the input file
[00:32] <Lac3rat3d> ohh, my bad
[00:32] <c_14> The current ffmpeg api for burning subtitles is -sadly- a tad awkward.
[00:33] <Lac3rat3d> hmm it's doing something...
[00:33] <Lac3rat3d> Fontconfig error: Cannot load default config file
[00:33] <Lac3rat3d> [Parsed_subtitles_0 @ 00000000054cd3a0] No usable fontconfig configuration file
[00:33] <Lac3rat3d> found, using fallback.
[00:33] <Lac3rat3d> Fontconfig error: Cannot load default config file
[00:33] <c_14> You on windows?
[00:33] <Lac3rat3d> yea
[00:33] <deivor__> try limiting the output movie length to test faster (-t 2:00 for 2 minutes)
[00:33] <c_14> ugh, where was that htread again
[00:34] <Lac3rat3d> seems like it's frozen now
[00:34] <c_14> http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=10&t=318&start=20 <- this one i think...
[00:35] <Lac3rat3d> what am i looking for?
[00:36] <deivor__> Is there any way to disable *everything* when building ffmpeg but certain things? I only need x264, flv (wrapper), AAC and the internal RTMP library. Or do I need to add --disable-{each thing} ?
[00:41] <c_14> Lac3rat3d: I think it's the response from camelotmsl which describes creating a fonts.conf on windows
[00:41] <c_14> deivor__: --disable-everything or --disable-all
[00:42] <Lac3rat3d> ok, i'll try it out. thanks c_14, i'll post back later
[00:43] <deivor__> Thanks c_14
[00:44] <deivor__> BtbN, fdk_aac with -afterburner 0 uses 13% of the CPU instead of 24% (vs ffmpeg's internal aac), it's a huge improvement
[00:44] <BtbN> how much does it use with afterburner enabled?
[00:44] <deivor__> 24%, just like aac
[00:46] <deivor__> I'm currently using the PI for live rtmp streaming (720p at 30fps with the HW camera) and displaying a slideshow (hw accelerated).. in some cases (fast-forward through slideshows) the cpu peaks and lags the stream. I'm trying to minimize the peaking problem
[00:48] <deivor__> ATM with the rtmp streaming and aac audio from ALSA (bt microphone) it's using 22.6% CPU which is fantastic
[00:50] <Lac3rat3d> c_14: i made those env variables, and the file. it's not throwing the error anymore
[00:50] <Lac3rat3d> but i don't know if it's actually doing something lol
[00:51] <c_14> Is it burning cpu?
[00:51] <Lac3rat3d> barely
[00:51] <c_14> Is the framecount updating?
[00:52] <c_14> At the bottom of the ffmpeg output?
[00:52] <Lac3rat3d> nope
[00:52] <Lac3rat3d> just frozer this:
[00:52] <Lac3rat3d> Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
[00:52] <Lac3rat3d>     Stream #0:2(ind): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (de
[00:52] <Lac3rat3d> fault) (forced)
[00:52] <Lac3rat3d>     Stream #0:3(eng): Subtitle: subrip (default) (forced)
[00:52] <Lac3rat3d>     Metadata:
[00:52] <Lac3rat3d>       title           : English-Forced
[00:52] <c_14> Press h 2-3 times
[00:52] <Lac3rat3d> nothing
[00:54] <c_14> hmm, not sure that works under Windows but it was worth a shot
[00:54] <c_14> Can you pastebin your command line and all current output?
[00:54] <Lac3rat3d> yep
[00:54] <Lac3rat3d> hang on
[00:55] <Lac3rat3d> http://pastebin.com/1ACCDAVP
[00:55] <c_14> eeeeeep
[00:56] <c_14> Don't tell me the input and output filename is the same?
[00:56] <c_14> ok, it isn't
[00:56] <c_14> nvmd
[00:56] <c_14> just very similar
[00:56] <Lac3rat3d> ya, output has 2 at the end
[00:57] <c_14> Hmm, can you cancel that command and try again with -loglevel debug ?
[00:57] <c_14> then pastebin that?
[00:57] <Lac3rat3d> sure
[00:57] <Lac3rat3d> oh wait!
[00:57] <Lac3rat3d> it's doing something now
[00:57] <Lac3rat3d> !!
[00:57] <c_14> ok
[00:57] <c_14> slow io?
[00:57] <Lac3rat3d> i just left it at that piont where it seemed frozen this whole time
[00:57] <Lac3rat3d> meh, ide hdd
[00:57] <Lac3rat3d> shouldn't be that slow
[00:57] <Lac3rat3d> but still
[00:57] <Lac3rat3d> it's doing something now
[00:57] <Lac3rat3d> lots of output
[00:57] <c_14> Lots of hex output?
[00:57] <Lac3rat3d> yep
[00:58] <c_14> You can probably press h until it goes away
[00:58] <Lac3rat3d> green, yellow, purple
[00:58] <c_14> That's what I was trying to accomplish earlier.
[00:58] <Lac3rat3d> ohh
[00:58] <Lac3rat3d> ya
[00:58] <Lac3rat3d> output changes with each 'h'
[00:59] <c_14> yep
[00:59] <Lac3rat3d> prob take a while since it has to burn it into the video stream?
[00:59] <c_14> It has to reencode the entire video, yes.
[00:59] <Lac3rat3d> cool
[00:59] <Lac3rat3d> i'll just let it do it's thing then
[00:59] <Lac3rat3d> thanks for your help man :)
[00:59] <c_14> Not sure why anyone would ever need a hexdump of the current encoding output on STDERR, but it is useful for checking if ffmpeg is doing something.
[01:00] <Lac3rat3d> yep, now i know :)
[01:01] <deivor__> lacerated, try with the -t flag so you can check if the output is correct before encoding the file completely
[01:01] <Lac3rat3d> too late :/
[01:01] <Lac3rat3d> but, what does that do?
[01:01] <Lac3rat3d> -t
[01:01] <c_14> If you're outputting to mkv, you can play the output while it's encoding.
[01:02] <Lac3rat3d> ohhh
[01:02] <deivor__> oh
[01:02] <c_14> -t limits the duration of the output
[01:02] <deivor__> if you use -t 5:00 it encodes 5 minutes and then stops
[01:02] <Lac3rat3d> ohhhh
[01:02] <Lac3rat3d> cool
[01:02] <Lac3rat3d> i se
[01:02] <Lac3rat3d> like a sample
[01:02] <deivor__> yes
[02:22] <bencc> is there -tt option similar to -ss option?
[02:22] <bencc> or do I have to calculate how much time and use -t?
[02:22] <c_14> there's -t and -to
[02:24] <bencc> c_14: so -to is similar to -ss?
[02:24] <c_14> yep
[02:24] <c_14> But only if you don't use -ss or use -ss as an output option.
[02:24] <c_14> If you use -ss as an input options, the timestamps are reset and -to works just like -t
[02:24] <bencc> why can't I use -ss?
[02:25] <bencc> so I can't say: start at 10 seconds and stop at 20 seconds?
[02:25] <c_14> https://trac.ffmpeg.org/wiki/Seeking%20with%20FFmpeg#Cuttingsmallsections
[02:25] <c_14> Should all be explained there.
[02:34] <bencc> c_14: thanks
[02:34] <bencc> not very convenient because I need to calculate by hand
[02:00] <norbert> hi, is there an easy way to speed up a video (4x) and do it in a way that audio also speeds up?
[02:00] <norbert> and that fps is still proper
[02:01] <c_14> https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
[02:02] <norbert> c_14: thanks, I did find that page, but didn't understand the -16 and 0.125*PTS
[02:02] <norbert> I have 60fps
[02:03] <norbert> I guess -r is probably 60?
[02:03] <norbert> but what should I do with setpts?
[02:03] <norbert> I have it running already and I'm not sure this will give me audio
[02:03] <norbert> maybe at the end of the transcoding it adds audio to the file
[02:04] <norbert> I'm trying to use ffmpeg because kdenlive removes audio when I speed up the video with the available motion effect
[02:05] <norbert> which makes me a sad Linux panda
[02:05] <norbert> but one day things will work out of the box
[02:06] <norbert> no, transcoding is done, but no audio
[02:06] <c_14> What's your current command, and what do you want to do.
[02:06] <c_14> Ie speed up/slow down by what amount.
[02:06] <norbert> I can extract the audio as a wav and work on that separately, but, yeah
[02:07] <norbert> I tried: ffmpeg -i ToT_2.mp4 -r 60 -filter:v "setpts=0.125*PTS" -an output.mkv
[02:07] <norbert> I want that but with audio
[02:08] <c_14> add -filter:a 'asetpts=0.125*PTS' and remove the -an
[02:08] <norbert> I'll try it with -acodec libvo_aacenc
[02:09] <c_14> If you don't want to drop frames, use -r 240
[02:09] <norbert> doesn't appear to speed up the audio
[02:10] <norbert> adds audio though, so one step forward :)
[02:10] <norbert> if we manage to find out how to do it...
[02:11] <norbert> ...maybe I should e-mail ffmpeg.org folks to update https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
[02:11] <norbert> because I'm guessing almost everyone who wants this still wants audio to work - and also sped up
[02:11] <c_14> I can edit the page.
[02:11] <c_14> It should work though.
[02:11] <c_14> What's your current commandline.
[02:12] <c_14> s/\./?
[02:12] <norbert> ffmpeg -i ToT_2.mp4 -r 60 -filter:v "setpts=0.125*PTS" -filter:a "asetpts=0.125*PTS" -r 240 output.mkv
[02:12] <c_14> eh
[02:12] <c_14> atempo
[02:12] <c_14> not asetpts
[02:12] <c_14> just use atempo=4
[02:12] <c_14> I forgot that the name was different...
[02:13] <norbert> http://justpaste.it/hpki
[02:14] <c_14> use atempo=2,atempo=2
[02:14] <c_14> oh, and atempo filters are multiplicative, not additive
[02:14] <c_14> Important to remember.
[02:15] <norbert> I removed -r 240
[02:15] <norbert> because with atempo=etc is was now 240fps
[02:15] <norbert> without -r 240 it goes back to 60
[02:15] <norbert> the result has faster audio but it's not synchronized
[02:15] <norbert> audio not fast enough, it seems
[02:16] <norbert> about 1/2 what it needs to be
[02:16] <norbert> what exactly does 0.125 do, why does that make it 4x faster
[02:17] <norbert> I'd think that would make something 8x faster/slower
[02:17] <norbert> I'm now trying it double speed, with: ffmpeg -i ToT_2.mp4 -r 60 -filter:v "setpts=0.250*PTS" -filter:a 'atempo=2' output.mkv
[02:17] <norbert> but the audio is still too slow
[02:19] <c_14> eh
[02:19] <c_14> It would make it 8x faster.
[02:19] <c_14> I'm pretty sure that's a typo on the wiki.
[02:19] <c_14> Will fix.
[02:20] <norbert> why does (a)tempo not accept things outside the 0.5-2 range?
[02:20] <c_14> Excellent question.
[02:20] <c_14> Next question.
[02:20] <norbert> I think to make the audio twice as fast, I need atempo=4, for some reason
[02:20] <c_14> I'd have to read the source code for that one.
[02:21] <c_14> atempo=2 would make the audio twice as fast aka 100% faster
[02:21] <norbert> maybe because the setpts speeds audio up
[02:21] <norbert> but it doesn't
[02:21] <c_14> The setpts doesn't touch audio samples.
[02:21] <norbert> ok
[02:22] <norbert> anyways, so I'm now using: ffmpeg -i ToT_2.mp4 -r 60 -filter:v "setpts=0.250*PTS" -filter:a 'atempo=2' output.mkv
[02:22] <norbert> and while audio is faster, it's clearly way slower than the video
[02:22] <norbert> oh wait
[02:22] <c_14> That's because you're making the video 4x faster and the audio 2x faster.
[02:22] <norbert> 0.500 is what I would need for setpts
[02:23] <norbert> but I want it 0.250 with atempo=4 :)
[02:23] <c_14> use atempo=2,atempo=2
[02:24] <norbert> thanks, now the result is as I wanted
[02:47] <norbert> c_14: maybe add -filter:a 'atempo=2,atempo=2' ?
[02:48] <norbert> to the wiki, I mean :)
[02:48] <c_14> It's listed under speeding up/slowing down audio
[02:49] <c_14> I could add a section speeding up/slowing down video + audio if you think that would be easier to understand.
[02:49] <norbert> oh, man, I must be asleep
[02:49] <norbert> no, it's just late here, I wasn't paying attention :)
[02:51] <deivor__> I have some files with de-synced audio/video (initially, doesn't get worse with time). Currently I'm "eyeballing" the difference, splitting the files in audio and video tracks and joining them with -itsoffset N. This works but is very "manual". Is there any way to do it faster?
[02:51] <deivor__> I've set up a script that does this but maybe I'm just doing it the wrong way
[02:51] <deivor__> (And with 'faster' I don't mean encode time)
[02:51] <c_14> use -codec copy ?
[02:52] <deivor__> I mean the way that I'm doing it (split, join with itsoffset) seems 'wrong'. My script takes a filename and an offset and splits it and joins it back with the offset
[02:52] <deivor__> I thought maybe there was another ("proper") way to do it
[02:54] <c_14> you could give ffmpeg the original file twice, put itsoffset in front of one of the inputs, and then just map the streams as you want them
[02:54] <c_14> That'll save you the extracting to separate files part.
[02:55] <c_14> You might also be able to use -async/-vsync
[07:08] <ruby_on_tails> i combined a mp4 video and a mp3 audio into a new mp4 video, when i play the video on my ipad chrome the audio doesnt work, if i play the audio file separately on chrome it works
[07:11] <ruby_on_tails> http://pastebin.com/S86GDZDG this is the ffprobe of the final video which isnt working
[07:16] <ruby_on_tails> it works on desktops, mac, android mobile
[07:16] <ruby_on_tails> just not working properly on ipad
[07:47] <ruby_on_tails> anyone alive?
[08:13] <voltagex> is it possible to turn DASH video back into something more normal without loss of quality?
[09:00] <rcombs> voltagex: sure, remux it
[09:03] <sanooj> anyone used uvc to export some of its controls to v4l2?
[11:14] <plutarde> Does pure ffmpeg support variable frame rate (VFR) to encode?
[12:04] <nikolasborrel> Hi. Im trying to install ffmpeg 2.4.2 on a Debian server following the instructions given here: http://www.e-rave.nl/installing-ffmpeg-on-debian-squeeze-and-newer
[12:04] <nikolasborrel> When configuring ffmpeg I get
[12:04] <nikolasborrel> ERROR: freetype2 not found.
[12:04] <nikolasborrel> Do you have a solution for that? freetype is installed at /usr/include/freetype2/freetype
[12:06] <sanooj> yes! apt-get install libfreetype2-dev or so
[12:07] <Akagi201> Which lib should I link when I compile ffmpeg I want to use G711 audio.
[12:07] <Akagi201> Any help is very nice.
[12:07] <sanooj> actually what you want to do is to apt-get build-dep ffmpeg
[12:07] <sanooj> ^ nikolasborrel
[12:08] <Akagi201> sanooj: I compile from source
[12:09] <Akagi201> I use it on a device, so I want to know the exactly lib
[12:09] <sanooj> yeah sorry Akagi201, I wasn't talking to you. I don't know about G711
[12:09] <Akagi201> nothing
[12:09] <sanooj> nikolasborrel: it's libfreetype6-dev, not libfreetype2-dev.
[12:11] <nikolasborrel> Thanks sanooj. libfreetype6-dev is already the newest version.. I have found this post, it might be related& http://ffmpeg.org/pipermail/ffmpeg-user/2014-July/022603.html
[12:12] <nikolasborrel> I need support for m4a and as I understand, the version installed using apt-get will not support this due to legal issues?
[12:12] <nikolasborrel> *apt-get install ffmpeg
[12:12] <c_14> nikolasborrel: `locate freetype2.pc'
[12:14] <c_14> Akagi201: pcm_mulaw and pcm_alaw should be ffmpeg-internal
[12:14] <Akagi201> c_14: you mean don't have to --enable-libxxx when compile the code
[12:16] <c_14> yep
[12:17] <nikolasborrel> c_14: freetype is installed at /usr/include/freetype2/freetype
[12:18] <c_14> Is the freetype2.pc there as well?
[12:19] <c_14> The configure script uses pkg-config to determine whether it exists and what flags are needed.
[12:19] <c_14> If it can't find the freetype2.pc file, it won't find the lib.
[12:21] <nikolasborrel> c:14: freetype2.pc is located here /usr/lib/x86_64-linux-gnu/pkgconfig/freetype2.pc
[12:22] <c_14> `export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig' then try running pkg-config --exists --print-errors freetype2
[12:23] <nikolasborrel> Im installing apt-get build-dep ffmpeg at the moment as suggested by sanooj, but will it include the acc/m4a codecs?
[12:24] <nikolasborrel> *aac
[12:25] <c_14> build-dep doesn't install ffmpeg, it only installs the build dependencies thereof
[12:26] <nikolasborrel> pkg-config --exists --print-errors freetype2 doesnt output anything. Is that good&?
[12:26] <c_14> yep
[12:26] <c_14> Now try running configure again.
[12:30] <kevmitch> nikolasborrel: do the build dep, then add  libfdk-aac-dev  and configure ffmpeg with --enable-nonfree --enable-libfdk-aac
[12:30] <kevmitch> .
[12:35] <nikolasborrel> c_14: I still get the same problem with freetype2 not found. Tough stuff :-(
[12:36] <c_14> nikolasborrel: You did that in the same terminal where you exported PKG_CONFIG_PATH ?
[12:36] <nikolasborrel> Yes
[12:39] <nikolasborrel> Hmm& Something happened now!
[12:42] <nikolasborrel> The build-dep ffmpeg is crunching in another terminal, dont know if its doing good thing for my build
[12:43] <nikolasborrel> However, I get a bunch of errors when running make. I will try kevmitch suggestion when build-dep has finished
[13:10] <nikolasborrel> I have problems installing build-dep ffmpeg: spamassassin fails with Cant locate HTML/Parser.pm. I then tried to install using perl: install Mail::SpamAssassin but I get undefined symbol: Perl_Gthr_key_ptr
[13:10] <nikolasborrel> Any Perl hackers out there&?
[13:11] <nikolasborrel> I tried deleting  /usr/local/lib64/perl5/auto/version/ without luck
[13:12] <c_14> SpamAssassin isn't a dependency of FFmpeg...
[13:12] <c_14> That would be strange.
[13:14] <nikolasborrel> Setting up spamassassin (3.3.2-5+deb7u1) & after sudo apt-get build-dep ffmpeg
[13:14] <sanooj> awesome
[13:15] <phonie> has anyone expirienced glith-corruption of file with 2-pass libvpx-vp9?
[13:15] <sanooj> anikolasborrel: that's very weird. I don't have spamassasin installed even though I've run that command
[13:17] <sanooj> nikolasborrel: I'm running an updated debian wheezy.
[13:17] <moroni> guys.
[13:17] <moroni> has anyone expirienced glith-corruption of file with 2-pass libvpx-vp9?
[13:18] <moroni> happens https://pp.vk.me/c618119/v618119557/1e9bc/hbIvQ-4s4xk.jpg
[13:19] <nikolasborrel> Im trying to install on a Dreamhost VPS server& Dont know whats installed here.
[13:20] <JEEB> moroni, I think vp9 libvpx is really broken in parts but you'd want to make sure it's current code you're testing and that the issue is really the encoder
[13:20] <nikolasborrel> Should I upgrade Debian? I have never worked with debian before..
[13:21] <sanooj> probably not.
[13:23] <c_14> nikolasborrel: I'd probably `apt-get autoremove' and then try following this: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[13:24] <moroni> JEEB, honestly, just tried to play in Chrome. all fine.
[13:25] <JEEB> are you up-to-date with the lavc decoder then?
[13:34] <maui> Hi, is it possible to convert mp4 lossless to webm?
[13:35] <c_14> maui: only if the mp4 is vp8 or vp9
[13:36] <maui> where can i see that?
[13:36] <c_14> ffprobe input.mp4
[13:37] <moroni> codec not supported for mp4 container.
[13:38] <moroni> maui, if you want to losslessly convert, you can use -b:v 0 -crf 0. just file size issue.
[13:39] <c_14> moroni: do vp8/vp9 have a lossless mode?
[13:39] <JEEB> moroni, -b:v 0 is incorrect in any case, and c_14's question is completely valid
[13:40] <JEEB> not to mention that no-one knows if crf zero even maps to something that could be lossless with libvpx
[13:40] <moroni> JEEB, elsehow bitrate setted to 200 kbps.
[13:40] <moroni> i know nothing. it is raw. but usable.
[13:40] <JEEB> with libx264, yes, crf 0 with a 8bit encoder is lossless
[13:40] <JEEB> but as soon as you go for f.ex. 10bit libx264 CRF 0 is no longer lossless
[13:41] <JEEB> you have to use quantizer zero with libx264 to make sure it's lossless in that case
[13:41] <JEEB> (the range of values became bigger and CRF was matched so that the lossy values would more or less match)
[13:41] <JEEB> in any case, I don't even know if libvpx has a lossless mode :P
[13:42] <JEEB> so the simple answer is, "no you cannot do lossless conversions from content that is muxed into mp4 to content that is muxed into webm [matroska subset]"
[13:42] <JEEB> mostly because mp4 doesn't have formats supported by the latter subset defined so there's no case of "I can just copy the streams over"
[13:42] <nikolasborrel> UPDATE: I managed to install with great help from you guys. Thanks a lot! Dont know exactly what did the trick, but `export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig, build-dep ffmpeg and some fiddling around did the trick. THANKS!
[13:43] <voltagex> JEEB: where can I go to read up on this? I'm interested in lossless video for archival
[13:43] <JEEB> voltagex, regarding what?
[13:43] <sanooj> sigh. so I got uvcdynctrl to teach v4l2 about the iframeperiod control. it can read the current value and limits as a v4l2 control. wootwoot
[13:43] <JEEB> which encoder etc
[13:43] <sanooj> but it can't write to it. it always writes zero, and it doesn't say why
[13:43] <voltagex> JEEB: I never knew there were lossless settings for x264
[13:43] <JEEB> just set quantizer to zero and that is lossless
[13:43] <sanooj> headdesk
[13:44] <JEEB> crf set to zero works with a 8bit build
[13:44] <JEEB> but it will not be lossless with 9bit or 10bit builds
[13:44] <JEEB> (the bitness of output, which is decided when you build libx264)
[13:57] <moroni> (VP9-Specific Options --lossless=<arg>            Lossless mode)
[14:11] <maui> what filter can i use if i want to cut 50 pixel off the bottom?
[14:11] <c_14> crop?
[14:12] <c_14> hmm, although
[14:12] <c_14> nah, that should work
[14:12] <maui> but crop also cuts the top side?
[14:13] <c_14> crop=iw:ih-50:0:0 <- should do it
[14:14] <maui> thx
[16:25] <Lac3rat3d> c_14 you around?
[16:25] <c_14> Sure.
[16:25] <Lac3rat3d> :D
[16:26] <Lac3rat3d> so that thing you were helping me with yesterday worked, burned the subtitles into the video stream
[16:26] <Lac3rat3d> but, the bitrate went way down from source to output. how can i specify same bitrate as input?
[16:26] <c_14> You're encoding x264?
[16:26] <Lac3rat3d> yep
[16:27] <c_14> https://trac.ffmpeg.org/wiki/Encode/H.264 <- you can find useful info here
[16:27] <Lac3rat3d> ya i've been looking at that
[16:27] <Lac3rat3d> but doesn't seem like you can just specify use whatever bitrate is in source
[16:28] <c_14> Nah, you'd have to guess at the source bitrate using ffprobe and subtracting the audio bitrate.
[16:28] <Lac3rat3d> source is x264 as well
[16:28] <Lac3rat3d> hmmm okay
[16:29] <Lac3rat3d> how do you use ffprobe?
[16:30] <c_14> ffprobe file
[16:31] <Lac3rat3d> oh, it's the same output as ffmpeg -i file
[16:31] <c_14> Minus one error message, yes.
[16:31] <c_14> You can also give ffprobe options that make the output easier to parse though.
[16:32] <Lac3rat3d> seems like source is ~11mb/s
[16:32] <Lac3rat3d> vbr though
[16:34] <c_14> Either pick something like -b:v 11m or pick a crf that gets you something similar.
[16:35] <c_14> (rule of thumb, start in the low 20s and adjust as necessary)
[16:35] <Lac3rat3d> hmm ok, i'll play around with it :)
[16:35] <Lac3rat3d> thanks!
[17:44] <kaotiko> hi
[18:01] <joonas_> hi kaotiko
[18:11] <ggVGc> I have some AVI files that I need to have in mpg. is it possible to do this transcoding without/with very little quality loss, if I don't care about output size?
[18:12] <ggVGc> or does mpeg4 just really suck so I can't have it?
[18:18] <c_14> ffmpeg -i avi -c copy out.mpg
[18:26] <ggVGc> c_14: yeah, I tried it. I guess I need to reencode anyway. I am trying to get the avi to play on a device that only supports "All mpeg formats", but it's old. So I am trying to find out the best way to transode with the least quality loss into a format it understands :(
[18:26] <ggVGc> when I used vcodec out, and out it in a .mpg, it found the file but didn't play it
[18:26] <ggVGc> ehh, vcodec copy, I meant
[18:29] <ggVGc> oh, damnit, the original stream is xvid :/
[18:30] <ggVGc> so, how do I reencode in mpeg4 with the absolute highest quality(disregarding file size)?
[18:32] <sacarasc> XviD is an implementation of MPEG4.
[18:33] <ggVGc> sacarasc: yeah, but the box that I am trying ot use doesn't seem to understand it for some reason
[18:33] <ggVGc> but it understands if I use -vcodec mpeg4 in ffmpeg
[18:33] <ggVGc> from the xvid stream
[18:33] <ggVGc> not sure why
[18:33] <ggVGc> maybe I am doing something else wrong
[18:34] <sacarasc> ffmpeg -i xvid-input.avi -c copy -vtag DIV3 output.avi
[18:34] <sacarasc> Try that.
[18:34] <ggVGc> sacarasc: so, can I make ffmpeg transcode the xvid stream into mpeg4 without loss? (basically just changing the name of the code)
[18:34] <ggVGc> okay, thanks
[18:35] <sacarasc> Yeah, in theory. Just gotta find one that works, I guess.
[18:36] <ggVGc> I really dislike video conversion :(
[18:37] <ggVGc> hm, that's didn't work
[18:37] <ggVGc> maybe it's the resolution that is the problem
[18:37] <ggVGc> sacarasc: what does vtag DIV3 mean?
[18:38] <ggVGc> i.e what is DIV3
[18:38] <JEEB> divx ;-)
[18:38] <sacarasc> DivX 3, which was a rather old encoder of MPEG4.
[18:38] <ggVGc> alright, so that should have worked then I guess
[18:38] <JEEB> IIRC a hacked MS MPEG-4 encoder that let you output it into AVI
[18:38] <ggVGc> JEEB: but I am trying to get a divx stream to not be divx
[18:38] <ggVGc> without losing quality
[18:39] <ggVGc> and my target container is mpg, not avi.
[18:39] <JEEB> well that divx is not really MPEG-4 Part 2 following
[18:39] <JEEB> since the old hacked MS encoder wasn't really compliant, IIRC
[18:39] <ggVGc> it works if I output with -vcodec mpeg4, but then I get quality loss because of transcore
[18:40] <ggVGc> transcode*
[18:40] <ggVGc> a lot of quality loss
[18:40] <ggVGc> even with very high bitrate
[18:42] <flarunt> if your device is old and doesnt play divx then id assume by "all mpeg formats" it means mpeg1/2
[18:45] <ggVGc> flarunt: I used -b:v 2000k now, and outputted to .mpg, and it worked
[18:45] <ggVGc> but the file doubled in size
[18:45] <ggVGc> but that's fine
[18:45] <ggVGc> thanks guys
[19:39] <joonas_> alright. uvcdevctrl was a flop. I can teach it about the XU provided by uvcvideo that controls the i-frame period, but can't set it using v4l2-ctl.
[19:39] <joonas_> it reads it and the bounds correctly, but setting the value always stores zero
[19:40] <joonas_> gstreamer can talk to uvcvideo directly to set the bitrates and i-frame period, but getting it to add audio to an rtmp stream is proving to be a nightmare.
[20:19] <DrSlony> Hi, please advise what settings to use for high quality x264 compression so that compatibility with youtube, modern smartphones and other modern players is maintained.
[20:22] <DrSlony> se topic
[20:24] <DrSlony> ignore "se topic"
[20:32] <sacarasc> DrSlony: Find the oldest devices you want to support and check what they allow.
[20:39] <DrSlony> thats not realistic advice
[20:39] <DrSlony> "find what they support"
[20:39] <JEEB> well, there are two things you have to take into mention when you want to support some hardware device
[20:39] <JEEB> profile and level
[20:39] <JEEB> profile you can think of as features
[20:39] <JEEB> level is how much memory that decoder has, basically
[20:39] <DrSlony> modern smartphone
[20:40] <DrSlony> *modern smartphones
[20:40] <DrSlony> and youtube
[20:40] <JEEB> is it ok for iphones if it only works from 3GS forward?
[20:40] <JEEB> if yes, then go for not setting a profile (it will set one by the amount of features you use), and level 4.1
[20:40] <JEEB> youtube isn't a limiting factor at all because it re-encodes anyways
[20:41] <JEEB> it just om nom noms whatever you feed it
[20:41] <JEEB> (it uses an old version of ffmpeg for the decoding)
[20:41] <DrSlony> yes 3GS is fine
[20:42] <JEEB> well, then it should be simple enough as I said
[20:42] <DrSlony> yes but the last time i did video conversion, some 2 years ago, using advice i got from here i ended up with h.264 videos that youtube couldnt decode :) so now while asking i'd like to cover that base :)
[20:42] <JEEB> the only problem are the bulkloads of android devices because even newer ones from china can have very crappy hardware decoders
[20:42] <JEEB> well, I do remember that until some years ago youtube didn't support lossless H.264
[20:43] <JEEB> since they never updated their ffmpeg decoder
[20:43] <SirVivorX> so, here is a stupid question indeed ( I do plead stupidity in this situation...), but what file do i use to install ffmpeg on my mbp 10.10 (no server) with? But with some minor help here, I will donate $$$ to the cause :-)
[20:43] <SirVivorX> I just don't see it
[20:43] <JEEB> SirVivorX, just use homebrew and install ffmpeg
[20:43] <JEEB> http://brew.sh/
[20:43] <DrSlony> thank you JEEB, i will get back to you in a few minutes
[20:43] <SirVivorX> d/l homebrew for ffmpeg?
[20:44] <JEEB> you install homebrew, and then tell it to build you ffmpeg
[20:44] <JEEB> and you will get yourself ffmpeg
[20:44] <JEEB> homebrew is the least retarded package manager for OS X
[20:44] <SirVivorX> sounds easy if I knew what to do...lol
[20:44] <SirVivorX> ok, thx
[20:47] <SirVivorX> http://www.renevolution.com/how-to-install-ffmpeg-on-mac-os-x/
[20:47] <SirVivorX> k, thx :-)
[20:47] <JEEB> ok, yes. that doesn't sound too retarded
[20:48] <DrSlony> JEEB i'm on ffmpeg-2.2.9, do you know of any issues i should look out for?
[20:49] <DrSlony> all versions newer than that are hard-masked in gentoo as they cause issues with other software
[20:49] <JEEB> just make sure they don't cause issues with anything you actually have installed
[20:49] <JEEB> because usually the reasons for not updating in gentoo with libav/ffmpeg are rather iffy.
[20:50] <JEEB> but yeah, I don't know of any specific issues, but how would I know if I use the latest all the time :P
[20:50] <JEEB> no-one really keeps any eyes on anything else but the latest release, if even that
[20:50] <JEEB> the releases are purely for distros
[20:51] <DrSlony> yes i know, im a dev too :)
[20:52] <JEEB> you would really like the automagic level following though
[20:52] <JEEB> and I don't remember when that went in
[20:52] <JEEB> basically, before -level 4.1 would only set the flag
[20:52] <JEEB> and not actually make sure that the stream you were pushing out would comply to it
[20:52] <JEEB> (regarding the amount of reference frames used)
[20:53] <JEEB> then at some point finally after years of talking about it someone did something about it
[20:53] <JEEB> and now ffmpeg's -level does the same as x264cli's --level
[20:53] <JEEB> as in, it limits your reference frames according to the level limitations
[20:54] <JEEB> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=0aac9b76bc7770a90d1317f9979644aefb341ffa
[20:54] <JEEB> may 2014
[20:54] <JEEB> although to be honest, you could have a separate ffmpeg binary with statically linked in libraries if you're afraid of updating your whole system :)
[20:55] <JEEB> if you compile in the repo you will get exactly that
[20:55] <JEEB> with the default configuration
[20:57] <DrSlony> i could try that
[20:58] <DrSlony> by the way, is this command sane?
[20:58] <DrSlony> ffmpeg -i in.mp4 -ac 2 -c:a libfdk_aac -global_quality 3 -c:v libx264 -preset slower -crf 23 -level 4.1 -threads 0 out.mp4
[20:58] <JEEB> will you be putting this so that the output is as-is available to someone via limited bandwidth?
[20:58] <JEEB> such as the internet
[20:59] <DrSlony> i like your website now, its clear
[20:59] <DrSlony> well i intend to use this on all my old videos recorded with a bridge type camera, tablet and smartphone
[20:59] <cortexman> can i output a wav as float values between 0 and 1?
[21:00] <DrSlony> so the input is generally not the best quality and a bit grainy
[21:00] <DrSlony> i dont care for preserving grain
[21:00] <JEEB> well, I asked you a simple question
[21:00] <DrSlony> and the destination will be probably google drive
[21:00] <JEEB> and the answer shall be yes or no
[21:00] <DrSlony> ah
[21:00] <DrSlony> yes
[21:00] <JEEB> ok, then you also need VBV
[21:00] <JEEB> which is -maxrate and -bufsize
[21:00] <DrSlony> verifie dby visa
[21:01] <cortexman> when i convert to pcm using sox it is in some kind of binary format still
[21:01] <cortexman> i want just a float array
[21:01] <JEEB> basically set maxrate to the minimum network speed you want someone to be able to watch the clip with without further buffering
[21:01] <JEEB> and bufsize is the amount of buffering the player (in general) would do, you have to match it between the player and the encoder
[21:02] <JEEB> if you have a player that gives you the amount of buffering in seconds instead of bits
[21:02] <JEEB> then <seconds to buffer>*<maxrate>
[21:02] <JEEB> is the way to calculate it
[21:02] <JEEB> also about the sanity of that command line: threads auto (zero) is the default for libx264, global quality I have no idea of, make sure it only affects audio if that's what you are wishing to use it for
[21:03] <JEEB> otherwise it looks ok, you should adjust the preset according to your wishes regarding speed vs compression
[21:03] <JEEB> and crf should be adjusted according to what you like eye-wise
[21:03] <JEEB> CRF does the primary rate control with a constant rate factor (closest we have right now to 'constant quality' kind of thing), and VBV will limit it so that it will not go over the maxrate/bufsize model you set
[21:04] <JEEB> also I've actually always set the level without the dot, but it should work with the dot as well :)
[21:06] <JEEB> you should probably test without VBV first a few shorter clips and try to find your sweet spot regarding CRF
[21:06] <JEEB> do note that the value that is your sweet spot will depend somewhat on the type of content, and more with the frame rate and the resolution of it
[21:06] <JEEB> although usually after you have found your sweet spot once, it's not too far even if things change
[21:06] <cortexman> does anyone know how to get ffmpeg to output a pcm file as an actual array of floating point values...
[21:07] <DrSlony> i have tested crf and preset in the past, and these are the settings that i found satisfactory
[21:07] <JEEB> well, then add VBV to it and that'd be it I guess
[21:08] <JEEB> and you can remove at the very least the threads one, and make sure what the hell the global_quality thing does
[21:08] <JEEB> if it has anything to do with video, you should remove it
[21:08] <DrSlony> yes im just checking blobal_quality - i wrote this down 2 years ago without an explanation of why i chose "3"
[21:09] <DrSlony> i cant find an explanation of why i chose 3, so i deleted it and im going with this:
[21:09] <DrSlony> -c:a libfdk_aac -profile:a aac_he -b:a 128k
[21:09] <mark4o> cortexman: ffmpeg -i inputfile -f f32le out.pcm
[21:10] <JEEB> DrSlony, at that bit rate you shouldn't need HE-AAC
[21:10] <JEEB> you can leave the profile out
[21:10] <cortexman> mark4o, this is the output https://gist.githubusercontent.com/brianmingus/c698eeaf6b9d1a31b110/raw/3348d7044ccb8cf62989c6c1a75a20fbc2e4316a/gistfile1.txt
[21:10] <JEEB> HE-AAC starts being useful when you go way under 100kbps
[21:11] <cortexman> (not a float array..)
[21:12] <mark4o> cortexman: that looks like a float array & dumped as text
[21:13] <cortexman> not useful but thanks
[21:13] <DrSlony> thanks JEEB!
[21:14] <DrSlony> ffmpeg -i in.mp4 -ac 2 -c:a libfdk_aac -b:a 128k -c:v libx264 -preset slower -crf 23 -level 4.1 -maxrate 512k -bufsize 2560k out.mp4
[21:14] <JEEB> seems like a bit low maxrate, but if you feel like that's the thing you'll be going with, fine by me :)
[21:15] <JEEB> not that I know what kind of content you're encoding
[21:30] <kenny__> Hello, there is possibility to set input for ffserver as udp source (not only feed)?
[21:31] <DrSlony> ah yes, perhaps 2000k for maxrate is better?
[21:31] <DrSlony> the input is video captured using smartphones, tablets, bridge cameras
[21:32] <kenny__> i have av_interleaved_write_frame(): Connection reset by peer error if i try send stream from ffmpeg to ffserver via http :/
[21:33] <kenny__> i also try with rtsp but with error: Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
[21:36] <kenny__> DrSlony: i need to transcode multicast input stream (with ffmpeg), pass them to ffserver and distribute it to enc-clients. ffserver is on other server than ffmpeg
[21:38] <DrSlony> kenny__ hi, im not the right guy to ask :)
[21:39] <kenny__> ok :)
[21:39] <kenny__> anyone? :(
[21:43] <xconspirisist> Hi folks, I'm trying to understand why raw footage from my GoPRO is so large, and why re-encoding at the same resolution reduces the size. ffprobe foo.mkv = Video: h264 (Main), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 1k tbn, 119.88 tbc (default)
[21:50] <DrSlony> well the gopro cpu is not as powerful as your desktop computer's so i cant spend as much time compressing
[21:51] <DrSlony> further, ffmpeg might use newer techniques than the old firmware does
[21:51] <DrSlony> further, you will lose quality on every recompression
[21:52] <JEEB> with the large exception of using lossless coding, but generally people don't use it
[21:52] <iive> libx264 is the encoder that ffmpeg uses and it is state-of-the-art one.
[21:53] <xconspirisist> DrSlony: ah, so does that line from ffprobe say that a codec is being used, and simply, ffmpeg would just do a better job of encoding if I used the same codec again?
[21:54] <xconspirisist> DrSlony: I had assumed it was pretty much like a "null" codec on the gopro/video cameras, and it was storing every frame in full?
[21:54] <JEEB> you can take the video format out of the equation, basically simply put what you used with ffmpeg compressed better than whatever gopro did
[21:55] <JEEB> of course, just being able to compress something better doesn't mean anything by itself, but if you cannot notice the difference then it was done without affecting visual quality for your eyes
[21:56] <xconspirisist> JEEB interersting stuff.
[21:57] <JEEB> cameras generally don't create files for end user consumption so they don't need to compress things well. and they usually have enough free space to then compensate by just using more bits
[21:58] <JEEB> so being able to compress something more than a camera could with similar picture quality isn't exactly anything surprising per se
[21:58] <xconspirisist> At the moment I'm using the concat "demuxer" which is awesome, it's nice and fast, just it's producing outputs with a filesize the sum of all input files (as you'd expect from concat)
[21:58] <xconspirisist> that works super well, just I guess now I need to re-encode to get a smaller file that I can share around.
[21:59] <DrSlony> xconspirisist resolution has nothing to do with filesize when compression is involved
[21:59] <xconspirisist> yup, sure
[21:59] <JEEB> well, it both has and doesn't have
[22:00] <JEEB> but in general if you're not encoding a very simple scene a larger resolution picture will need more bits to be encoded at the same quality level compared to a smaller resolution picture
[22:02] <kenny__> anyone can help?
[22:02] <JEEB> this is of course under the presumption that everything else is static :P
[22:03] <JEEB> if you encode a lower resolution picture with very ineffective ways and then encode a higher resolution picture or pictures in more effective ways, then of course the bigger picture might end up smaller
[22:11] <DrSlony> JEEB latest git ffmp\eg compiled without issue s:)
[22:11] <DrSlony> no issues other than my typos
[00:00] --- Mon Oct 27 2014


More information about the Ffmpeg-devel-irc mailing list