[Ffmpeg-devel-irc] ffmpeg.log.20140527
burek
burek021 at gmail.com
Wed May 28 02:05:01 CEST 2014
[01:02] <LLKCKfan> How can someone who is almost 30 and never had a job get one? I have been applying just to be told I am not what they are looking for or they are not hiring.
[01:03] <sacarasc> Rob a bank, go to prison, then when you get out, they'll give you a better chance!
[01:19] <DelphiWorld> sup
[02:03] <LLKCKfan> No
[04:29] <benlieb> I'm just using ffmpeg for my first serious project. I was happy until I had a string that needed escaping. Now I want to die.
[04:29] <benlieb> Can anyone help me/
[04:29] <benlieb> ?
[04:30] <benlieb> I want to put this string into a blank video that will then (later) be appended to a separate video "Tango Milonga 1: The Dance's Music and Music History"
[04:31] <benlieb> When I write it like this, it obviously doesn't work (but no manner of escaping seems to be the right combination):
[04:31] <benlieb> ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf drawtext="fontfile=/Library/Fonts/Arial.ttf: text=Tango Milonga 1: The Dance's Music and Music History: fontcolor=white: fontsize=24: box=0: x=(w-text_w)/2: y=(h-text_h-line_h)/2","fade=t=out:st=3:d=1" /Users/benlieb/my_life/sites/2007/idance/videos_in_production/intros/2621.mp4
[04:32] <benlieb> The text option in this example is coming from a DB and currently looks like this in my ruby script (another level of escaping):
[04:32] <benlieb> cmd = %Q[ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf drawtext="fontfile=/Library/Fonts/Arial.ttf: text=Tango Milonga 1: The Music and Music History: fontcolor=white: fontsize=24: box=0: x=(w-text_w)/2: y=(h-text_h-line_h)/2","fade=t=out:st=3:d=1" #{@dir}/intros/#{@lesson.id}.mp4]
[04:32] <benlieb> oops
[04:33] <benlieb> cmd = %Q[ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf drawtext="fontfile=/Library/Fonts/Arial.ttf: text=#{@lesson.title}: fontcolor=white: fontsize=24: box=0: x=(w-text_w)/2: y=(h-text_h-line_h)/2","fade=t=out:st=3:d=1" #{@dir}/intros/#{@lesson.id}.mp4]
[04:33] <benlieb> Sorry for the flood, but that's it...
[04:42] <benlieb> anyone?
[04:44] <woof-woof> you could use pastebin
[04:44] <woof-woof> it is better
[04:45] <benlieb> woof-woof: true. that IS a bit ugly.
[04:46] <benlieb> I've made a SO question if it makes things more readable for you: http://stackoverflow.com/questions/23880319/how-can-i-programatically-escape-option-strings-for-ffmpeg
[04:46] <benlieb> woof-woof: in the docs I found "The tool tools/ffescape in the FFmpeg source tree can be used to automatically quote or escape a string in a script"
[04:47] <benlieb> but I haven't found that program or how it would be implemented
[05:09] <c_14> benlieb: https://git.videolan.org/?p=ffmpeg.git;a=blob;f=tools/ffescape.c;h=0530d28c6d672980471a55be1e3c78a0b88b5b87;hb=HEAD, the source is there. When you compile ffmpeg it should be in the tools folder.
[05:10] <benlieb> c_14: I used brew to install ffmpeg
[05:10] <benlieb> is that a C file?
[05:11] <benlieb> c_14: how would I call that from the command line?
[05:14] <c_14> /path/to/file/ffescape
[05:15] <c_14> you'll probably need -s list_of_escape_chars
[05:15] <c_14> and you can set the number of escaping levels with -l
[05:15] <benlieb> which ffescape returns nothing.
[05:16] <benlieb> I'm asking in the brew channel where that might be...
[05:16] <benlieb> my ffmpeg is in /usr/local/bin/ffmpeg
[05:16] <benlieb> where would that imply that ffescape is supposed to be?
[05:18] <c_14> It might be in /usr/share somewhere.
[05:18] <c_14> I don't think make install installs it anywhere by default.
[05:18] <benlieb> looked around here https://gist.github.com/pixelterra/a02958e96bba53385250
[05:27] <balrog74> Good day all. Query about fdk-aac. Is there a --enable-pic option for that one piece? I have an app that links to ffmpeg but its complaining that the fdk-aac lib isnt linkable.
[05:31] <balrog74> http://pastebin.com/x0ceT6MX if anyone is interested
[05:33] <c_14> benlieb: Tried looking in share? If not, just download the source; ./configure; and make alltools, then copy/use tools/ffescape
[05:35] <benlieb> c_14: wouldn't that interfere with the ffmpeg installed by brew?
[05:39] <c_14> nah, you're not actually installing it anywhere. Just compiling it, or to be precise parts of it.
[05:39] <c_14> balrog74: just recompile libfdk_aac with -fPIC in your CFLAGS
[05:40] <c_14> benlieb: you don't even need to make alltools, just make tools/ffescape
[05:45] <benlieb> c_14, ok I reinstalled with --with-tools
[05:45] <benlieb> I have ffescape, now just need to figure out how to use it.
[05:45] <balrog74> c_14: Thanks. Im testing.
[05:45] <benlieb> ffescape "hi: world" doesn't do anything
[05:55] <c_14> ffescape takes input from stdin or optionally from a file
[05:58] <benlieb> c_14 I've figured that out, but it's output is not working to actually escape what I need
[05:58] <balrog74> c_14: Im trying this syntax ./configure --prefix="$HOME/ffmpeg_build" --disable-shared CFLAGS='-fPIC ''
[06:00] <c_14> balrog74: either set CFLAGS as an environment variable and export it or try --extra-cflags='-fPIC'
[06:00] <c_14> benlieb: like I said, you'll probably need to use -s to set the list of characters you want to escape
[06:01] <balrog74> c_14: aye. will do.
[06:01] <benlieb> c_14: I did that but I'm missing something somehow.
[06:02] <benlieb> warning longish paste...
[06:02] <benlieb> This works: ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf drawtext="fontfile=/Library/Fonts/Arial.ttf: text=bob: fontcolor=white: fontsize=24: box=0: x=(w-text_w)/2: y=(h-text_h-line_h)/2" /Users/benlieb/my_life/sites/2007/idance/videos_in_production/intros/2621.mp4
[06:02] <benlieb> Assuming I just wanted to do this manually, what would I replace the text "bob" with to get the text "Bob's" printed?
[06:03] <benlieb> when I try ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf drawtext="fontfile=/Library/Fonts/Arial.ttf: text=Bob\'s: fontcolor=white: fontsize=24: box=0: x=(w-text_w)/2: y=(h-text_h-line_h)/2" /Users/benlieb/my_life/sites/2007/idance/videos_in_production/intros/2621.mp4
[06:03] <benlieb> the video is made, but the text is not drawn
[06:04] <c_14> benlieb: please pastebin it next time
[06:06] <c_14> I'm not sure you need the \, the "" should be escaping the '
[06:08] <benlieb> c_14: if I use Bob's it draws as Bobs
[06:09] <benlieb> If I use Bob\'s nothing draws at all
[06:09] <benlieb> Neither with Bob\\'s or Bob\\\'s
[06:09] <benlieb> or 'Bob'\''s'
[06:09] <benlieb> this is rediculous
[06:12] <c_14> How about Bob'\''s ?
[06:12] <woof-woof> What's the issue?
[06:13] <benlieb> c_14 that also just draws bobs
[06:13] <benlieb> would it matter that I'm using 2.2.1?
[06:20] <balrog74> c_14: thanks. OI
[06:20] <balrog74> Ill poke at it tomorrow
[06:20] <c_14> benlieb: nah, can't get it working either right now
[06:20] <benlieb> c_14: crazy right?
[06:21] <benlieb> I finally got bob:bob to print using 'bob''\':'bob'
[06:21] <benlieb> which is definitely not what is produced by ffescape
[06:21] <benlieb> but replacing the : with ' just get's the ' ignored.
[06:21] <benlieb> I have no idea what's going on here.
[06:21] <LLKCKfan> How can someone who is almost 30 and never had a job get one? I have been applying just to be told I am not what they are looking for or they are not hiring.
[06:22] <benlieb> LLKCKfan: on topic?
[06:24] <benlieb> c_14 any luck?
[06:24] <c_14> benlieb: I can also get bob:bob to display with bob\\\:bob, haha
[06:24] <c_14> bob\\\\\'bob
[06:24] <c_14> works
[06:25] <c_14> That's an awful lot of escaping for one quote...
[06:26] <benlieb> 5 quotes? You're in bash?
[06:27] <c_14> ye
[06:27] <c_14> -vf "drawtext=text=bob\\\\\'bob:fontcolor=black:fontsize=24:box=0"
[06:27] <benlieb> just found this, which may explain something http://www.ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
[06:29] <benlieb> christ almighty,
[06:29] <c_14> escaping is fun, isn't it? ;)
[06:31] <benlieb> c_14 so their final example is this: this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters
[06:31] <benlieb> c_14 now my question is, what does ffescape actually do for me, because it didn't do that. Also is there any way to do that programatically?
[06:32] <benlieb> I guess I could just do a replace for ' \ and ,
[06:32] <benlieb> with the respective 5, 4, and 2 slash rule. But that will probably choke somehow
[06:34] <benlieb> what's needed is this escape_for_shell(escape_for_filtergraph(escape_for_filter_option)))
[06:34] <benlieb> scape_for_shell(escape_for_filtergraph(escape_for_filter_option(text))))
[06:35] <benlieb> it looks like ffescape only does the escape_for_filter_option bit
[06:36] <c_14> ye, you'll probably have to create those 3 functions yourself and then use those for escaping
[06:37] <benlieb> tried this: echo "this is a 'string': may contain one, or more, special characters" | ffescape -s "':" -l 1 | ffescape -s "':," -l 2
[06:37] <benlieb> and this echo "this is a 'string': may contain one, or more, special characters" | ffescape -s "':" -l 2 | ffescape -s "':," -l 1
[06:38] <benlieb> close but not perfect
[06:38] <benlieb> well not useable
[06:38] <LLKCKfan> How can someone who is almost 30 and never had a job get one? I have been applying just to be told I am not what they are looking for or they are not hiring.
[06:39] <benlieb> c_14: I don't understand why after the second level of escape the ' gets \\\ and the : get's only \\
[06:40] <c_14> Because : is not special to the second layer.
[06:41] <benlieb> c_14, ah
[06:42] <benlieb> so this does it: echo "this is a 'string': may contain one, or more, special characters" | ffescape -s "':" -l 1 | ffescape -s "'," -l 1 | ffescape -s "'" -l 1
[06:44] <benlieb> Now to try to get that in my ruby script
[06:44] <benlieb> But I don't see why this needs to be done via ffescape. I wonder if there is a native ruby class that does something similar
[06:46] <c_14> I don't know much about ruby, but it should be possible.
[06:49] <benlieb> c_14 is ffmpeg always that hard to work with? This is my first go around. And damn.
[06:49] <benlieb> It's like sticking your finger in a blender
[06:49] <c_14> As long as you're not escaping things, not really.
[06:49] <c_14> Takes some getting used to, sure, but it gets better with time.
[06:51] <c_14> Anyway, the sun has long since risen. High time I went to bed.
[06:51] <c_14> Hope you get your stuff working.
[06:53] <benlieb> c_14: almost
[06:53] <benlieb> not sure how to get the output I need front he ruby script.
[06:54] <benlieb> but shouldn't be too bad
[10:36] <erle-> how can i force ffmpeg to use static encoder libs only?
[11:41] <DelphiWorld> &T is Larbi & Tayeb
[11:59] <UtUser> guys, the Ut Video decoder is broken again
[11:59] <UtUser> as per http://trac.ffmpeg.org/ticket/2661
[12:00] <UtUser> built from the repo a couple days ago
[12:00] <UtUser> I'm getting those shitty messages when I try to transcode to h.264
[12:01] <UtUser> People use Ut Video for their masters, so it's sort of a big deal.
[12:20] <UtUser> I would like some closure on the Ut Video decoder but I'll wait
[14:25] <bryancp> Hello! Having a bit of trouble connecting to a mulaw udp stream. The `avformat_open_input` function doesnt fail, but blocks. Ive been able to play the stream fine using a library on Android but not ffmpeg. Other streams (such as one created from the command line using ffmpeg) work just fine. Under what conditions would open input block like this? Maybe
[14:25] <bryancp> thatll help me track down the problem.
[15:34] <Camusensei> hello :)
[15:36] <Camusensei> I was looking at how to concatenate two video files, but could not find how to concatnate AND encode at the same time (I have not much space left). Is it possible? (to spice things up, I'm on windows)
[15:37] <sacarasc> http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files Change "-c copy" to your encoding options.
[15:39] <Camusensei> sacarasc: looks perfect, thank you :)
[15:43] <Camusensei> sacarasc: hmm, what about my container, how do I specify it if I have to use -f concat? (I planned to do something like -f webm -b:v 2M -crf 4)
[15:44] <sgtpepper> Hey Everyone?
[15:44] <sacarasc> If you mean your output one, just give it a file extension.
[15:44] <c_14> Camusensei: -f concat is an input format specifier, you can still define a separate output format
[15:45] <Camusensei> c_14: ok, thank you
[15:45] <sacarasc> Everything after the last -i [input] are output options.
[15:45] <Camusensei> ok
[15:49] <bryancp> Posted a message earlier about avformat_open_input hanging trying to open a valid udp stream& any ideas as to when/why it might block? Perhaps its trying to determine the data format?
[16:22] <Keestu> how ffplay.c works?.. av_read_frame (.. packet) reads a the packet, and it is copied into the queue [ not deep copy], but once the frame is read, the av_free_packet is invoked, would that not be an error? or is my understanding is wrong ?
[17:04] <Camusensei> c_14, sacarasc: it's working like a charm, thank you very much. have a nice day.
[20:43] <benlieb> can someone help me concat my two videos?
[20:43] <benlieb> Stream specifier ':1' in filtergraph description [0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a] matches no streams.
[20:43] <benlieb> my command is: ffmpeg -i intros/2621.mp4 -i raw_lessons/2621.mp4 -filter_complex '[0:0] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' mp4_big/2621.mp4
[20:43] <benlieb> I think it is because the first input (intro) has no audio stream?
[20:44] <c_14> benlieb: I think so too, just remove the audio part from the concat and map it normally.
[20:45] <benlieb> c_14: I wish I understood the command well enough to do that
[20:45] <benlieb> Which part exactly should I remove?
[20:45] <c_14> '[0:0][1:0]concat=n=2:v=1[v]' -map '[v]' -map 1:1
[20:45] <benlieb> I actually pasted wrong, my original command was: ffmpeg -i intros/2621.mp4 -i raw_lessons/2621.mp4 -filter_complex '[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' mp4_big/2621.mp4
[20:46] <benlieb> then I took out a bit to try to remove the audio
[20:46] <benlieb> the second video does have audio tho
[20:47] <c_14> ye, if the first video has no audio, just use the command snippet I gave you.
[20:47] <c_14> Wait, do you want silence inserted for while the first video is playing?
[20:48] <benlieb> c_14 the first video is just silent with 4 seconds of some text displaying
[20:48] <benlieb> what's the best way to make this work?
[20:50] <c_14> -filter_complex 'aevalsrc=0:d=4[a1];[0:0][a1][1:0][1:1]concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]'
[20:50] <c_14> should do it
[20:52] <benlieb> that failed: https://gist.github.com/pixelterra/26134627caf8c85d5eca
[20:54] <c_14> Your input videos aren't the same size.
[20:55] <benlieb> I got your command to work by adding the unsafe:1 option
[20:55] <benlieb> they should be the same size...
[20:56] <benlieb> I only checked via the mac finder
[20:57] <benlieb> but you're right the final output is off
[20:57] <c_14> The SAR is off anyway, the second video has square pixels while the first one has a SAR of 8:9
[20:58] <benlieb> ug
[20:58] <benlieb> kill me
[20:59] <benlieb> c_14: this is my command for making the intro video:
[20:59] <benlieb> `ffmpeg -y -f lavfi -i color=c=black:s=640x362 -t 4 -vf #{filters.join(',')} #{@dir}/intros/#{@lesson.id}.mp4`
[20:59] <benlieb> How could I alter that to match the specs of the raw_lessons/2621.mp4 file?
[21:01] <benlieb> I can see that the output video file was clipped
[21:01] <c_14> try color=c=black:s=640x362:setsar=1
[21:02] <c_14> wait, you might have to put that in a filterchain
[21:02] <wizbit> can ffmpeg capture still frames from a live ogg video feed?
[21:02] <llogan> color=c=black:s=720x362:sar=8/9:r=ntsc
[21:02] <c_14> wizbit: can you elaborate?
[21:04] <benlieb> llogan: I want the intro to match the lesson
[21:05] <llogan> isn't that what i provided?
[21:05] <benlieb> llogan: I don't really know,but c_14 says setsar=1
[21:06] <c_14> benlieb: try llogan's mine was wrong
[21:06] <benlieb> and said the lesson video had square pixels
[21:06] <benlieb> I'm new to this and waaay over my head
[21:06] <llogan> you're doing fine for being new at this
[21:06] <benlieb> i think it should be called fffmpeg, where the fs stand for fuck fuck fuck
[21:06] <c_14> If I'm reading this correctly, in0 is square and in1 is anamorphic, so llogan's should be correct.
[21:07] <benlieb> lol
[21:07] <benlieb> I'll try...
[21:08] <benlieb> why would I use 720x362 if the orig is 640, is that because of the sar being diff?
[21:08] <benlieb> why couldn't I just match exactly?
[21:09] <llogan> what is the original? I'm just going by your console output. i thought you wanted something similar to raw_lessons/2621.mp4
[21:09] <benlieb> I run a website that turns educational DVD's into small pieces of purchasable instruction. This process has always been done by someone else, who has recently left, and also manually. I'm trying to write a script that will automate the process.
[21:09] <benlieb> llogan: I do
[21:10] <llogan> color=c=black:s=720x362:sar=8/9:r=ntsc:d=4
[21:10] <benlieb> not sure how to find that out exactly though. My mac finder says its 640x362.
[21:10] <benlieb> ok I'll try
[21:23] <benlieb> that seemed to do it. I might just stay happy with that until I have more time to understand it.
[21:23] <benlieb> thanks guys. I'm sure I'll be back soon :)
[21:23] <llogan> glad it worked for you
[22:02] <denysonique_> Is FFmpeg dead?
[22:02] <denysonique_> Since not found in the main repository of Ubuntu?
[22:02] <UtUser> I can't speak for Ubuntu
[22:03] <UtUser> but I can assure you that FFMPEG is under continual development, always has been
[22:03] <UtUser> FFMPEG has its own repository and makes its own automatic builds
[22:04] <pzich> not sure if it was ubuntu, but some linux distro forked their own version
[22:04] <iive> denysonique_: no, it is ubuntu that is dead
[22:04] <pzich> http://ubuntuforums.org/showthread.php?t=1995559
[22:05] <denysonique_> The ffmpeg guys should get it back into Ubuntu. Since it is the most popular distro and not doing so decreases the popularity of FFmpeg.
[22:06] <iive> denysonique_: we are trying but i it is not easy.
[22:06] <UtUser> Well, I had to download it on Windows
[22:06] <UtUser> you Linux users have it too easy
[22:06] <denysonique_> iive: can you link me to the story or give some tl;dr on it?
[22:07] <iive> ubuntu is following debian, so the problem is rooted there - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729203
[22:08] <iive> that's from the news page :)
[22:09] <JodaZ> denysonique_, distro builds of ffmpeg never were any good anyways because there was nothing in them because of license reasons
[22:09] <denysonique_> JodaZ: maybe except for Gentoo
[22:10] <UtUser> I don't understand why you can't just copy the binaries into /usr/bin
[22:11] <UtUser> there is no dependency on any specific window manager or anything like that
[22:12] <UtUser> you can even download deb packages right off of the website
[22:12] <UtUser> and AFAIK it's all compatible with Ubuntu
[22:13] <UtUser> the website specifically mentions Ubuntu in fact
[22:16] <denysonique_> UtUser: someone made a ppa for Ubuntu
[22:22] <UtUser> yes
[22:31] <llogan> denysonique_: see link
[22:32] <llogan> also http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html
[23:39] <LukeMaxwell> hey, having an issues running ffmpeg
[23:39] <LukeMaxwell> running ubuntu 14.04 LTS
[23:41] <c_14> LukeMaxwell: can you go into further detail?
[23:48] <LukeMaxwell> ffmpeg -v info -f v4l2 -i /dev/video0 -an -r 20 -s 640x480 /tmp/testvideo.mkv
[23:49] <llogan> you forgot the link to the console output
[23:51] <LukeMaxwell> sorry llogan what do you mean? Haven't used ffmpeg for over two years
[23:52] <LukeMaxwell> also, I have a network drive that I would like to save my webcam video to
[23:52] <llogan> after you enter your ffmpeg command ffmpeg will spew out a bunch of text in your console. i want to see that
[23:53] <LukeMaxwell> okay llogan its on another computer. how do I copy the terminal output?
[23:53] <llogan> are you remotely logged into the other computer?
[00:00] --- Wed May 28 2014
More information about the Ffmpeg-devel-irc
mailing list