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

burek burek021 at gmail.com
Thu Jan 23 02:05:01 CET 2014


[00:12] <sherafff> hi
[00:13] <sherafff> i need to join video and audio file together, then video is shorter than the audio, i want stop joining when video is done
[00:14] <sherafff> for now, i get something but the video stay at the end and audio keep playing until its done
[00:16] <sherafff> ok i found
[00:16] <sherafff> thx
[00:16] <sherafff> http://superuser.com/questions/628996/adding-soundtrack-to-a-video-using-ffmpeg
[00:16] <sherafff> here
[00:18] <brontosaurusrex> -shortest < or something
[00:22] <_fil_> -itsoffset was the solution, llogan
[00:22] <_fil_> thanks again
[00:22] <_fil_> final cmd is: ./ffmpeg-2.1.3  -i incomplet.mp4 -itsoffset 00:01:58.5580 -i insert.mp4 -filter_complex "overlay=enable='between(t,118,220)'" -preset ultrafast output.mp4
[00:22] <_fil_> s/5580/580/
[00:25] Action: _fil_ happy
[01:06] <SpecialEd> Hey guys, by any chance do any of you know if it is possible to use ffmpeg to transcode x264/aac videos using the GPU instead of the CPU?
[01:06] <klaxa> it's not feasible
[01:07] <SpecialEd> I thought that was the case
[01:07] <SpecialEd> I just got these two 780ti video cards in SLI
[01:07] <SpecialEd> and was hoping maybe I could put them to work lol
[01:07] <sacarasc> If you send one of them to me, I'll show you how it is done.
[01:08] <SpecialEd> I can do that just as long as you first send me $750 or whatever it is that I spent on one, lol
[01:08] <sacarasc> Heh.
[01:08] <SpecialEd> one card uses 3 pci slots
[01:08] <SpecialEd> its so fat with the fans
[01:09] <SpecialEd> i had to give up my PCIe raid controller to make space for the second one
[01:11] <SpecialEd> Are there other programs that can do transcoding using GPU? Or is that still a fantasy of the future?
[01:12] <klaxa> it's a fantasy for the never i think
[01:12] <SpecialEd> ok
[01:12] <klaxa> JEEB will probably be able to elaborate why it won't really work
[01:13] <SpecialEd> i have a 4770k and a 4771 slaving away so im probably in much better shape than most others
[01:13] <sacarasc> Something about it not being linear data makes GPU encoding not as good as CPU...
[01:13] Action: sacarasc shrugs.
[01:14] <SpecialEd> ok
[01:14] <SpecialEd> i also have a 2700k in my other room, is there any tools for ffmpeg to do transcoding over the network?
[01:14] <SpecialEd> so that I can use that cpu on files locally?
[01:14] <SpecialEd> I was thinking of spinning up a headless VM on that desktop and doing a network share
[01:15] <klaxa> not afaik
[01:15] <klaxa> i started coding something like that in python
[01:15] <klaxa> https://github.com/klaxa/Distributed-encoding
[01:15] <klaxa> i will rewrite that at some point maybe
[01:20] <SpecialEd> looks very interesting but unfortunately my 2700k is a windoze desktop so i'd have to go back to the virtualbox vm method
[01:20] <SpecialEd> and at that rate i might as well just use a network share to handle it
[01:31] <Irrelium> I have been using ffmpeg to record screencasts with two audio inputs using this command http://pastebin.com/YhvFRbyG . This seems to mix the two audio inputs together into one track. Is there a way I could record the tracks separately so I could go back later and remove one of them if I want to?
[02:03] <Irrelium> llogan: I didn't think the console output was neccesary, but I can get it I guess
[02:03] <llogan> it's always necessary
[02:06] <Irrelium> Here is the console output http://pastebin.com/hHtwCzxB
[02:06] <Irrelium> I'm glad Irssi alerts you when you try to paste more than a few lines, I accidentally tried to paste in the console output instead of the pastebin link :P
[02:07] <llogan> Irrelium: remove the whole filter_complex line
[02:08] <Irrelium> When I didn't have that line in there it didn't seem to record any audio at all
[02:08] <llogan> and add the appropriate -map options
[02:08] <llogan> -map 0 -map 1 -map 2
[02:08] <Irrelium> Oh
[02:08] <Irrelium> I will have to look up how that works
[02:08] <llogan> http://ffmpeg.org/ffmpeg.html#Stream-selection
[02:08] <llogan> http://ffmpeg.org/ffmpeg.html#Advanced-options
[02:09] <llogan> http://ffmpeg.org/ffmpeg.html#Stream-selection
[02:09] <llogan> those should help
[02:09] <Irrelium> Thanks
[02:09] <llogan> oops...i meant http://ffmpeg.org/ffmpeg.html#Stream-specifiers-1 as well
[02:10] <llogan> as for the "Advanced-options" link see the -map option specifically
[02:10] <Irrelium> Ok
[02:10] <llogan> it should have recorded at least one audio stream
[02:11] <llogan> -threads 0 is default so you can omit that
[02:12] <Irrelium> Oh ok
[02:12] <llogan> why -b:v -minrate -maxrate instead of -crf?
[02:12] <Irrelium> I originally based this off a command I got from the Internet
[02:12] <Irrelium> So there might be some unneeded stuff in there
[02:13] <llogan> also see https://trac.ffmpeg.org/ticket/3045#comment:7
[02:13] <Irrelium> I got the -b:v -minrate -maxrate from here https://trac.ffmpeg.org/wiki/x264EncodingGuide
[02:14] <Irrelium> At the part where it says "There is no native CBR mode, but you can "simulate" a constant bit rate setting by tuning the parameters of ABR:"
[02:14] <llogan> that's one of roger's additions
[02:14] <Irrelium> Does -crf do the same thing?
[02:14] <Hello71> you don't want constant bitrate
[02:15] <Irrelium> I do when I am streaming and want to keep the bitrate below my upload speed so I don't slow down my Internet
[02:15] <Hello71> so you don't actually want constant bitrate
[02:15] <Hello71> you want qos
[02:16] <Irrelium> The constant bitrate works fine :P
[02:16] <storrgie> I'm using ffmpeg to convert ALAC to FLAC via "for f in *.m4a; do ffmpeg -i "$f" -c:a flac "${f%.m4a}.flac"; done" Is there any way for me to pass in an argument to flac such as --best?
[02:16] <llogan> Irrelium: remove -minrate
[02:17] <Irrelium> Yeah, I guess I don't really need a minrate
[02:17] <Irrelium> Although I would like to keep the quality as good as possible
[02:18] <relaxed> storrgie: you want the best compression?
[02:18] <storrgie> relaxed, with flac yes
[02:19] <storrgie> the cli flac package has a --best arugment
[02:19] <llogan> storrgie: probably -compression_level <int>
[02:19] <Irrelium> How does -crf differ from -b:v -minrate -maxrate?
[02:19] <Hello71> it's a constant rate factor.
[02:19] <Hello71> not a constant rate.
[02:20] <relaxed> storrgie: put this after "$f",  -c:a flac -lpc_type 3 -lpc_passes 8 -lpc_coeff_precision 0 -prediction_order_method 5 -min_partition_order 1 -max_partition_order 8
[02:20] <storrgie> woah
[02:20] <storrgie> watttttt
[02:20] <storrgie> relaxed, I have to ask, silly question maybe... is this going to be a lossless conversion from the ALAC to FLAC?
[02:21] <relaxed> yes, flac is always lossless
[02:21] <storrgie> relaxed, its kinda weird, my input files are like 5-7MB .m4a (ALAC) files and my flac files (with your options added) at 30-40MBs
[02:22] <llogan> Irrelium: think of crf as the closest as you can get for an intelligent "constant quality level"
[02:22] <relaxed> storrgie: hmm, can you upload one of your m4a somewhere so I can test?
[02:23] <Irrelium> llogan: ah
[02:23] <Irrelium> I would rather have a max bitrate
[02:23] <storrgie> relaxed, one tic!
[02:23] <Irrelium> Since I am trying to keep it just below my upload speed
[02:23] <storrgie> relaxed, thanks man. I apprecaite it
[02:28] <storrgie> relaxed, do you know of a service I could use to upload the files?
[02:28] <storrgie> I tried mega but they now require you to make a user account
[02:29] <relaxed> storrgie: http://db.tt/cDWPLzP
[02:30] <storrgie> i dont have an account there either
[02:30] <storrgie> im the worst
[02:30] <relaxed> according to `du` on a sample I ran `flac --best` on: 36148   sample.flac
[02:31] <relaxed> ffmpeg with the options I gave you: 36128   ffmpeg.flac
[02:31] <relaxed> FLAWLESS VICTORY
[02:31] <llogan> A winner is you.
[02:31] <llogan> (guess the game)
[02:31] <relaxed> We get signal.
[02:32] <sacarasc> storrgie: Are you sure they're ALAC and not just AAC?
[02:32] <relaxed> llogan: I had to google it :(
[02:33] <relaxed> but I played it quite a bit as a kid
[02:33] <llogan> Now the song is stuck in my head.
[02:33] <storrgie> I believe they are (https://gist.github.com/storrgie/72a23c470eca92c4bb74)
[02:34] <storrgie> when I try to play the resulting flac files in mpd I see errors
[02:34] <sacarasc> Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 265 kb/s (default)
[02:34] <storrgie> sacarasc, oooo
[02:34] <relaxed> they are aac, so there's no point in using flac
[02:35] <storrgie> dese fakin uploaders
[02:35] <storrgie> I do have some ALAC here
[02:35] <storrgie> one tic
[02:36] <storrgie> helps to test with the right data, sorry, thanks for pointing that out
[02:37] <storrgie> so does ffmpeg even use flac under the hood?
[02:38] <llogan> ffmpeg has a native flac encoder
[02:38] <storrgie> llogan, that is quite cute
[02:39] <storrgie> relaxed, is there any way I could also delete the input m4a files in that bash loop (pardon my bash newbism)
[02:40] <relaxed> ffmpeg command; rm "$f";done
[02:40] <bparker> oh hai
[02:41] <storrgie> bparker, ohaifriend
[02:42] <Irrelium> I got it working, thanks llogan
[02:42] <relaxed> storrgie: it's wise to use `echo` to see what will be done when running loops and commands like that, just in case.
[02:45] <storrgie> relaxed, it might not be working quite right... mpd seems to be not reading the files. lemme get the mpd log
[02:45] <Irrelium> Seems a good idea to me to run a separate script to rm them after you are sure the outputs turned out ok
[02:45] <storrgie> https://gist.github.com/storrgie/be4e30826f6b2ed68795
[02:45] <storrgie> not sure why, but mpd doesn't seem to like these flac files produced by ffmpeg
[02:46] <crawln> maybe someone in here can tell me why the compiled version of ffmpeg messes up on this script.
[02:46] <crawln> http://pastie.org/private/ffmtsnkmne1ldw0nmegn4g
[02:47] <bparker> crawln: define 'messes up'
[02:47] <bparker> llogan: wow, you must get a lot of that.
[02:47] <crawln> I can't show the complete console output of the loop
[02:47] <bparker> that there's a command for it
[02:47] <crawln> TYVM
[02:47] <bparker> crawln: why not?
[02:47] <crawln> because I have yet to get it to print to anything
[02:48] <llogan> crawln: see "/msg fflogger help"
[02:48] <bparker> crawln: you mean running it doesn't print anything at all?
[02:48] <bparker> what if you just run the ffmpeg line itself?
[02:48] <crawln> no i mean when it runs it does 1st file fine then starts sending out unintelegible data
[02:49] <crawln> works fine by itself
[02:49] <bparker> so paste that
[02:49] <crawln> but starts cutting characters off the filenames if i put it through the loop
[02:49] <bparker> everything it outputs.
[02:49] <bparker> crawln: do your files have spaces in them?
[02:49] <crawln> no
[02:49] <bparker> try not using while.
[02:49] <crawln> this script works fine on the non-complied version of ffmpeg
[02:49] <bparker> for file in `find ...`; do ffmpeg ... $file; done
[02:53] <crawln> hmm let's see if i can put this in terms you understand better. Precompiled ffmpeg -- works with script. Compiled from git -- does not work from script because it's cutting filename characters out of the variable.
[02:53] <crawln> but echoing the command shows that the filenames where never cut from the command
[02:54] <crawln> so since the only things that have changed. is and are the fact that ffmpeg was compiled. is there a reason that i would start getting filename that are not what was sent in the command issued.
[02:57] <crawln> Now since this has been tested on 2 different systems running 2 different OS's 1 ubuntu 12.04 server the other being Arch Linux x64. Both of which work fine with the ffmpeg from repository and this script. But if I compile ffmpeg on each system. FFmpeg starts cutting the filenames till there's nothing left.
[02:58] <relaxed> crawln: http://mywiki.wooledge.org/BashFAQ/089
[02:58] <relaxed> or ask in #zsh
[02:59] <crawln> this happens regardless of zsh or bash
[02:59] <crawln> i've done both
[02:59] <crawln> the zsh was to see if it was something I wasn't thinking of
[03:01] <crawln> again your thinking it's a problem with my script. that does work. I have a problem with ffmpeg cuting the fucking filenames
[03:01] <crawln> "ffmpeg -i ./Star.Trek.Voyager.s01e03.Parallax.mkv -c:v copy -c:a libfdk_aac ./Star.Trek.Voyager.s01e03.Parallax.mp4" does not fking equal "ffmpeg -i ./tar.Trek.Voyager.s01e03.Parallax.mkv -c:v copy -c:a libfdk_aac ./tar.Trek.Voyager.s01e03.Parallax.mp4"
[03:01] <crawln> or how about by the time it get's to file 30
[03:02] <crawln> when it's "ffmpeg -i ./ax.mkv -c:v copy -c:a libfdk_aac ./ax.mp4"
[03:02] <crawln> those are not the commands being issued to ffmpeg
[03:02] <llogan> That's a feature. You don't want to watch Voyager anyway.
[03:02] <llogan> It should re-encode them to TOS.
[03:04] <storrgie> ooo, bash question... I'm about to try to process a ton of ALAC files... can I scan folders recursively for them?
[03:04] <storrgie> this is what I've got so far: for f in *.m4a; do ffmpeg -i "$f" -c:a flac "${f%.m4a}.flac"; rm "$f"; done
[03:04] <storrgie> I think there is a bash 'find'
[03:05] <crawln> fking useless
[03:06] <crawln> for the record. the find is because some things are more than a folder deep. hints for fking blah won't go more than the current folder.
[03:07] <crawln> idiots
[03:21] <relaxed> contrary to what that troll said, for i in download/*/*/*flac;do echo "$i";done
[03:21] <relaxed> works fine
[03:24] <relaxed> but using find is probably more effective
[04:09] <thebombzen> storrgie: the find command is quite useful :D try: find -name \*.m4a
[04:11] <thebombzen> or if you want to convert, try find -name \*.m4a | parallel ffmpeg -i {} -c:a flac {.}.flac
[04:11] <thebombzen> GNU Parallel reads a list of files from stdin, and {} means the filename, and {.} means the filename - the extension
[04:12] <thebombzen> or you could use {/} to mean the filename without the directory, or {/.} for the name without the directory or the extension
[04:13] <thebombzen> that is to place myalac/*.m4a to myflac/*.flac do find myalac -name \*.m4a | parallel ffmpeg -i {} -c:a flac flac/{/.}.flac
[04:14] <thebombzen> (note that \* prevents the shell from expanding the * but "*.m4a" works too
[04:25] <ac_slater> hey guys, I'm working with some embedded devices and opencv. I'm curious if anyone in the ffmpeg world has anything bad to say about opencv's ffmpeg layer
[04:25] <ac_slater> debating creating a replacement for my own purposes
[08:06] <mohit> Hi folks
[08:06] <mohit> i am encoding camera frames using FFMPEG in android
[08:07] <mohit> But frames pixel format is YV12
[08:08] <mohit> i swapped U and V like this http://stackoverflow.com/questions/16392521/how-to-convert-from-yv12-to-yuv420p
[08:08] <mohit> But its not working and i am getting green colored frames
[08:08] <mohit> anyone help please
[08:09] <anshul> how are you trying, are yiu using ffmpeg command or library
[08:10] <mohit> library code
[08:10] <anshul> have you defined the pix_fmt
[08:11] <anshul> I think ffmpefg support yv12 if you set the pix_fmt
[08:11] <mohit> where>
[08:11] <mohit> http://stackoverflow.com/questions/16392521/how-to-convert-from-yv12-to-yuv420p
[08:12] <mohit> i am swapping after filling frame from data
[08:27] <SirCmpwn> I have a microphone on computer 1
[08:27] <SirCmpwn> I have ffmpeg on computer 1 and computer 2
[08:27] <SirCmpwn> I can ssh into computer 2
[08:27] <SirCmpwn> can I talk and have sound come out of computer 2
[08:28] <relaxed> stream the mic audio to computer 2
[08:29] <SirCmpwn> thanks, that was super helpful
[08:29] <relaxed> https://trac.ffmpeg.org/wiki/StreamingGuide
[09:34] <anshul> mohit:you can look at the link http://code.google.com/p/video-manager-and-generator/source/browse/overlay.c
[11:51] <__raven> i need to build a quality test chain for some params - anyone who did such already?
[15:13] Last message repeated 1 time(s).
[16:07] <x_> I am getting [jack @ 0x2f5f240] Audio packet xrun while using x11grab but the jack server itself does not indicate any xrun. Secondly the audio coming threw the speakers is just fine. Is there a way around this?
[16:08] <x_> working on a pastebin of my command.
[16:12] <x_> Going to tinker with it a bit first.
[16:35] <__raven> i need to build a quality test chain for some params - anyone who did such already?
[17:25] <Maverick|MSG> what's the typical framerate of an animated gif?
[17:25] <Maverick|MSG> (even though a gif doesn't really have a framerate)
[17:37] <x_> Probably has more to do with the over all size of the animated gif
[18:30] <Maverick|MSG> what pixel formats are available when encoding to a gif?
[19:45] <DeadSix27> Maverick|MSG: rgb8 is what i know of
[19:45] <Maverick|MSG> yeah, rgb8 and pal8 are the only ones I've found so far, but an 8 bit palette is pretty weak
[19:46] <DeadSix27> rgb24?
[19:46] <DeadSix27> not sure if that works
[19:46] <Maverick|MSG> tried that as well; ffmpeg resets back to using pal8
[19:46] <Maverick|MSG> Incompatible pixel format 'rgb24' for codec 'gif', auto-selecting format 'pal8'
[19:47] <Maverick|MSG> tried increasing the bitrate as well but no luck
[19:49] <Maverick|MSG> oh, bgr8 also works apparently
[19:50] <Maverick|MSG> same scenario though
[19:51] <klaxa> gif is limited to 256 colors by format definition
[19:52] <klaxa> there's nothing you can do about that
[19:52] <klaxa> you can, however, defined an optimized color pallet, not with ffmpeg though
[19:53] <Maverick|MSG> ah, right, sorry.  I was more complaining about the fixed 8 bit color palette
[20:02] <Maverick|MSG> klaxa do you know if ffmpeg has plans to integrate a dynamic palette?
[20:02] <klaxa> i don't think so
[20:02] <Maverick|MSG> dang, ok
[20:02] <Maverick|MSG> thank you for the help
[20:02] <klaxa> you can export it to individual frames though
[20:02] <Maverick|MSG> how?
[20:03] <klaxa> and use something like gimp to generate an optimized color pallette
[20:03] <Maverick|MSG> oh, yeah.  I was hoping for ffmpeg to do everything in terms of turning a video into an animated gif
[20:03] <Maverick|MSG> rather than use a secondary program
[20:03] <klaxa> it can do it, but it will look like crap :P
[20:03] <klaxa> http://linuxers.org/tutorial/how-extract-images-video-using-ffmpeg
[20:04] <klaxa> you might want to look at imagemagick instead of gimp
[20:04] <klaxa> just remembered
[20:04] <Maverick|MSG> yeah, googled around a bit and imagemagick's convert application does it
[20:04] <klaxa> i haven't used the gif feature of imagemagick extensively but i'm quite positive they support optimized color pallets
[20:05] <Maverick|MSG> http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
[20:06] <Maverick|MSG> it looks kinda ugly, but I can live with it
[20:06] <Maverick|MSG> was just hoping for some magical switch that would fix the palette
[20:07] <klaxa> i bet one could port that from gimp or imagemagick, nobody has felt the need to do so though, or it's not feasible and one gets told to use those tools instead
[20:27] <Freakshow> folks, what is has_b_frames=2 telling me from ffprobe?
[20:44] <burek> Freakshow, does this help? https://www.google.com/search?q=has_b_frames+site%3Affmpeg.org
[20:44] <burek> http://ffmpeg.org/doxygen/trunk/structAVCodecContext.html#a686a77363668795c15c87b532cc455fa
[20:47] <Freakshow> burek: that was one step away from lmgtfy
[20:48] <Freakshow> but effectively the same
[20:49] <Freakshow> I'm not clear on how this would be getting set to 2 then
[20:49] <burek> sadly yeah
[20:49] <burek> docs say nothing about that option, so.. :/
[20:50] <burek> ‘has_b_frames integer’
[20:50] <burek> that's all :/
[20:50] <burek> http://www.ffmpeg.org/ffmpeg-all.html
[21:04] <Freakshow> it's curious that I see this
[21:04] <Freakshow> 3115     if (h->avctx->has_b_frames < 2)
[21:05] <Freakshow> in h264.c
[21:06] <Freakshow> it's clearly expected to be 2 at some point
[21:20] <iive> ever heard of b-frame pyramid?
[21:21] <Freakshow> I have but only in reading through other docs, would you mind explaining a little?
[21:21] <Freakshow> googling as well
[21:22] <iive> well, with b-frame pyramid, you can have b-frames using other b-frames for prediction. aka something like second level of decoding.
[00:00] --- Thu Jan 23 2014


More information about the Ffmpeg-devel-irc mailing list