[Ffmpeg-devel-irc] ffmpeg.log.20150621
burek
burek021 at gmail.com
Mon Jun 22 02:05:01 CEST 2015
[00:57:04 CEST] <halfie> yay! my bitstream filter is finally working! :)
[00:57:29 CEST] <halfie> is there a way to use a bitstream filter with ffplay?
[00:57:36 CEST] <halfie> (probably not)
[01:00:21 CEST] <BtbN> ffmpeg -i something -c:v rawvideo -pix_fmt yuv420p -f sdl SDL
[01:00:37 CEST] <BtbN> just manualy do what ffplay automates
[01:28:23 CEST] <voldial> Why does "ffmpeg -y -i f247.webm -i f141.m4a -c copy -map 0:v:0 -map 1:a:0 out.mkv" produce different output on each run? The files are almost the same, but 16 bytes in the header changes each time.
[01:29:05 CEST] <x86iac> date?
[01:29:23 CEST] <x86iac> and your social security number?
[01:29:50 CEST] <chungy> random numbers for EBML tags
[01:30:56 CEST] <voldial> EMBL, that's trickey to search for, apparently it's a protein
[01:31:22 CEST] <voldial> ah. EBML
[01:32:23 CEST] <voldial> Can I disable that? I want repeatability.
[01:33:27 CEST] <x86iac> isn't webm already mkv?
[01:34:12 CEST] <voldial> x86iac: in this case, the webm file is just video, no audio
[01:34:42 CEST] <c_14> voldial: -flags +bitexact iirc, (or was it -fflags)?
[01:35:09 CEST] <JEEBsv> voldial: basically I think it's the segment UUID, and I think the bitexact option should fix it on some level
[01:35:25 CEST] <JEEBsv> it's common to refer to other files/segments with their UUID from other files
[01:37:08 CEST] <voldial> c_14: JEEBsv found it inthe format docs. thanks!
[01:39:44 CEST] <x86iac> when compiling the mpv - it needs zlib.pc - i don't have but made one ... is there a way point the old-configure to the libz itself?
[01:40:55 CEST] <x86iac> my zlib can't be pre pkgconfig?
[01:41:53 CEST] <c_14> It doesn't look like configure uses pkg-config to find zlib (from what I can see in the configure file anyway).
[01:43:28 CEST] <x86iac> it gives error that zlib.pc doesn't exist - and it didn't
[01:45:02 CEST] <c_14> Can you pastebin your config.log ?
[01:45:05 CEST] <x86iac> is it just saying that 'supposing' that is why the libz test failed? i have libz installed though
[01:45:08 CEST] <x86iac> sure
[01:46:31 CEST] <x86iac> it is = here is from a successful config (after i created the zlib.pc
[01:46:31 CEST] <x86iac> pkg-config --cflags zlib
[01:48:57 CEST] <x86iac> this from the std out Checking for zlib ... no
[01:48:58 CEST] <x86iac> Error: Unable to find development files for zlib.
[01:48:58 CEST] <x86iac> Check "old_build/config.log" if you do not understand why it failed.
[01:49:09 CEST] <c_14> ehm
[01:49:16 CEST] <x86iac> this is from the config.log
[01:49:22 CEST] <c_14> Where are you getting your copy of the ffmpeg source from?
[01:49:39 CEST] <x86iac> pkg-config --cflags zlib
[01:49:39 CEST] <x86iac> Package zlib was not found in the pkg-config search path.
[01:49:39 CEST] <x86iac> Perhaps you should add the directory containing `zlib.pc'
[01:49:58 CEST] <x86iac> that isn't ffmpeg - that is for mpv
[01:50:12 CEST] <c_14> Wait, ok. So what is your problem?
[01:50:47 CEST] <x86iac> i gave it at :39:20 above
[01:51:17 CEST] <c_14> If you're having issues building mpv, you should probably ask in #mpv
[01:51:44 CEST] <x86iac> nvm anyway - JEEBsv told me about mpv so i figured it was good here ;)
[01:52:01 CEST] <x86iac> it really wants to use pkgconfig to find it and doesn't test for libz directly
[01:52:25 CEST] <voldial> I must be doing this wrong, it's still not binary equal: ffmpeg -flags +bitexact -y -i f247.webm -i f141.m4a -c copy -map 0:v:0 -map 1:a:0 temp.mkv
[01:52:38 CEST] <voldial> I tried it without the + too
[01:53:12 CEST] <voldial> and "-fflags +bitexact" -> "Undefined constant or missing '(' in 'bitexact'"
[01:53:27 CEST] <c_14> voldial: should be an output option
[01:53:48 CEST] <c_14> x86iac: it's technically offtopic here, if you go to #mpv I'm sure somebody would be willing to help you
[01:56:37 CEST] <voldial> c_14: got it. thanks ffmpeg -y -i f247.webm -i f141.m4a -flags +bitexact -c copy -map 0:v:0 -map 1:a:0 temp9.mkv
[01:58:25 CEST] <x86iac> voldial: why do you need the bitexact?
[01:59:53 CEST] <voldial> x86iac: addressing things by hash
[02:36:11 CEST] <x86iac> h264 better then mpeg4?
[02:36:18 CEST] <c_14> yes
[02:36:50 CEST] <x86iac> i should work on updating my ffmpeg so h264 is the default
[02:37:15 CEST] <x86iac> mkv can be either h264 or mpeg4?
[02:37:29 CEST] <c_14> Or basically any other video codec you happen to find lying around.
[02:37:41 CEST] <c_14> matroska supports the kitchen sink
[02:38:22 CEST] <x86iac> webm is the best on youtube i think
[02:38:52 CEST] <klaxa> i don't think so
[02:39:10 CEST] <klaxa> i'd go with youtube's suggested formats and "quality" suggestions
[02:39:13 CEST] Action: c_14 likes webm with vp9 on youtube
[02:39:16 CEST] <klaxa> since they re-encode everything a bunch of times
[02:44:03 CEST] <x86iac> ealier i mentioned that ffplay can play things 'properly' that mplayer has problems with .. JEEBsv suggested it was because mplayer was broken .. but the files are recorded from internet radio and you can hear things that cause mplayer to gulp and then fail .. he suggested that ffplay does nothing with the file ..
[02:44:27 CEST] <x86iac> just wondering
[02:55:13 CEST] <x86iac> i got disconnected a while back and didn't realize it - did anyone comment on this?
[02:55:48 CEST] <c_14> No comments
[02:56:34 CEST] <x86iac> :)
[03:03:48 CEST] <kk> Trying to build ffmpeg on Centos with static libraries. Did a 'yum install' of libass-devel and that gives me a shared libass.so. Can't figure out how to build with static libraries (x265) and shared (ass).
[03:04:36 CEST] <c_14> You won't be able to make a completely static build, but it should work.
[03:06:59 CEST] <x86iac> no libass.a/la ?
[03:07:28 CEST] <kk> Correct.
[03:07:45 CEST] <c_14> kk: are you getting an error during configure?
[03:07:58 CEST] <kk> Yes: ERROR: libass not found using pkg-config
[03:07:59 CEST] <c_14> If so, please upload your config.log to a pastebin service and link it here
[03:08:24 CEST] <kk> For now I'm using the exact same configure command as shown on ffmpeg
[03:08:29 CEST] <kk> 's web site
[03:08:32 CEST] <c_14> Do you have .pc files for libass?
[03:08:43 CEST] <c_14> kk: where?
[03:08:49 CEST] <kk> yes. pkgconfg --libs works
[03:08:55 CEST] <c_14> There's a lot of configure lines on the website
[03:09:21 CEST] <kk> yup. I have a shorter version of what I really want, but it's still about 10 lines.
[03:09:47 CEST] <c_14> upload to a pastebin service like ix.io, sprunge.us, pastebin.com, pastie.org
[03:10:13 CEST] <kk> pkg-config --libs libass yields '-lass'
[03:10:41 CEST] <kk> pkg-config --static --libs libass yields -lass -lfontconfig -lexpat -lenca -lm -lfribidi -lfreetype
[03:11:57 CEST] <kk> PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" \
[03:12:14 CEST] <kk> --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
[03:13:01 CEST] <kk> --bindir="$HOME/bin" --enable-gpl --enable-libfreetype --enable-libass --enable-libx265
[03:14:07 CEST] <kk> pc file for libass is in /usr/lib64/pkconfig. I tried adding that to PKG_CONFIG_PATH, but it made no difference.
[03:14:57 CEST] <kk> sorry, now I see the message about pastebin.
[03:15:06 CEST] <kk> Should I still use pastebin?
[03:15:18 CEST] <c_14> well, it's too late now
[03:15:29 CEST] <kk> My apologies.
[03:15:57 CEST] <c_14> Anyway, just add /usr/lib64 to PKG_CONFIG_PATH and get rid of --pkg-config-flags="--static"
[03:16:14 CEST] <c_14> it should still build against the static libs for the other deps if it can
[03:16:18 CEST] <kk> Then I get a complaint about libx265
[03:16:37 CEST] <kk> I need to use the static version of libx265
[03:17:39 CEST] <c_14> hmm, works for me with x264
[03:17:40 CEST] <kk> ERROR: x265 not found using pkg-config
[03:17:53 CEST] <c_14> I can try building a static x265 and see if it works here
[03:20:01 CEST] <kk> I just substituted x264 for x265 and it works ... something odd about x265. I did a diff of their .pc files and they use different variables.
[03:28:03 CEST] <kk> I mad the x265 pc file look like the x264 file and it worked! Don't know if it will compile the way I expect ...
[03:28:42 CEST] <kk> Libs: -L${exec_prefix}/lib -lx265 -lstdc++ -lm -lrt -ldl
[03:28:54 CEST] <kk> Libs.private:
[03:29:02 CEST] <kk> Cflags: -I${prefix}/include
[03:29:24 CEST] <kk> Seems like it should be equivalent to what was there previously.
[03:29:33 CEST] <kk> I'll try a make next.
[03:30:50 CEST] <lillian> i get super choppy output with ffmpeg -video_size 640x480 -framerate 30 -f x11grab -i :0.0 -crf 15 output.webm
[03:31:47 CEST] <kk> Note: I did not use the "--pkg-config-flags="static"
[03:50:31 CEST] <c_14> kk: adding all the flags from Libs.private to Libs seems to fix it for me
[03:51:17 CEST] <kk> Should the x265 developer be notified of the issue?
[03:51:36 CEST] <c_14> I'd consider it a bug, yes.
[03:53:06 CEST] <kk> I spent most of my day trying to resolve this problem and a good chunk of the evening Friday. Thank you for making me think of comparing to x264.
[04:14:17 CEST] <x86iac> thanks for the info and help :)
[05:03:29 CEST] <kk> Finished the make building ffmpeg with x265 and libass, and although it built, ldd shows libgcc.so, libstdc++.so and libxcb.so. That's not good.
[05:04:03 CEST] <kk> So I'm back to trying to build in a static x265 and a shared libass.
[05:07:28 CEST] <c_14> You'd probably have to manually merge the files generated from a run with --pkg-config-flags="--static" and --enable-libx265 with one without that but with --enable-libass and hope that works
[05:07:35 CEST] <c_14> Or manually compile static libass
[05:08:48 CEST] <klaxa> i have to compile libass most of the time because packaged versions are outdated anyway
[05:30:11 CEST] <kk> How would I do the merge?
[05:39:26 CEST] <c_14> Hmm, afaik config.mak
[05:47:58 CEST] <kk> Thanks ... there goes my Sunday, too!
[05:48:23 CEST] <c_14> It's fun for the whole family \o/
[05:52:46 CEST] <c_14> If you're linking against dynamic libass anyway, does it matter that it also links against libgcc/libstdc++/libxcb dynamically?
[06:02:15 CEST] <kk> I have to check with the boss. The resulting ffmpeg is installed into a controlled environment and I don't know what limitations they have in place.
[06:03:31 CEST] <kk> Heck, I would have thought they would want the build to take place on a "build machine" because they're getting whatever shared libraries are on my system and that's not good either.
[06:03:52 CEST] <kk> I'm new to the job and still trying to figure out the environment.
[06:15:23 CEST] <c_14> If it's a controlled environment, just build a static libass. That way you'll have that covered as well.
[06:15:27 CEST] <c_14> Probably be easier too.
[06:17:37 CEST] <kk> I did a ldd of their current ffmpeg build and they used a shared libass library. This is a build w/o x265. So that's why I went in that direction.
[06:18:06 CEST] <kk> My other concern is that my version of Centos may be a different version.
[06:19:01 CEST] <kk> Thanks to your suggestions I have a couple of paths forward. I'll write them up, along with my concerns about the build environment and let them make the decision.
[06:45:08 CEST] <kk> quit
[06:45:24 CEST] <kk> oops ... meant to exit ... goodnight, folks!
[07:50:28 CEST] <vidSre> have an issue
[07:50:54 CEST] <vidSre> converting from h.264 to yuv gives me multicolored lines
[07:51:14 CEST] <vidSre> ffmpeg -i input format=yuv420p -vsync vfr output.yuv
[07:51:31 CEST] <vidSre> th yuv video isn't viewable
[07:51:35 CEST] <vidSre> *the
[07:51:46 CEST] <vidSre> as in, its just multicolored lines.
[07:58:22 CEST] <vidSre> c'mon you dregs, wake up
[10:20:04 CEST] <anoop_r> ffmpeg.exe -i Air.mkv -c:v libx265 -x265-params level=1 -c:a copy 1.mp4
[10:20:36 CEST] <anoop_r> level=1 giving error
[10:20:49 CEST] <anoop_r> it happens with level 1 to 3
[10:24:30 CEST] <JEEBsv> anoop_r: the error should be rather self-explanatory as far as I can see the wrapper :P and those parameters are passed straight into libx265, so it has very little to do with ffmpeg
[10:24:49 CEST] <JEEBsv> it's either unknown option or invalid value
[10:25:03 CEST] <JEEBsv> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/libx265.c#L193
[10:26:05 CEST] <anoop_r> x265 [warning]: picture dimensions are out of range for specified level
[10:26:19 CEST] <anoop_r> does each level has limit for resolution
[10:26:56 CEST] <anoop_r> level=3.1 to 8.5 will work
[10:27:06 CEST] <JEEBsv> that is not an error
[10:27:09 CEST] <JEEBsv> that's a warning
[10:27:34 CEST] <JEEBsv> but yes, levels note how much memory the decoder needs to decode a picture
[10:27:37 CEST] <anoop_r> [libx265 @ 048bf1e0] Cannot open libx265 encoder.
[10:28:11 CEST] <JEEBsv> so yes, levels limit various things including the maximum rate over time, and the amount of CTUs
[10:28:37 CEST] <JEEBsv> just like with AVC you had the limit of macroblocks
[10:28:49 CEST] <JEEBsv> see the levels annex of HEVC or H.265 :P
[10:29:22 CEST] <JEEBsv> http://www.itu.int/rec/T-REC-H.265-201410-S/en
[10:30:39 CEST] <anoop_r> thanks
[10:31:54 CEST] <JEEBsv> and in libx265 itself it's in https://bitbucket.org/multicoreware/x265/src/44b6b2df7016f0129e66d91e9aab03261d02758a/source/encoder/level.cpp?at=default#cl-214
[10:55:15 CEST] <halfie> hi, from within my new bitstream filter how do I get access to the original file (not the file data only but also the whole file). or am I hacking on the wrong layer, and actual file handling should be done in the muxer itself?
[11:00:49 CEST] <halfie> can the muxer / demuxer parse the file format, and pass on the extra data (needed by the bitstream filter) in the AVCodecContext object?
[13:28:36 CEST] <halfie> hi! how do I write logging messages from within a bitstream filter? I want to do some AV_LOG_WARNING(s).
[13:57:41 CEST] <durandal_1707> halfie: as normal, you can use printf
[13:59:40 CEST] <BtbN> av_log should be available?
[14:01:07 CEST] <halfie> durandal_1707, BtbN thanks, I copied stuff from h264_mp4toannexb_bsf.c and things are working :)
[14:01:55 CEST] <BtbN> And no, you can't access the file itself in a bitstream filter
[14:02:02 CEST] <halfie> durandal_1707, BtbN on a related note, returning AVERROR(AVERROR_EXIT) from a bitstream filter results in FFmpeg crashing ;( ..
[14:02:32 CEST] <BtbN> That might be worth reporting
[14:02:56 CEST] <BtbN> A bsf has no idea if there even is a file. The data could be a stream, or generated on the fly
[14:03:00 CEST] <halfie> "imx_dump_header_bsf.c" really really wants to exit but it resorts to return 0 to avoid crashing ffmpeg.
[14:04:15 CEST] <halfie> BtbN, how do I pass "special data" from a .mp4 file to my bitstream filter? should I hack the mov.c demuxer to do that?
[14:04:41 CEST] <BtbN> I'm quite sure such hacks wouldn't be accepted
[14:04:51 CEST] <BtbN> What are you even trying to do?
[14:05:16 CEST] <durandal_1707> why you want to pass special data?
[14:05:41 CEST] <halfie> BtbN, I agree on that! :)
[14:06:21 CEST] <halfie> I am trying to add support for a new file format which does obfuscation on the underlying AAC bitstream.
[14:07:09 CEST] <halfie> things are mostly working but now I am trying to remove the various hacks, and clean-up the code
[14:07:34 CEST] <halfie> the code base is a real pleasure to work with :)
[14:08:01 CEST] <BtbN> The last time i touched the mov (de)muxer it was everything but a pleasure
[14:08:08 CEST] <BtbN> not realy the fault of the code, but of mov/mp4 beeing terrible
[14:13:16 CEST] <halfie> heh, yeah, my comment did not include mov.c. I was trying to put random printfs all over it yesterday, not fun! :)
[14:46:43 CEST] <Mavrik> hmm, anyone got an idea what would cause "dts < pcr, TS is invalid" when using muxrate in TS muxer?
[15:06:47 CEST] <zhanshan> does anybody know the website http://mp4repair.org ?
[15:06:52 CEST] <zhanshan> how does it work?
[15:07:03 CEST] <zhanshan> is there a tool for linux to repair video files like that?
[15:22:58 CEST] <courrier> Hey guys, I'm generating a time lapse with the real ffmpeg: ffmpeg -framerate 15 -start_number 8 -i IMG_%04d.JPG -vcodec libx264 time-lapse.mp4
[15:23:11 CEST] <courrier> but i've deleted some pictures because they are ugly
[15:23:26 CEST] <courrier> and ffmpeg fails because it can't find them
[15:23:42 CEST] <courrier> can we tell it somehow to continue with the next picture?
[16:13:14 CEST] <halfie> I am trying to write a demuxer, is there some documentation (besides the ffmpeg code base!) which I can use?
[16:26:57 CEST] <JEEBsv> halfie: not really, I recommend looking at some of the newer, simple demuxers
[16:27:07 CEST] <JEEBsv> I think there might have been some wiki articles somewhere though
[16:27:59 CEST] <JEEBsv> halfie: the libav wiki seems to have some stuff https://wiki.libav.org/Internals/DemuxerHowTo
[16:29:42 CEST] <halfie> JEEBsv, I am looking at diracdec.c now. first, I need to parse a custom file format, deobfuscate the bitstream, and then redirect the bitsream flow to underlying code (mp3 / speex / etc). (this is a new problem, my bitstream filter is a different project) :)
[16:30:56 CEST] <halfie> s/underlying code/underlying codec
[16:44:40 CEST] <JEEBsv> halfie: I think that's a decoder, not a demuxer though?
[16:47:35 CEST] <halfie> oh ;( ... is demuxer the thing which sees the file first? I am adding support for a 100% new container format.
[16:53:18 CEST] <JEEBsv> halfie: yes, a demuxer reads the input and then parses it and outputs streams (and packets of them)
[16:53:28 CEST] <JEEBsv> see the demuxerhowto I linked from libav's side for example
[16:56:15 CEST] <halfie> JEEBsv, thanks! will do.
[17:01:56 CEST] <sonion> i have a mp4 and just doing ffmpeg -i a.mp4 a.avi and it gives an avi where when i use seek arrows tells me to use -idx in mplayer - i'd love to know more about what happened? and what the index is?
[17:03:03 CEST] <sonion> when i just did ffmpeg -i a.mp4 a.mkv the mkv has the 'index' ? why wasn't it transfered with making the avi?
[17:11:08 CEST] <courrier> I'm still trying to encode this timelapse, my laptop just spent 3h to process 130 frames (over 210) with ffmpeg using 90percent of the swap until I killed it
[17:11:30 CEST] <courrier> ffmpeg -framerate 15 -start_number 8 -i IMG_%04d.JPG -vcodec libx264 time-lapse.mp4
[17:11:35 CEST] <courrier> what am I doing wrong?
[17:12:22 CEST] <sonion> having it hit swap?
[17:15:05 CEST] <courrier> sonion: sorry?
[17:16:29 CEST] <sonion> do you know what swap is?
[17:18:55 CEST] <courrier> sonion: sure, and it filled up RAM and swap to process 50 percent of the frames
[17:19:52 CEST] <courrier> the 33MB ouput is not even readable :(
[17:20:16 CEST] <courrier> I wish I stopped ffmpeg before...
[17:21:00 CEST] <courrier> ok :)
[17:23:43 CEST] <courrier> fflogger: here is the full command/output until I killed it:
[17:23:44 CEST] <courrier> http://paste.debian.net/249091/
[17:25:44 CEST] <courrier> segfault occured after killing ffmpeg
[17:29:02 CEST] <courrier> seems due to my version of libx264, I've just encoded the same time lapse in 1 minute with libxvid
[17:29:07 CEST] <durandal_1707> can you try with latest ffmpeg or adding -pix_fmt yuv420p near end
[17:30:13 CEST] <durandal_1707> Does it happen with other videos?
[17:31:35 CEST] <courrier> -pix_fmt yuv420p doesn't change anything
[17:33:18 CEST] <courrier> durandal_1707: and yes, other video encodings with libx264 have the same issue
[17:33:46 CEST] <courrier> anyway I'm fine with the xvid codec
[17:33:58 CEST] <courrier> Just wish I stopped it before loosing 3h xD
[17:34:18 CEST] <klaxa> that's what -t 10 is for, heh
[17:34:25 CEST] <klaxa> make test encodes before doing a long encode
[17:35:28 CEST] <courrier> klaxa: I keep this in mind for the next time ;)
[17:35:45 CEST] <klaxa> i learned it "the hard way" too
[17:35:49 CEST] <klaxa> i think
[17:39:45 CEST] <courrier> to go back to my initial question: how do we ask ffmpeg to continue encoding when the sequence of files has holes? like from IMG_008.JPG to IMG_200.JPG with IMG_104.JPG missing?
[17:40:05 CEST] <courrier> it stops automatically otherwise
[17:40:19 CEST] <courrier> when the next file is not found
[17:42:23 CEST] <klaxa> i personally would just create a subfolder with numbered symlinks and use that instead
[17:43:16 CEST] <cbsrobot_> courrier: read about levels on https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels
[17:43:41 CEST] <cbsrobot_> my guess is that you try to encode resolution that is not supported
[17:44:06 CEST] <cbsrobot_> Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj422p, 5472x3648, q=-1--1, 15 fps, 15360 tbn, 15 tbc
[17:44:30 CEST] <klaxa> depending on the player colorspace might also be an issue
[17:44:51 CEST] <klaxa> but i think that was already discussed, adding -pix_fmt yuv420p should fix that
[17:48:37 CEST] <courrier> klaxa: but creating the sequence of symlinks is tricky as well isn't it?
[17:48:55 CEST] <courrier> I mean not that trivial ^^
[17:50:24 CEST] <courrier> cbsrobot_: I could decrease resolution as well, I don't need such precision as it will be a 1080p video after postprocessing, I've just used the default params
[17:52:55 CEST] <cbsrobot_> courrier: try: ffmpeg -framerate 15 -i IMG_%04d.JPG -vcodec libx264 -pix_fmt yuv420p -vf scale=1920:-1,crop=1920:1080:0:100 time-lapse.mp4
[17:56:05 CEST] <cbsrobot_> courrier: to create the symlinks use something like:
[17:56:23 CEST] <cbsrobot_> C=1; for i in *.JPG; do F=$(printf "seq-%04d.jpg" "$C"); ln -s "$i" "$F"; C=$((C + 1)); done;
[17:56:28 CEST] <cbsrobot_> (not tested)
[18:02:02 CEST] <courrier> thanks a lot :)
[19:39:29 CEST] <pensan> Hi, I was wondering, is it possible to have ffmpeg read X and Y values for the position of an overlay from a text file at each frame? Thank you in advance!
[19:44:22 CEST] <klaxa> does it have to be live?
[19:45:16 CEST] <klaxa> if not i would suggest using a subtitle file
[19:48:28 CEST] <pensan> It does not have to be live
[19:49:51 CEST] <klaxa> i think the easiest and cleanest way would probably be to use aegisub to create a subtitle file
[19:50:02 CEST] <klaxa> but it really depends on what text you want to display and how
[19:51:13 CEST] <pensan> I have two video files place on top of each other. The background video is 'fixed' in position, but the overlay should 'move' around (it has a smaller resolution) based on some kind of input file
[19:52:15 CEST] <klaxa> oh wait, now i get it
[19:52:21 CEST] <klaxa> you want the overlay to move?
[19:52:38 CEST] <klaxa> nevermind the subtitle stuff then
[19:53:08 CEST] <pensan> yes, the overlay should be moved :)
[19:53:19 CEST] <pensan> and the position is updated every frame
[19:53:56 CEST] <klaxa> the overlay filter has some calculation capability, but i've never used them and can't tell you how to use them: https://ffmpeg.org/ffmpeg-filters.html#overlay-1
[19:55:48 CEST] <pensan> I'm at a point where I can move the overlay, but only with arithmetic operations like "10 * n". But I couldn't find a way to have this value get read from a file/array
[19:56:53 CEST] <c_14> I don't think that works without having to modify the source.
[19:57:10 CEST] <c_14> You'll have to create a function beforehand that maps input framenumber/timestamp to overlay location.
[19:58:11 CEST] <pensan> I would be possible to calculate the positions for each frame beforehand, but how can I get these calculated values into ffmpeg?
[20:00:02 CEST] <c_14> overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)' <- something like that
[20:00:16 CEST] <c_14> Depending on your function, it'll get really ugly
[20:01:17 CEST] <pensan> so for each frame there should be a own 'row' with the position, including an 'IF frame_number equals N"?
[20:02:06 CEST] <c_14> If you want a different position per frame, yes. If you want for a range something like if (gt x and lt y)
[20:02:16 CEST] <c_14> You can look up all the ifs, gtes etc in ffmpeg-utls
[20:02:18 CEST] <c_14> *utils
[20:02:26 CEST] <c_14> https://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation
[20:03:47 CEST] <pensan> OK thank you both!
[20:04:31 CEST] <pensan> my second attempt would be have a script which reads the source, frame by frame, adds the offset and saves the frame again
[20:11:55 CEST] <jooe> Hello everygodey!
[20:14:17 CEST] <jooe> so I'm trying to combine a bunch of different audio files with a single image to dreate different video files
[20:14:25 CEST] <jooe> and I'm using this command:
[20:14:26 CEST] <jooe> http://pastebin.com/pwW1M6J5
[20:14:33 CEST] <jooe> but I get this error:
[20:14:55 CEST] <jooe> http://pastebin.com/UhJXJs1i
[20:15:16 CEST] <jooe> can anyone tell me what I do wrong?
[20:18:59 CEST] <c_14> -shortest goes after the last -i filename
[20:19:03 CEST] <c_14> and before the output filename
[20:26:09 CEST] <jooe> I moved "-shortest" after the "-i" but before the filename but it gives me another error
[20:26:30 CEST] <c_14> after -i filename and before the output filename
[20:27:42 CEST] <jooe> the error says "-shortest: No such file or directory", but it works without "-shortest" flag
[20:27:51 CEST] <c_14> What's your cmdline?
[20:28:06 CEST] <jooe> Windows Command Prompt
[20:28:18 CEST] <c_14> I meant the `ffmpeg blah foo'
[20:29:58 CEST] <jooe> for %a in (D:\TaiLopez\*.mp3) do "ffmpeg" -loop 1 -r 1 -i -shortest "Untitled.j pg" -vcodec mpeg4 -i %a -acodec copy %a".mp4"
[20:30:06 CEST] <jooe> is my command line
[20:30:34 CEST] <c_14> eeeeeh
[20:30:38 CEST] <c_14> That's all kinds of broken
[20:31:25 CEST] <c_14> for %a in (D:\TaiLopez\*.mp3) do "ffmpeg" -loop 1 -framerate 1 -i "Untitled.j pg" -i %a -vcodec mpeg4 -acodec copy -shortest %a".mp4"
[20:34:02 CEST] <jooe> wow thanks a lot! it works!
[20:34:08 CEST] <jooe> you're a wizzard!
[20:56:01 CEST] <halfie> JEEBsv, I have my dummy demuxer going now :) thanks for the help.
[22:26:38 CEST] <zhanshan> trying to repair a h.264 file using ffmpeg
[22:26:41 CEST] <zhanshan> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2e21240] moov atom not found
[22:26:43 CEST] <zhanshan> :P
[22:26:54 CEST] <zhanshan> Invalid data found when processing input
[22:27:51 CEST] <c_14> 90% of the time, an mp4 without a moov atom is junk, but you can try something like https://github.com/ponchio/untrunc
[22:28:50 CEST] <mike_papa> Is it ok that I get 1,1 fps with something like this: "ffmpeg.exe -hide_banner -i filename.ts -map 0:2 -map 0:0 -codec:v hevc -preset veryslow -x265-params crf=22 -ac 2 -c:a:0 libfdk_aac -vbr 3 filename.mkv" on i7-4765T? Or am I doing something wrong?
[22:29:12 CEST] <c_14> You're using veryslow on hevc, that's probably normal
[22:29:53 CEST] <mike_papa> c_14: Thanks. I was supprised how slow it gets.
[22:31:22 CEST] <mike_papa> What preset should I use to finish 1:20:00 long movie till morning? Veryslow now dropped to 0,9. It will take almost two days with speed like that (41,6h)
[22:31:37 CEST] <zhanshan> c_14: https://github.com/ponchio/untrunc/blob/master/track.cpp
[22:31:50 CEST] <zhanshan> I tried: avc1: failed for not particular reason
[22:31:59 CEST] <zhanshan> Found 0 packets
[22:32:24 CEST] <c_14> mike_papa: encode 10s chunks with various presets and extrapolate
[22:34:44 CEST] <c_14> zhanshan: no clue, I didn't write it. It may or may not work, if it doesn't work you're out of luck unless you can fill the moov atom in manually
[22:39:37 CEST] <zhanshan> c_14 fill in the moov atom manually
[22:39:43 CEST] <zhanshan> that sounds impossible to me
[22:48:13 CEST] <zhanshan> c_14 these guys seem to have coded something that's impressing because I can see preview images at least: http://mp4repair.org/
[22:48:26 CEST] <zhanshan> I didn't pay for the repairing though
[22:49:47 CEST] <c_14> I mean, it's technically possible. I just don't know of any other tool that'll do it.
[22:49:59 CEST] <zhanshan> yeah.. :/
[22:50:15 CEST] <zhanshan> so stupid to not have made a backup of this one
[22:50:29 CEST] <zhanshan> http://mp4repair.org/fixed/151381/Treasured-00636.pbad-1-0640000-H264-1280x720.jpg
[23:03:34 CEST] <zhanshan> AtomicParsley looks promising
[23:03:46 CEST] <zhanshan> but unfortunately quicktime is not supported :/
[23:37:52 CEST] <poop> Is there a magical ffmpeg parameter to have vp8 clusters start with a keyframe?
[00:00:00 CEST] --- Mon Jun 22 2015
More information about the Ffmpeg-devel-irc
mailing list