[Ffmpeg-devel-irc] ffmpeg.log.20150109
burek
burek021 at gmail.com
Sat Jan 10 02:05:01 CET 2015
[00:43] <mikos_> hi there
[00:43] <mikos_> i m running into an issue i fugured i would ask here in case anyone knows why:
[00:44] <mikos_> so i m generating jpg and piping them into a named pipe
[00:44] <mikos_> and have it piping to ffmpeg this way:
[00:44] <mikos_> ffmpeg -y -f jpeg_pipe -s $SIZE -r 24 -i $FIFO -c:v copy out.mp4
[00:45] <mikos_> it works but for some reason it waits to generate ~100 jpg images before ffmpeg starts rendering
[00:45] <mikos_> does anyone know why it doesn t start rendering as soon as the first jpg gets piped?
[00:46] <mikos_> help would be apreciated :)
[01:08] <c_14> x264 ?
[01:14] <c_14> http://mewiki.project357.com/wiki/X264_Encoding_Suggestions#Encoder_latency
[03:44] <grepper> https://trac.ffmpeg.org/wiki/FilteringGuide needs to use an array rather than 'eval' to keep #bash happy.
[03:52] <c_14> hmm, not sure exactly what you mean
[03:55] <c_14> Can you give me an example or something of what you mean?
[03:55] <grepper> codec=(-vcodec libx264 -pix_fmt yuv420p -b:v 700k -r 25 -maxrate 700k -bufsize 5097k); ffmpeg -i "$infile" "${codec[@]}" ... etc
[03:58] <c_14> http://sprunge.us/HJCe <- like this?
[04:00] <grepper> quoting the array will keep the quoted elements separate, which is what you want in case of paths or file names with spaces etc.
[04:01] <grepper> though it is not as relevant there
[04:02] <c_14> Right, but other than that it's fine?
[04:02] <grepper> not sure why you escaped the enclosing quotes
[04:03] <c_14> The enclosing quotes around the filtergraph?
[04:04] <grepper> yeah
[04:04] <c_14> Right, just didn't get rid of those.
[04:04] <c_14> Did now.
[04:04] <grepper> okay
[04:07] <c_14> Updated the pagee
[04:07] <c_14> -e
[04:07] <grepper> alternatively I guess you could escape the single quotes and put it in a plain var, then use the array for the full command
[04:08] <grepper> probably that would be more common, ie. using the array for the full command
[04:08] <grepper> but either is better than eval :)
[04:09] <grepper> c_14: do you know how to use shell variable within a filter that needs to be single quoted?
[04:10] <grepper> like: -vf "select='lt(mod(n\, 8991), 60)',setpts='N/(29.97*TB)'" <- using vars for the interval (8991) , # of frames (60) and fps
[04:10] <grepper> obviously the vars won't expand with single quotes, tried swapping the single and double quotes unsucessfully
[04:11] <c_14> drop the quotes and escape everything with '\'
[04:11] <grepper> tried escaping the brackets and using double quotes
[04:11] <grepper> oh
[04:11] <grepper> hm, maybe I messed that up then
[04:11] <grepper> thanks for the confirmation, I'll try again :)
[04:12] <c_14> escaping can be very funky sometimes
[04:12] <c_14> I've had filtergraphs with 5 layers of escapes before...
[04:13] <grepper> heh
[04:13] <grepper> yeah, I hate reading bash that is escaped all to hell, its like reading a complicated sed line
[04:14] <relaxed> can't you call filtergraphs from a file?
[04:14] <c_14> You won't get variables there though
[04:15] <relaxed> ugh, right
[04:16] <c_14> I've actually sometimes resorted to small python scripts over bash. Just because it saves me a layer of escapes.
[04:24] <relaxed> yeah, or run sed/awk on the file but then you're using bash
[04:25] <relaxed> I guess making filters useful and easy to use with a shell are mutually exclusive
[04:29] <grepper> select1=("lt(mod(n\, $interval), $frames)") ; setpts1=("N/(${fps}*TB)"); ffmpeg -i "$infile" -vf select="'${select1[@]}'",setpts="'${setpts1[@]}'" -y %08d.png
[04:29] <grepper> that worked with arrays okay
[04:30] <c_14> mhm right, I keep forgetting that variables inside single quotes inside double quotes get expanded
[04:32] <c_14> So you could probably -vf "select='lt(mod(n, $interval), $frames),setpts='N/(${fps}*TB)'
[04:33] <c_14> probably anyway
[04:36] <grepper> nope, tried that one
[04:36] <c_14> mhm, k
[04:39] <grepper> oh, it does work, was missing a quote mark
[04:39] <grepper> -vf "select='lt(mod(n, $interval), $frames)',setpts='N/(${fps}*TB)'"
[04:40] <c_14> oh, missed that
[04:40] <grepper> bah, computer languages are soo picky, spoiled brats
[04:41] <c_14> Computers do what you tell them to do, not what you want them to do.
[04:42] <grepper> shame that
[04:52] <grepper> cmd=(ffmpeg -i "$infile" -vf "select='lt(mod(n\, $interval)', setpts='N/($fps*TB)'" -y %06d.png)
[04:56] <grepper> oops
[04:56] <grepper> cmd=(ffmpeg -i "$infile" -vf "select='lt(mod(n\, $interval), $frames)', setpts='N/($fps*TB)'" -y %06d.png)
[04:56] <grepper> echo ${cmd[@]}
[04:56] <grepper> ffmpeg -i monkey.mpg -vf select='lt(mod(n\, 8991), 60)', setpts='N/(29.97*TB)' -y %06d.png
[05:16] <xreal> Does ffmpeg has an "internal" benchmark ?
[05:18] <grepper> -benchmark ?
[05:18] <grepper> shows with ffmpeg --help long
[05:21] <xreal> grepper: nice :)
[05:23] <xreal> ffmpeg -benchmark_all doesn't do anything :)
[05:27] <grepper> looks like it prints timing for each frame
[05:29] <xreal> Pff, it's totally useless to compare performance. Okay, I'll do it the old way using "time" :)
[06:03] <vivan> dunno what is -benchmark_all but -benchmark is real benchmark
[06:03] <vivan> https://www.ffmpeg.org/ffmpeg-formats.html#null
[06:08] <xreal> vivan: I don't get the sense of benchmark :)
[06:08] <xreal> it does a normal decoding in this example to NULL
[06:09] <c_14> -benchmark should (according to docs) print CPU time and max memory consumption after the encode finishes
[06:10] <xreal> That's nothing I would expect from a benchmark :)
[06:10] <xreal> but okay, thanks for the hint.
[06:10] <c_14> What are you expecting?
[06:10] <vivan> xreal: yes, it measures decoding speed
[06:11] <xreal> That's the result: bench: utime=161.851s | bench: maxrss=36100kB
[06:11] <c_14> ye, it took 161.851s user cpu time and used max 36100kB RAM
[06:11] <xreal> /usr/bin/time is better, I think :D
[06:18] <xreal> Can ffmpeg switch x264's constant quality to fixed bitrate while running? I mean, can you enter "zones" ?
[06:23] <c_14> I don't think so.
[06:23] <xreal> That would be great :(
[06:24] <xreal> Highest bitrate for fast action scenes and low bitrate for end credits.
[06:24] <c_14> crf should do that
[06:25] <xreal> yeah, but i'd like to get to crf 40 for credits...
[06:25] <c_14> you can also split the source up where you want to the nearest I-frame, encode each separately and concat with copy
[06:25] <xreal> c_14: sounds good
[06:26] <xreal> What range does crf work in ?
[06:26] <xreal> like +/-4 ?
[06:27] <c_14> hmm?
[06:27] <c_14> What do you mean range?
[06:28] <xreal> c_14: CRF raises or lowers QP for complex or non-compexe parts.
[06:28] <c_14> Oh, that. erm
[06:32] <c_14> I can't find any finite numbers, but I'd guess around +-4
[06:39] <xreal> Since libfaac is gone, is "-strict experimental -c:a aac" okay to use?
[06:40] <grepper> c_14: backslashing the array quotes isn't going to work, you will end up with literal quotes around each element
[06:40] <grepper> I'd put the full command into an array, like: http://pastebin.ca/2901272
[06:42] <meorom> hi all!
[06:43] <meorom> I'm building ffmpeg for Windows follow link: https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
[06:43] <meorom> I use last rev of ffmpeg today is 73851
[06:45] <meorom> but I still get error
[06:45] <meorom> e:\programming\c++\ffmpeg\libavutil\common.h(34) : fatal error C1083: Cannot open include file: 'inttypes.h': Invalid argument
[06:45] <meorom> make: *** [doc/print_options.o] Error 1
[06:45] <meorom> in very many source file, why this file get error ? (other files not)
[06:45] <c_14> grepper: fixed
[06:45] <grepper> great
[06:46] <meorom> could you please help me ?
[06:46] <grepper> $in_file still not quoted, not needed in example, but if its for newbies ...
[06:46] <c_14> meorom: can you pastebin your config.log ?
[06:48] <c_14> grepper: fixed that as well
[06:48] <meorom> I'm still a newbie of IRC, so...you mean paste all config.log content here ??
[06:48] <c_14> no
[06:48] <meorom> so, what should I do ?
[06:48] <c_14> pastebin it to pastebin.com or pastie.org or sprunge.us or ix.io
[06:48] <c_14> and paste the link here
[06:48] <meorom> ah, okey
[06:48] <meorom> thanks
[06:48] <xreal> c_14: Since libfaac is gone, is "-strict experimental -c:a aac" okay to use?
[06:49] <c_14> It's fine
[06:49] <c_14> libfdk-aac is better, but as long as you use a decent bitrate it should be ok
[06:50] <xreal> the official binaries don't have libfdk-acc in Windows, I think ?
[06:50] <c_14> No, building with libfdk-aac makes the build non redistributable
[06:50] <meorom> c_14: http://pastebin.com/download.php?i=7VHvkX4b
[06:50] <xreal> c_14: ;..-(
[06:52] <c_14> meorom: did you install msinttypes ?
[06:52] <meorom> yes
[06:53] <meorom> msinttypes-r26
[06:54] <meorom> I don't know if I miss something, could you pls give a way to try ?
[06:55] <grepper> finally the summary is dated now :) Where it starts with "Note that"
[06:56] <c_14> meorom: try reading this: https://www.ffmpeg.org/platform.html#toc-Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
[06:57] <c_14> If that doesn't help, send as much information as you can (including all output etc) to the -user mailing list, or wait around a bit here for somebody with more windows knowledge.
[07:00] <c_14> grepper: reworded
[07:01] <grepper> "The command_line array"
[07:02] <meorom> thanks c_14, I will try
[07:02] <c_14> grepper: Yeah, I'll reword that later.
[07:02] <grepper> cool
[07:02] <grepper> just trying to contribute, not be picky
[07:04] <c_14> It's fine. I just decided to check over the whole article later. Check if any info is outdated or could be reworded.
[07:40] <mr_lou> http://stackoverflow.com/questions/27834184/making-a-blu-ray-video-album-from-30fps-video-recordings
[08:15] <Naji> mr_lou this is annoying... you posted your problem on stackoverflow, so please stop the broadcasting
[08:33] <Orly> hello?
[08:34] <Orly> hello, hello?
[08:39] <anshul__> hello
[08:39] <tmh1999> Orly : just ask your question, someone will answer if they know/ when they're back to the keyboard.
[08:41] <Guest32443> doesnt matter
[08:42] <Guest32443> wondershare converter - metadata overwriter - fix Gamma Shift Bug in MOV files!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[08:42] <Guest32443> bye
[08:56] <anshul_mahe> Guest27353: I was out of network, did u asked some question in between
[09:09] <mr_lou> Naji, You should take a vacation if you get annoyed by someone posting the same url twice in two days.
[09:18] <Naji> twice?
[10:35] <cajone> HI Guys, I sped up a mp4 from 2hrs to 30mins using "setpts=0.25*PTS" which worked well but the converted video still contains the old time line and things its 2hrs long instead of 30mins, anyway I can fix this?
[12:13] <Nebukadneza> heho
[12:14] <Nebukadneza> i'm trying to extract all keyframes, and all frames-one-before-keyframe from a x264 video using ffmpeg. i've already succeeded in -vf select'ing keyframes, but the one-before-frame is giving me a little headache ;/
[13:29] <aleek> hi! Is there a way to change fps of a video file? I mean: I have video with 25fps, and I want to make it 50fps with times shorter time (total number of frames is the same)
[13:39] <relaxed> aleek: 50 fps and half the duration?
[13:41] <relaxed> try, ffmpeg -r 50 -i input -c copy output
[13:42] <mr_lou> I used to use ffmpeg for scaling down videos to fit my cellphone, meaning lower resolution and less fps. Then suddenly it didn't work for some reason, so I began using HandbrakeCLI instead, with ffmpeg as parameter. </useless info>
[13:44] <mr_lou> What I wanted to say with that, was that HandbrakeCLI could be another option: HandBrakeCLI -i input.mp4 -o output.mp4 -e ffmpeg -r 50
[13:45] <relaxed> ffmpeg should do it without issue.
[13:46] <mr_lou> Yes
[13:46] <mr_lou> There's a lot of that "should". ;-)
[13:48] <relaxed> your cellphone issue is not likely ffmpeg's fault
[13:49] <mr_lou> I'm not talking blame. Just saying, the command suddenly didn't work.
[13:49] <mr_lou> Maybe some lib was broke, or what do I know.
[13:50] <mr_lou> But whatever it was, HandbrakeCLI apparently didn't care.
[13:51] <mr_lou> And ffmpeg is working for me fine now. Using it a lot to create blu-ray files these days.
[13:51] <termos> Hi. I am using av_read_frame and sometimes I get an AVPacket that is empty (size == 0 and data == NULL), how should I handle such a situation?
[13:51] <relaxed> yeah, it's the cat's meow
[13:51] <termos> Right now I'm just skipping it
[14:38] <Mavrik> termos, hmm, what's your input?
[14:39] <termos> it's an rtmp that contains two streams: h264 video and aac audio
[14:40] <Mavrik> hmm
[14:42] <termos> If I don't skip the empty packages and pass them into decode+encode functions I get a very unstable output
[14:43] <termos> I only have empty input packages on one of my streams though, the rest are working fine
[14:45] <termos> I tried not ignoring the empty packages and pass them through a AVThreadMessageQueue and after poping the queue before decode+encode there are no empty packages, I wonder if there is some magic in this thread queue
[14:46] <termos> The thing is I have implemented by own thread queue that has some more features that I like (like reading the number of elements), but of course it doesn't magically remove the empty packages
[14:57] <Mavrik> mhm
[16:39] <Fjorgynn> :D
[18:36] <Phlarp> Is there anyway to control character spacing / font kerning in FFMPEG drawtext filters?
[18:54] <c_14> None I know of besides editing the font.
[18:55] <relaxed> probably through fonts.conf
[18:56] <relaxed> if you have fontconfig support
[18:56] <c_14> If there is, I couldn't find any documentation for it... (not that that means anything)
[19:02] <relaxed> using ass subs might be easier if you need that much control
[19:21] <JEEB> aegisub for actual subtitle creation and then the libass filter for rendering them on top of video
[19:50] <justinX> anyone heard of a (tv) player that shows some added random character at the end of the last line in a subtitle when viewing?
[19:51] <justinX> maybe I have to add an extra CRLF at the last line in the .srt file...
[20:05] <smo_> hi, is it possible to covert and pipe a stream in hls ?
[20:05] <smo_> -i myhttpurl -> to hls
[21:07] <grepper> wow, looping through with -ss before the -i INFILE is 25 times faster than using the 'select' filter to output a chunk of frames (pngs) at intervals.
[21:14] <grepper> is there any reason to prefer the select filter looping if I am just outputting pngs ?
[21:15] <c_14> select is frame-exact
[21:15] <c_14> -ss is usually timestamp-exact
[21:15] <grepper> but probably not off by more than a frame or 2 ? I could live with 'close' at that speed.
[21:16] <grepper> I guess if the timestamps are messed up ...
[21:16] <c_14> If you don't use -codec copy, it should get the exact frame at that timestamp
[21:17] <c_14> -ss will be fine most of the time
[21:18] <grepper> okay, thanks. Now to figure out a way to programmaticly determine if the user's ffmpeg is new enough to benefit for the new accurate seeking with -ss on input.
[21:18] <grepper> ffmpeg -h long 2>&1|grep -q accurate_seek
[21:18] <c_14> You could just check the version string
[21:18] <grepper> if their ffmpeg has -accurate_seek it is probably okay?
[21:19] <grepper> yeah, tough with version string if they use git
[21:19] <c_14> mhm, lemme check
[21:20] <c_14> ye, if it has -accurate_seek it should be fine
[21:29] <grepper> c_14: awesome, thanks so much. Been hoping this would be added/possible for many years, haven't really checked recently.
[21:29] Action: grepper gotta go out, bbiab
[21:39] <jirido> Hi.. I would need a test picture film for to set corect color adjustment in vlc and cant find any.. So i got the idea to make one with ffmpeg from ONE image i have.. Could you say if it is posible and eventualy how?
[21:42] <c_14> You have the picture and want to make a video out of it?
[21:43] <c_14> https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images#Usingasingleimageasaninput
[21:43] <jirido> Yes!
[21:44] <jirido> I found some PM5544 test image films but they all blury
[21:45] <jirido> Thanx
[22:47] <bofh> Hello all. Does anybody know what is the way to override limitation of 32 channels for amix? I need to merge 20-50 audio streams into one
[22:47] <c_14> Merge 32 into one, then merge the output from that with the remaining streams?
[22:48] <bofh> yeah, that is what I was thinking about - merge chunks of streams
[22:48] <bofh> but it's not possible to do without an intermediate file?
[22:48] <c_14> nah, should work
[22:49] <bofh> you mean piping?
[22:49] <c_14> -filter_complex '[0:0][0:1][0:2]amix[foo];[foo][0:3][0:4][0:5]amix[out]'
[22:49] <bofh> hm!
[22:50] <bofh> I already have a very complex filter
[22:50] <bofh> perhaps I could split it into several chunks
[00:00] --- Sat Jan 10 2015
More information about the Ffmpeg-devel-irc
mailing list