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

burek burek021 at gmail.com
Sat Feb 2 02:05:02 CET 2013


[02:51] <ulatekh> I accidentally encoded a .flv video with the wrong audio, and I'm trying to replace it, but "ffmpeg -i old.flv -an -vcodec copy -i new.mp3 -acodec copy -f flv new.flv" exits with "Unknown decoder: 'copy'".  Does anyone know how do I do what I want?
[02:51] <ulatekh> This is the latest git-master ffmpeg from about a week ago.
[03:00] <ulatekh> Anyone awake?
[03:05] <ulatekh> OK, one sec.
[03:06] <ulatekh> http://pastebin.com/j8q7HW6s
[03:07] <llogan> also paste the output of: ffmpeg -i old.flv -i new.mp3
[03:08] <ulatekh> OK, one more sec.
[03:09] <ulatekh> http://pastebin.com/ip2AHAGS
[03:09] <ulatekh> Thanks for looking into this for me, llogan.
[03:09] <llogan> ffmpeg -i old.flv -i new.mp3 -map 0:0 -map 1:0 -c copy -shortest out.flv
[03:10] <ulatekh> OK, I'll try that, one sec.
[03:10] <llogan> note that your new audio stream is ~6 seconds shorter duration
[03:10] <ulatekh> The old audio stream, being the wrong one, was too long.
[03:11] <ulatekh> No errors...let me look at the result
[03:12] <ulatekh> Looks like it worked!  Awesome!  I'll have to look up the meaning of "-c copy -shortest".
[03:12] <ulatekh> Still...shouldn't "-vcodec copy" have worked?
[03:13] <llogan> yes, but you were applying it to the decoder of new.mp3
[03:13] <llogan> in other words, you were using -vcodec copy as an input option
[03:14] <ulatekh> Oh...I thought I had to put those options after the input file they related to.
[03:15] <ulatekh> What would have been the correct command line with "-acodec copy" and "-vcodec copy"?
[03:15] <llogan> -c copy does the same as -acodec copy and -vcodec copy (and more)
[03:16] <llogan> An empty stream specifier matches all streams, for example -codec copy or -codec: copy would copy all the streams without reencoding.
[03:16] <llogan> http://ffmpeg.org/ffmpeg.html#Stream-specifiers-1
[03:16] <llogan> and -c is an alias for -codec
[03:17] Action: llogan is going to be afk for a while
[03:17] <ulatekh> Hmmm, looks like I have to take my knowledge of the ffmpeg command line up to the next level.  Thank you very much for your help!
[03:55] <sunjun_> http://www.beyond3d.com/content/articles/8/
[04:35] <temhawk> wow, why is the ffmpeg syntax so hard to read??
[04:36] <temhawk> take this  for example: http://pastie.org/6003419 wtf!?
[04:36] <temhawk> that's just for combining two videos ¬¬
[08:27] <ledil> Hi, Im getting this error: http://pastebin.com/64JFAwjM, Ive used ffmpeg 0.5 before and I have now switched to ffmpeg 1.1 ...
[08:40] <Sunil_> for MPEG-ts file , wanted to change service name, provider . tried -metadata service_name="Some Channel" , it seems ti does not change service name
[10:59] <buhman> wow, that's some dark magic there: http://pastie.org/6003419
[10:59] <buhman> I would have put them in mpg containers and simply concatenate
[11:11] <samuele> Hi everyone, I have a little question on the LICENSE
[11:14] <samuele> I found an android port of FFmpeg compiled with --enable-gpl free just for personal use. I can't bundle it in any developed new app. Is this a violation in terms of license, right?
[11:16] <khali> samuele: definitely
[11:16] <samuele> Thanks, it was just for confirmation. I'm about to say this over there.
[11:17] <khali> actually I'm a bit too enthusiastic with "definitely"
[11:17] <samuele> over thei website I mean
[11:17] <khali> it probably depends on the other build flags
[11:17] <Mavrik> wait
[11:17] <samuele> I can paste them if you want.
[11:17] <Mavrik> samuele: can't really parse your sentence. does it have "--enable-gpl" or not?
[11:17] <samuele> yess sir
[11:18] <Mavrik> does it have "--enable-nonfree"?
[11:18] <khali> samuele: if includes other --enable flags which cause non-GPL code to be included then you must check the terms of these other licenses
[11:18] <samuele> nope
[11:19] <Mavrik> so, if you only have "--enable-gpl" without "--enable-nonfree" your ffmpeg binary is GPL licensed
[11:19] <Mavrik> which means you can distribute it with your app, you can call it and everything
[11:19] <samuele> OK: checked. "--enable-nonfree" not included.
[11:19] <khali> thanks Mavrik for being more accurate that I was
[11:20] <Mavrik> you may not link against ffmpeg libraries without making your code available under GPL license though
[11:20] <Mavrik> khali: just being more specific, you were right the entire time ;)
[11:20] <samuele> Mavrik: this is wat I meant with my question.
[11:20] <samuele> so should I point this out to them?
[11:20] <Mavrik> samuele: to who?
[11:21] <Mavrik> and as I said... you can distirbute "ffmpeg.exe" and call it from other app to do encoding without violating GPL
[11:21] <samuele> sorry: to who built this FFmpeg port to android and released NOT for free if I want to bundle it in an App of mine
[11:22] <Mavrik> samuele: are you going to call ffmpeg binary (so use "runtime.exec("ffmpeg -i blahblah")) or are you going to call avcodec_decode... things manually?
[11:23] <samuele> I don't really know, because the project is meant to be used as a library. I'm not an expert here, but I can go through further search
[11:24] <Mavrik> ok
[11:24] <Mavrik> in first case you may use it,  in second your code has to be GPL as well
[11:24] <Mavrik> that's the distinction
[11:24] <samuele> do you want the links to the source code?
[11:24] <Mavrik> I don't have time to really check it right now
[11:25] <samuele> ah ok. anyway should be free to use. And my app is also GPLv3...
[11:25] <samuele> ok.
[12:08] <khali> is there a way to ask ffmpeg for the help/format of a specific filter?
[12:08] <khali> -filters gives the list of filters but that is very succinct
[12:12] <MessedUpHare> Hi all, I'm trying to figure out a way of programatically recording the output of -vf cropdetect - but i'm struggling to do so as the output is all on a single line
[12:12] <MessedUpHare> is there something I'm missing here
[12:13] <MessedUpHare> In an ideal world, I would like to end up with a text file which states times (or frame number) along with a detected change of "-vf crop" values
[12:27] <MessedUpHare> not to worry, awk has saved the day
[12:36] <someone-noone> Hello! Where can I read about how can I do Annex B->AVCC and AVCC->Annex B converting in h264 for dummies? :) I found lot information in internet but I there is smth I don't understand (I can't properly parse my h264 annex-b stream)
[13:02] <relaxed> someone-noone: To demux from mp4 use ffmpeg -i h264.mp4 -c:v copy -bsf:v h264_mp4toannexb -an out.h264
[13:02] <someone-noone> relaxed, dude thanks, but I want to make my own demuxer and can't find sutiable specs for that
[13:03] <someone-noone> relaxed, I've read ffmpeg code but I'd rather look at specs
[13:04] <relaxed> I don't believe the h264 spec is free but that doesn't mean you can't find it for free.
[13:05] <JEEB> it is
[13:05] <relaxed> it is free?
[13:05] <JEEB> they release it for free after six or so months after it's released
[13:05] <JEEB> and the last updated spec was released in 12/01
[13:05] <relaxed> ok, maybe you can point him in the right direction.
[13:05] <JEEB> I already did
[13:05] <JEEB> I linked him the H.264 spec before
[13:05] <someone-noone> I've already read 'bout avcc format
[13:05] <someone-noone> it's clear for me
[13:06] <JEEB> relaxed, if you don't believe it's free here you go http://www.itu.int/rec/T-REC-H.264-201201-I :)
[13:06] <someone-noone> but I can't found any information about Annex B(actually, I can, but it doesn't seem to be true)
[13:06] <relaxed> I have no reason to doubt you.
[13:06] Action: relaxed sometimes makes wrong assumptions
[13:06] <JEEB> ISO generally has its specifications locked
[13:07] <JEEB> ITU-T seems to be more lenient with some specs
[13:07] <JEEB> H.262 / MPEG-2 Video seems to be locked down, though
[13:07] <JEEB> I wonder what they'll do with H.265, for adoption a similar protocol as they do with H.264 would be nice
[13:14] <JEEB> also, no... seems like ISO actually has this specification available for free as well
[13:14] <JEEB> http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html
[13:14] <JEEB> I always miss the "you can also get this specification for free from the ITTF" on the ISO spec page
[13:27] <someone-noone> how can I produce avcc stream from ffmpeg(using libx264)? I tried to do this from .mp4: ffmpeg -i test.mp4 -c:v copy -an -f h264 test.h264
[13:28] <someone-noone> But it seems that output file has own mp4 format (first byte is not equal to 1)
[13:28] <someone-noone> and also result is not demuxable with ffmpeg
[13:29] <someone-noone> however, If I do ffmpeg -i test.mp4 -c:v libx264 -an -f h264 test.h264
[13:29] <someone-noone> the result is always in annex b
[13:34] <brx_> my ffmpeg question http://pastebin.com/QHHtHL0K
[13:44] <khali> brx_: I think your best chance is to add an empty audio channel to one.mp4
[13:45] <brx_> khali, do i do that durig the command where I create the video from jpg?
[13:46] <brx_> i couldnt find how to do this when searching the docs
[13:46] <brx_> ffmpeg -y -loop 1 -i blah.jpg -t 3 -vcodec libx264 one.mp4
[13:46] <khali> yes I'd do that in the first step
[13:46] <brx_> what must i add?
[13:46] <khali> I don't know, I never had to do that
[13:47] <brx_> ok
[13:48] <khali> brx_: I think you can pass -i twice
[13:49] <khali> brx_: prepare a silent .wav file and pass it that way
[13:49] <brx_> khali, ok i will try that
[13:49] <brx_> thanks
[13:50] <khali> you may have to pass -loop twice, but I'm not sure if it supports anything else than still pictures
[13:50] <khali> brx_: so you may have to make your .wav file the right size it the first place
[13:51] <brx_> ok
[14:58] <digited> hi
[14:59] <digited> are there any examples of encoding video with adding fancy effects from showwaves filter?
[14:59] <digited> (also, ffplay example with showwaves/showspectrum doesn't work)
[17:39] <Marco-123> hi all. I have a board with an ARM processor (and a NEON hardware accelerator), which is running Ubuntu Linux v10.04. I am building ffmpeg and my goal is to make sure it is taking full advantage of the hardware on the board. It's a freescale IMX53 btw. After much googling, I set a few flags in the configure script, and the script tells me "NEON enabled: yes" but the encoding performance is quite slow (same as when it says "NEON e
[17:39] <Marco-123> can someone provide advice on how to build this project properly?
[17:40] <Marco-123> or if there is a conclusive way to tell if the hardware accelerators are being used? another point is that the configure also tells me "enabled hwaccels: " and nothing is listed there.
[17:53] <samuele> Hi. I have a question about compiling
[17:54] <samuele> if I add "--enable-libmp3lame" I get the error "libmp3lame >= 3.98.3 not found"
[17:54] <JEEB> see config.log
[17:54] <JEEB> have you built lame yourself or trying to utilize a package in your OS?
[17:55] <samuele> I downloaded the libmp3lame source, compiled and I have libs in /usr/local/libs
[17:56] <samuele> I need mp3 in an ffmpeg for android. The build w/o libmp3lame works OK
[17:57] <samuele> config.log : error: lame/lame.h: No such file or directory
[17:57] <khali> samuele: odds are that /usr/local isn't looked at
[17:58] <samuele> I also tried adding in the build script "export LD_LIBRARY_PATH=/usr/local/lib"
[17:59] <khali> samuele: LD_LIBRARY_PATH is for runtime IIRC
[17:59] <khali> won't help configure find includes
[17:59] <samuele> :8
[17:59] <samuele> ok
[17:59] <khali> samuele: did you try --extra-cflags=-I /usr/local/include ?
[18:00] <khali> hmm, without space
[18:00] <khali>  --extra-cflags=-I/usr/local/include
[18:00] <samuele> trying now. thanks.
[18:00] <JEEB> if your compiler doesn't look there by default, you need both that
[18:00] <JEEB> as well as --extra-ldflags=-L/usr/loca/lib
[18:00] <khali> and --extra-ldflags=-L/usr/loca/lib
[18:00] <samuele> ok
[18:00] <JEEB> *local
[18:00] <khali> ah, JEEB was faster ;)
[18:01] <samuele> ok. call you back.
[18:01] <JEEB> also PKG_CONFIG_PATH=/usr/local/lib/pkgconfig is useful
[18:01] <JEEB> for some libs
[18:21] <samuele> hei khali and JEEB
[18:22] <samuele> giving "./configure --enable-libmp3lame" works
[18:22] <samuele> but putting --enable-libmp3lame in the build.sh script provided with this project don't
[18:22] <samuele> so I think it's the script that has to be checked
[18:33] <samuele> http://pastebin.com/D3nqNhpd
[18:35] <khali> samuele: ah, you're cross-compiling?
[18:35] <samuele> yes, for android.
[18:35] <samuele> I think this is bigger than what I can handle
[18:36] <samuele> and I think this sounds realy bad in English...
[18:37] <samuele> LoL
[18:38] <samuele> "--sysroot=$SYSROOT" can be this?
[18:40] <samuele> SYSROOT=$NDK/platforms/android-3/arch-arm
[18:40] <samuele> NDK=${HOME}/android-ndk
[18:41] <khali> samuele: I've never done that, sorry
[18:42] <khali> samuele: first question is, how did you build libmp3lame? it must be cross-built too, otherwise this can't work
[18:42] <samuele> not cross-built...
[18:43] <khali> samuele: so start with this
[18:44] <khali> samuele: and then you shouldn't install it to /usr/local, that would be for the host architecture
[18:44] <khali> samuele: you must setup a tree for your android libs
[18:46] <samuele> sorry. I missed the lines between "so start with this" and "and then  you shouldn't..."
[18:46] <samuele> I was reading above
[18:48] <nilsge> hi. In Archlinux ffmpeg is built withou support for jack audio connection kit (-f jack or -f alsa -i jack both say no jack and ffmpeg -formats does not list it).
[18:48] <nilsge> What is the configure switch to include it? --enable-jack or --enable-libjack are unknown
[18:53] <nilsge> I built from git anyway and it lists "jack" under indev now, at configure stage, at leas
[18:54] <nilsge> t
[19:03] <creep> hi
[19:03] <creep> why do people share TS and cam movies over net? ;/
[19:03] <creep> it is so much worse than going in a movie and watch it
[19:38] <troy_s> Anyone familiar in here with calculating the exact bit width of a raw Y' / Cb' / Cr' data stream in the avframe?
[19:38] <troy_s> YUVJ420P reports 12bpp, but the data is in fact only 8 bits wide.
[19:42] <JEEBsv> the 12bit comes from the fact that since you have Cb and Cr 8+8 for 2x2 area, you then get 4 bits per one (luma resolution) sample
[19:42] <troy_s> fflogger / durandal_1707 I'm using the API.
[19:42] <JEEBsv> so yeh, that value does not really tell you the byte size of a single value
[19:42] <troy_s> JEEBsv: Right. So is there a method to calculate the actual amount of data stored in a single unit of Cb / Cr?
[19:43] <troy_s> JEEBsv: Case in point, if I am attempting to yank out the raw 10 or 12 bit data from a DNxHD or ProRes stream, is there a method to figure out the width of the unit?
[19:43] <durandal_1707> isn't that stored in container/bistream
[19:44] <troy_s> durandal_1707: Bit depth reports 12 as expected for YUVJ420P for example. I'm willing to admit I am missing some other variable to check.
[19:44] <durandal_1707> only if you found out that all lower bits are zero
[19:44] <troy_s> durandal_1707: I can't see that as being too effective given the nature that the data might be zero.
[19:45] <JEEBsv> troy_s: if it's decoded already, it's probably in a format where a 16bit variable is used if it's >8bit , it depends on the PIX_FMT
[19:45] <JEEBsv> YUV420P is 8bit
[19:45] <troy_s> I'm thinking there is an obvious method to determine the width of a given unit of Cb / Cr (in the case of YUVJ420P, it's 1 byte per sample.)
[19:45] <troy_s> JEEBsv: Yes. I'm just hoping that there is a variable to read. I'd had to make guesses based on PixFmt as to the width of the chroma.
[19:46] <troy_s> JEEBsv: Similar to the bitwise shift for chroma widths and height for example.
[19:48] <troy_s> Looks like there might be a pixel_shift value. Urgh.
[19:49] <durandal_1707> so you actually want bits per pixel?
[19:55] <troy_s> durandal_1707: I'm dumping the raw YCbCr
[19:55] <troy_s> durandal_1707: So yes... I'm looking for the exact width of a Cb / Cr / Y value in the data, as opposed to me guessing.
[19:59] <durandal_1707> troy_s: each pix fmt have its descriptor in libavutil/pixdesc.c
[20:03] <troy_s> durandal_1707: Yes. I just found what MN replaced for the avg_bits_per_pixel - av_get_padded_bits_per_pixel.
[20:03] <llogan> burek: i should stop opening an reply box and replying half an hour later...i didn't see your post until after.
[20:03] <burek> it's ok :)
[20:03] <burek> also, i didnt thank you for helping me there
[20:03] <burek> so, thank you :)
[20:04] <llogan> nice IMPORTANT box
[20:04] <burek> i appreciate it :)
[20:04] <durandal_1707> troy_s: that is how it is stored in memory i guess ...
[20:04] <burek> well, i had to make it ridiculously big and red
[20:04] <burek> because people just didnt read it at all.. :S
[20:04] <llogan> now lets see how many people still miss it
[20:04] <troy_s> durandal_1707: Yes... looks like those are the two tools. I was already referencing the log2_chroma_h and w for shifting, but I need to get the actual value.
[20:04] <troy_s> durandal_1707: Thanks for your help by th wya.
[20:08] <divVerent> stupid question, but what is the "proper" way to use the showspectrum filter with ffplay?
[20:08] <divVerent> as in, is there anything simpler than ffplay -f lavfi 'amovie=filename.mp3, showspectrum'
[20:08] <divVerent> because, THIS one can't seek
[20:13] <saste> divVerent, no simple solution ATM
[20:13] <saste> i'm working right now on -af in ffplay
[20:13] <saste> but that doesn't fix the problem
[20:13] <saste> another solution would be to port filter_complex to ffplay
[20:13] <divVerent> saste: for the specific case BTW
[20:13] <saste> or to add seek support in movie
[20:14] <divVerent> in the long run, don't we want to get rid of ffplay's own visualization
[20:14] <divVerent> and just use showspectrum?
[20:14] <saste> divVerent, yes
[20:15] <saste> but code doesn't write it itself (yet)
[20:15] <divVerent> sure
[20:15] <saste> which is a shame
[20:15] <divVerent> and it doesn't seem trivial
[20:15] <divVerent> also due to lack of -filter_complex :P
[20:16] <divVerent> the alternative BTW would be making amovie able to seek
[20:16] <divVerent> how likely is that?
[20:16] <divVerent> (and movie too, of course)
[20:19] <saste> divVerent, i can only say that is on my todo list, but that's a long list
[20:20] <divVerent> hehe
[20:20] <divVerent> it also doesn't seem trivial
[20:20] <divVerent> just wishful thinking... but if it WERE done, it could become ffplay's ONLY input
[20:20] <divVerent> (and other options remapped to using the movie source)
[20:21] <divVerent> actually, ffmpeg's too... for ffmpeg it seems even more viable
[20:21] <divVerent> now if only it wouldn't need weird filename escaping... ;)
[20:47] <patbam> hi, how can i convert a NIST Sphere file to wav? I've tried & failed to find it in the docs
[20:50] <burek> ffmpeg -i SOMETHING out.wav
[20:50] <burek> where SOMETHING is your file
[20:51] <patbam> i got this output: http://pastie.org/6019879 does it mean my file is borked?
[20:51] <patbam> (& thanks)
[20:52] <Gergov> guys how to create an flv file from an mp3 and a .jpg with decent quality ?
[20:54] <Gergov> is there some standard terminal command that dont involve 1000 options
[21:07] <llogan> Gergov: to what output format(s)?
[21:09] <llogan> patbam: can you provide a sample file?
[21:10] <Gergov> llogan, .flv
[21:10] <Gergov> i want to upload a song to youtube
[21:10] <patbam> llogan: i'm afraid i cant because the files are under copyright to a university :(
[21:10] <sacarasc> Gergov: You don't need FLV to upload to youtube, you can do pretty much anything.
[21:11] <Gergov> sacarasc, well then i dont care about the output format :) if any will do the work
[21:11] <llogan> patbam: i found one and ffmpeg decodes it with no problem.
[21:11] <patbam> llogan: hmm, did oyu just use ffmpeg -i foo.sph foo.wav?
[21:11] <patbam> maybe my files are borked somehow
[21:11] <llogan> no, i just did: ffplay speech.sph
[21:12] <sacarasc> Gergov: ffmpeg -loop_input -i foo.jpg -i blah.mp3 -shortest -c:v libx264 -preset slow -crf 18 -c:a copy output.mkv
[21:12] <sacarasc> I think that would work, but I am a little rusty.
[21:12] <llogan> Gergov: https://ffmpeg.org/trac/ffmpeg/wiki/EncodeforYouTube
[21:13] <llogan> s/-loop_input/-loop 1
[21:13] <Gergov> sacarasc, i get Unrecognized option 'c:v' Failed to set value 'libx264' for option 'c:v'
[21:13] <sacarasc> Or just upgrade to a newer version.
[21:14] <llogan> patbam: i guess your file is damaged, or your ffmpeg version is too old, or maybe there is a sph variant that ffmpeg doesn't understand
[21:14] <patbam> llogan: this is the file header: http://pastie.org/6020822 i'm wondering if the "sample_coding -s27 ulaw,embedded-shorten-v2.00" bit is suspicious. i think it's just a variant of ulaw. is there a way i can force ffmpeg to try using ulaw to decode (demux?)?
[21:14] <Gergov> sacarasc, ffmpeg version 0.8.5-6:0.8.5-0ubuntu0.12.10.1 is this old?
[21:14] <sacarasc> That's probably not even ffmpeg.
[21:14] <JEEBsv> that's libav, if you want to use libav, switch to the 'avconv' command
[21:15] <Gergov> sacarasc,  i typed aptitude install ffmpeg :) it should be it. or not ?
[21:15] <JEEBsv> nah, debian/ubuntu use libav
[21:15] <JEEBsv> (and gentoo now by default)
[21:15] <Gergov> i see
[21:16] <llogan> do they laso have a fake ffmpeg package?
[21:16] <llogan> *also
[21:16] <JEEBsv> the ffmpeg binary in libav is outdated (and was later removed), so 'avconv' is the command you'd want to use when using libav's stuff
[21:16] <Gergov> thanks :) ill then install ffmpeg and use the command sacarasc gave me
[21:17] <JEEBsv> llogan: gentoo? they have the nice thing of being able to recompile everything that depends on libav* so you can have both ffmpeg and libav there fully
[21:20] <llogan> Gergov: you can follow the compile guide or one of the recent static builds if you want ffmpeg from FFmpeg
[21:20] <llogan> https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
[21:21] <llogan> patbam: yes, you can apply options to the decoder, but maybe your file contains shorten and not pcm.
[21:22] <patbam> llogan: ah that sounds likely. do you happen to know know what shorten is?
[21:23] <llogan> yet another (dead?) lossless audio format
[21:23] <llogan> *losslessly compressed
[21:28] <llogan> patbam: just guessing here. maybe try: ffmpeg -ar 8000 -ac 2 -f shn -i input
[21:29] <patbam> llogan: hmm cool, it failed in a different way, that's progress :) http://pastie.org/6021755
[21:30] <llogan> i have no more ideas without a sample to monkey with
[21:32] <patbam> ok llogan, thanks!!
[21:33] <octe> i'm trying to follow this: http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20capture%20a%20lightning%20(thunderbolt)%20with%20FFmpeg to get a delayed stream
[21:33] <octe> but the second instance just says udp://127.0.0.1:5678: could not find codec parameters
[21:46] <llogan> burek made that guide, so maybe he'll see your output too
[23:30] <nilsge> anyone used ffmpeg with jack input and got rid of the thousands of xruns?
[00:00] --- Sat Feb  2 2013


More information about the Ffmpeg-devel-irc mailing list