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

burek burek021 at gmail.com
Mon Jan 16 02:05:01 CET 2012


[00:30] <toolfan> I'm trying to use FFmpeg in my app for encoding, and I suspect that I may be using the wrong pixel format.  I've looked through the docs, but I can't seem to find a list of which formats each encoder supports.  Is there such a list, or will I have to look through the source for this info?
[01:06] <lahwran> how would I convert from animated gif using ffmpeg? it seems to be only reading the first frame :/
[01:16] <falip> toolfan: not sure if this will help you but ffmpeg -formats and ffmpeg -codecs
[01:18] <falip> toolfan: as to which which encoders each format supports, I don't know, i've asked similar questions, usually people just seem to know for containers and codecs they use frequently.
[01:18] <lahwran> oh hm
[01:19] <lahwran> seems that it has multiple frames but far too high framerate
[01:36] <toolfan> falip: ok, thanks.  I guess I'll have to dive into the source to get a definitive answer.
[02:13] <Arthur_D> hi, how do I output ffprobe to a file? Tried ffprobe file.avi > output.txt but it doesn't work
[02:16] <grepper> ffprobe file.avi > output.txt 2>&1
[02:18] <Arthur_D> thank you very much :)
[05:57] <llrcombs> is there a way to give ffplay a playlist of files and have it play them one by one? (possibly displaying a default image or looping a default video if it runs out of files to play)
[06:00] <llrcombs> if not, I suppose I can use VLC
[06:03] <lahwran> will it not take it if you just give it more than one?
[06:03] <lahwran> perhaps multiple -i
[06:04] <llrcombs> lahwran: I want to be able to add items to the playlist as it goes
[06:04] <llrcombs> so it looks like VLC is where I should be
[06:04] <lahwran> ffplay is rather minimal
[06:04] <llrcombs> ffplay's probably not the best choice for anything that complex
[06:04] <lahwran> so yes
[06:05] <llrcombs> only thing I can't find in VLC is making it loop a default file if it runs out of playlist items
[06:05] <lahwran> I'm trying to convert from gif to avi - I'm using a three step process where I detect the gif's frame "rate", use imagemagick "convert" to convert to png, and then convert to avi with ffmpeg -r <detected framerate> -i <gif file> <avi file>
[06:06] <lahwran> https://gist.github.com/38590783d681126c6ae4 < this is my code - gif2avi.py
[06:06] <llrcombs> anything going wrong?
[06:06] <lahwran> however, it's resulting in a damaged avi file
[06:06] <lahwran> and I don't understand why
[06:06] <llrcombs> did you specify a video codec?
[06:06] <lahwran> no
[06:06] <llrcombs> try that
[06:07] <lahwran> what's a good one for very small files?
[06:07] <llrcombs> I usually reccomend x264 for nearly anything, as it's pretty versatile
[06:07] <lahwran> I have plenty of space and encoding speed is a priority, that still your recommendation?
[06:07] <llrcombs> x264 can be very fast
[06:08] <llrcombs> there's actually a "veryfast" setting
[06:08] <lahwran> -vcodec x264, yes?
[06:08] <llrcombs> I think it's libx264, actually
[06:08] <llrcombs> are these gifs animations?
[06:08] <lahwran> yes
[06:08] <llrcombs> -preset veryfast -tune animation
[06:09] <lahwran> erm
[06:09] <lahwran> wait, what do you mean by "animation?
[06:09] <lahwran> "
[06:09] <lahwran> they're various content, some of them converted video
[06:09] <llrcombs> then take out the -tune animation part
[06:10] <llrcombs> if it needs to be faster, set it to superfast. If you can bear slower, set it to faster
[06:10] <llrcombs> do the output files need to decode fast?
[06:11] <lahwran> Unrecognized option 'preset'
[06:11] <lahwran> fast enough to play is all
[06:11] <llrcombs> that's strange
[06:11] <llrcombs> what's the exact command, and what version are you on?
[06:11] <llrcombs> ffmpeg -version
[06:12] <lahwran> FFmpeg 0.6-4:0.6-2ubuntu6
[06:12] <llrcombs> ahh, that's old
[06:12] <llrcombs> go grab 0.9.1
[06:12] <llrcombs> or latest git
[06:12] <lahwran> I'd prefer not to compile it if I don't have to
[06:12] <lahwran> compiling takes ages on this cpu
[06:12] <llrcombs> 0.6 is not actively maintained
[06:13] <llrcombs> you need to move to a newer version
[06:13] <llrcombs> you might be able to find a precompiled one
[06:14] <llrcombs> if you can't find one, I might be able to cross-compile it for you
[06:15] <lahwran> I'll grab it from https://launchpad.net/~jon-severinsson/+archive/ffmpeg
[06:16] <llrcombs> ahh, good
[06:16] <llrcombs> grab that, then try it
[06:18] <lahwran> suddenly: everything breaks
[06:18] <lahwran> (it's still installing)
[06:18] <lahwran> nope, same result
[06:19] <lahwran> Unrecognized option 'preset'\nFailed to set value 'veryfast' for option 'preset'
[06:19] <llrcombs> what's ffmpeg -version say?
[06:19] <lahwran> ffmpeg 0.9.1-4:0.9.1-0ubuntu1~jon1~maverick1
[06:20] <llrcombs> hmm
[06:20] <llrcombs> try with -vpre instead of -preset
[06:20] <llrcombs> what's the build date?
[06:20] <lahwran> I dunno
[06:21] <lahwran> how do I find out? :P
[06:21] <llrcombs> it's in -version
[06:21] <lahwran> https://gist.github.com/769199a7a63f3fdf339e
[06:21] <lahwran> 2012-01-07 on the ubuntu ppa page
[06:22] <lahwran> -vpre works somewhat better; recognizes the option, but not the preset "veryfast"
[06:22] <lahwran> "File for preset 'veryfast' not found"
[06:22] <llrcombs> hmm, -preset was added on 2011-5-3, so it should be fine...
[06:23] <llrcombs> list the files in /usr/local/share/ffmpeg
[06:23] <lahwran> no such file or directory
[06:23] <lahwran> https://gist.github.com/a0bb05df4b6317454ea8
[06:28] <lahwran> when I remove the vpre option, it says Unknown encoder 'libx264'
[06:28] <llrcombs> ahh, there's our problem
[06:28] <llrcombs> your build is compiled without libx264
[06:28] <lahwran> heavenly.
[06:28] <llrcombs> you could try another codec
[06:28] <llrcombs> or another build
[06:28] <llrcombs> maybe it has libvpx?
[06:28] <lahwran> sounds like I'll have to build it myself after all
[06:28] <llrcombs> or theora
[06:28] <llrcombs> or mpeg4
[06:29] <lahwran> hm
[06:29] Action: lahwran tries mpeg4
[06:30] <lahwran> that worked.
[06:30] <lahwran> thanks!
[06:31] <llrcombs> if you need encoding to be even faster, I reccomend building your own ffmpeg with libx264 and setting it to veryfast. Otherwise, stick with your current settings, maybe mess with the arguments a bit
[07:06] <lahwran> llrcombs: hm, half an hour of encoding
[07:06] <lahwran> and then I try to play a file and vlc crashes and ffplay spews crap
[07:08] <lahwran> ffplay does play it sort of though, however completely different problem seems to be occurring (in addition to the damaged file, which I'm still confused about) - the delta frames are shown as mostly-black images, probably due to the imagemagick convert command not interpolating the frames
[10:44] <lahwran> hm, configure doesn't seem to be finding my lame installation
[10:44] <lahwran> https://gist.github.com/cba048dea6db7fe17579
[10:44] <lahwran> pretty sure I built it myself ages ago
[14:49] <ackbahr> Hi! What should I do about this message (and an output file that contains only audio)?
[14:50] <sacarasc> About what message?
[14:50] <ackbahr> sacarasc: Hey, you'r here as well? Good question.... This one : [mpeg @ 0x17c2e20] VBV buffer size not set, muxing may fail
[14:51] <Mavrik> paste whole command line and output to a pastebin
[14:51] <Mavrik> that message isn't helpful
[14:52] <ackbahr> Mavrik: ok!
[14:53] <KuroiTsuki> hi. umm, someone of mplayer/mencoder team told me that someone from ffmpeg team don't want to fix issue when embedded subs of mkv stay longer than they are supposed to in result video. why is that ffmpeg team don't want to fix issue?
[14:54] <ackbahr> Mavrik: http://pastebin.com/FCaDeaTd
[14:54] <Mavrik> KuroiTsuki, we're mostly not developers here
[14:54] <Mavrik> mailing lists are the right way to communicate with the devs
[14:56] <Mavrik> ackbahr, what are you trying to achieve with the command line? re-encode a 3gp to a mpeg2 file?
[14:56] <KuroiTsuki> ffmpeg-user or ffmpeg-devel?
[14:56] <ackbahr> Yes; in fact it's a script for all my cameras/phones/etc.
[14:56] <Mavrik> KuroiTsuki, devel
[14:56] <Mavrik> (probably)
[14:57] <KuroiTsuki> lol
[14:57] <KuroiTsuki> i see, thank you :)
[14:57] <ackbahr> It makes smaller versions of all videos that can be e-mailed as is (are?).
[14:57] <Mavrik> ackbahr, ffmpeg is sensitive to order of command line parameters
[14:57] <Mavrik> now you're forcing ffmpeg to interpret your input as mpeg-2 video and encode with a default codec (mpeg-1 it seems)
[14:58] <Mavrik> you need to move the -vcodec parameter after the "-i" input file parameter
[14:58] <ackbahr> Mavrik: seems I recall that from the beginning of the man page, but didn't think about it here... Great!
[14:58] <Mavrik> ackbahr, you'll also have to move other parameters
[14:59] <Mavrik> do something like
[14:59] <Mavrik> ffmpeg -y -i <file> -vcodec -deinterlace -threads 4
[14:59] <Mavrik> because right now -deinterlace (might) not work and "-threads 4" sets decoding threads not encoding threads
[15:00] <Mavrik> you're not getting any video because your input is probably H.264 and you're forcing a MPEG-2 decoder to decode it :)
[15:01] <ackbahr> Mavrik: Just moving the -vcodec seemed to work, but I might get quicker results with -thread in the right place.... Or in both?
[15:02] <Mavrik> just move it after -i... you won't get any significant speedups if you set them for decoding
[15:03] <ackbahr> Ok. What about deinterlace?
[15:03] <ackbahr> Mavrik: Only an encoding feature?
[15:04] <Mavrik> yeah
[15:04] <Mavrik> but I'm not sure about that one, it was replaced by -vf yadif (video filter) in new versions
[15:04] <ackbahr> Mavrik: Do you think I should use this one?
[15:05] <Mavrik> yadif is a better filter, I'm just not sure if it works with your ffmpeg
[15:05] <Mavrik> anyway, gotta go, :)
[15:05] <ackbahr> Mavrik: Thanks a lot, you made my day!
[16:16] <CrazyThinker> What is the best way to convert a mkv(h264) video to mp4(mpeg-4)?
[16:17] <CrazyThinker> losslessly
[16:17] <CrazyThinker> I tried doing just ffmpeg -i file.mkv file.mp4 -s hd1080
[16:17] <CrazyThinker> but it destroyed the quality of the video
[16:25] <JEEB> do you want to change the video codec or do you just want to remux
[16:25] <JEEB> if you just want to remux it'll be lossless
[16:26] <JEEB> mpeg4 codec (mpeg-4 part 2 has no lossless mode)
[16:26] <JEEB> so switching video codecs would be lethal
[16:26] <JEEB> ffmpeg -i input.mkv -acodec copy -vcodec copy out.mp4
[16:26] <JEEB> ^ this would copy audio and video streams from the input and would mux them into mp4
[16:30] <CrazyThinker> JEEB, my TV has a problem with h264 encoding
[16:30] <CrazyThinker> so I want to preserve the quality and convert it to avi or mpg
[16:30] <CrazyThinker> is that possible?
[16:31] <JEEB> you can use a lot of bitrate and make it look similar'ish
[16:31] <JEEB> but it isn't lossless :P
[16:31] <JEEB> anyways, I have no idea about the settings you have to give the mpeg4 encoder so don't ask me
[16:32] <JEEB> I don't encode for crappy plastic toys in anything else but H.264, thankfully
[16:33] <CrazyThinker> Thanks anyway
[18:37] <stonie> hi.. i want to create a video from single images.. trying with "ffmpeg -f image2 -i DSC_%04d.JPG foo.avi" always gives me "DSC_%04d.JPG: No such file or directory" .. files are all caled DSC_1159.JPG... DSC_1270.JPG
[18:39] <relaxed> the number sequence must start at (or near) zero
[18:40] <relaxed> you can cat jpgs though, cat *.JPG | ffmpeg -f image2pipe -vcodec mjpeg -i -
[19:42] <stonie> ok thanks trying that
[20:05] <BLZbubba> hello there, does anyone have a good command line for making high quality ipod touch 4g mp4 files?
[20:13] <Mavrik> can you tell the H.264 profile and level it supports?
[21:22] <cbreak> BLZbubba: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
[21:22] <cbreak> from apple's page
[21:22] <cbreak> h.264 is the highest quality codec those things support
[21:23] <cbreak> And iPhones: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
[21:23] <cbreak> (the 4S variant)
[21:24] <cbreak> no idea how ffmpeg exposes those, but x264 has a --level switch
[21:26] <JEEB> -level -profile:v
[21:26] <JEEB> -profile:v main
[21:26] <JEEB> -level 3.1
[21:26] <JEEB> should work
[21:27] <relaxed> if that fails, -level 31
[23:41] <JodaZ> wait, so what color space is video normally encoded in ?
[23:41] <JodaZ> like h264 on your standard blueray
[23:45] <Mavrik> yuv420 probably
[23:45] <Mavrik> it's the only really widely supported pixel format with acceleration everywhere
[23:53] <JodaZ> Mavrik, what does that mean ? y is 4 bit and u is 2 ?
[23:53] <JodaZ> i don't get the fancy box graphics on wiki
[23:55] <Mavrik> JodaZ, it means that every 8 pixels (two rows of 4) of black and white information get two 2x2 blocks of color information
[23:56] <Mavrik> JodaZ, http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios
[00:00] --- Mon Jan 16 2012


More information about the Ffmpeg-devel-irc mailing list