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

burek burek021 at gmail.com
Tue Sep 18 02:05:01 CEST 2012


[00:16] <rud> amccloud: not sure, but you can using quicktime, than ffmpeg to whatever transport/codec you want
[01:24] <DrSlony> hi, i read about a year ago about a video stabilizer plugin for ffmpeg, can anyone point me to it please?
[02:40] <Adys> I was recording a very long session with "ffmpeg -f video4linux2 -s 1024x576 -r 30 -i /dev/video0 -f alsa -i pulse -sameq -acodec libmp3lame -ab 48k", but right at the end instead of doing ctrl+c i killed the shell, which killed ffmpeg; now the mp4 file cannot be opened by mplayer/vlc.  But it's still several gigabytes, so I'm guessing the video might be salvageable. Any advice?
[02:44] <relaxed> Adys: Next time hit 'q' to quit. I think you're screwed with the video because the index wasn't written.
[02:44] <Adys> aye i killed it accidentally
[02:49] <Adys> relaxed: any idea if its salvageable?
[02:51] <relaxed> Adys: I'm not sure. You can try remuxing it with MP4Box but that probably won't work.
[03:28] <amccloud> rud: i'm trying to bundle up a nice rtmp screencasting solution for others to use.
[03:38] <Ctut_> hello
[03:48] <Ctut_> Is there an ffmpeg bitstream filter that will add missing sps and pps header entry?
[03:50] <Ctut_> ? entries to the input stream (or output stream) so that I don't get h264 "non-existing PPS referenced" errors upon inspecting the mpegts output file via ffmpeg?
[03:53] <Ctut_> Is this a better question for the ffmpeg-devel channel?
[03:53] <Ctut_> thx
[10:31] <RixiM> I am trying to convert a set of images from dcraw into a movie. when I use ffplay to look at the images they are greyscale and offset. when I use imagemagik's display, they are fine.
[10:31] <RixiM> how do I fix this?
[10:36] <cbreak-work> use imagemagick to convert them to tiff first? :)
[10:45] <RixiM> cbreak-work: it doesn't seem to get the color space correct?
[10:45] <RixiM> i have ppms that I converted to pngs with "convert 000.ppm 000.png"
[10:46] <RixiM> and it's still rgb24 which ffplay doesn't seem to like?
[10:46] <RixiM> it incorrectly sets it to yuv420p. I think it should be set to yuv444p?
[10:49] <cbreak-work> unrelated
[10:50] <cbreak-work> rgb24 is input
[10:50] <cbreak-work> yuv420p is output
[10:52] <RixiM> hm.
[10:52] <RixiM> so don't my images display correctly in ffplay?
[10:56] <cbreak-work> are the pngs correct?
[10:56] <RixiM> they open fine in display.
[10:56] <RixiM> that is honestly all i can assert about them.
[10:57] <RixiM> identify says they are pngs
[10:58] <RixiM> ffplay fails to display them correctly.
[10:58] <RixiM> can I force the colorspace?
[10:58] <cbreak-work> what for?
[10:58] <cbreak-work> you probably want to convert into a movie
[10:59] <cbreak-work> and video codecs work with yuv almost always
[10:59] <RixiM> if i take a single jpg from the internet, ffplay displays it. and say the stream is yuvj444p
[11:00] <RixiM> none of the distorted images say yuv444p they either say rgb24 or yuvj420p
[11:01] <cbreak-work> RixiM: JPEGs don't store RGB though
[11:02] <cbreak-work> they store a kind of yuv
[11:02] <cbreak-work> https://en.wikipedia.org/wiki/Jpeg#JPEG_codec_example
[11:02] <RixiM> okay, that's fine. ffplay says they are yuvj420p I think they are actually yuvj444p how do i force ffplay to use that?
[11:03] <cbreak-work> pngs should be rgb
[11:03] <RixiM> well, these are rgb24 not rgb8
[11:05] <RixiM> it also failed to correct covert pal8
[11:09] <RixiM> http://166.84.136.68/000.jpg
[11:09] <RixiM> is the image that does not display properly in ffplay.
[11:11] <RixiM> I think the problem is that I am not converting the pixel format or the colorspace correctly, I do not know enough to know the difference and my tests seem to have no effect on the outcome.
[11:13] <cbreak-work> rgb24 means 24 bits per pixel, rgb8 means 8 bits per channel, x3
[11:13] <cbreak-work> usually the same
[11:13] <RixiM> can you get the image i linked to displaying properly in ffplay?
[11:25] <RixiM> it seems to be ignoring pix_fmt.
[11:29] <cbsrobot-> RixiM: my ffplay shows 000.jpg correctly
[11:30] <cbsrobot-> or the ffplay output
[11:30] <RixiM> http://pastebin.com/zrtmRGqM
[11:32] <RixiM> cbsrobot-: so, there is something wrong with my bin?
[11:32] <DrSlony> Hi, i read about a year ago about a video stabilizer plugin for ffmpeg, can anyone point me to it please?
[11:33] <cbsrobot-> RixiM: ffplay version 0.7.13
[11:33] <cbsrobot-> can you upgrade to latest git HEAD ?
[11:34] <RixiM> yes give me a sec.
[11:37] <RixiM> hmm.
[11:38] <RixiM> even something not that new displays it correctly.
[11:38] <RixiM> that was really dumb of me.
[11:40] <RixiM> err, maybe not.
[11:48] <RixiM> cbsrobot-: the new version does not work either.
[11:49] <RixiM> http://pastebin.com/XVSbjRsb
[11:51] <cbsrobot-> [scale @ 0x7f8278e44ee0] w:2601 h:1733 fmt:yuvj420p -> w:2601 h:1733 fmt:yuv420p flags:0x4
[11:51] <cbsrobot-> ^this makes me wonder
[11:52] <cbsrobot-> RixiM: this is not git head !
[11:52] <RixiM> ugh.
[11:52] <RixiM> sorry.
[12:05] <RixiM> i got a compiler error so i deleted and recloned, compiling now.
[12:11] <RixiM> cbsrobot-: okay, it works now, thanks.
[12:15] <cbsrobot-> RixiM: nice
[12:16] <cbsrobot-> and btw: "make clean"  helps too
[14:11] <DrSlony> Hi, i read about a year ago about a video stabilizer plugin for ffmpeg, can anyone point me to it please?
[14:13] <ubitux> DrSlony: deshake filter
[14:13] <ubitux> https://ffmpeg.org/ffmpeg.html#deshake
[14:47] <DrSlony> thank you ubitux
[16:03] <Keshl> I figure you guys get this a lot, but yeah. <.< Would anyone here mind handing me a command that "Just works(tm)"?  I'd like to use libx264 and do two-pass encoding. I've Googled around, people say it can be done, but you get a different answer from every link that "always works for me", yet not for anyone else. Currently what I use is "ffmpeg.exe -f image2 -r 60 -i "AbsolutePathNoSpaces" -vcodec libx264 -preset slow -crf 25 -threads 0 "
[16:03] <Keshl> FilenameOnlyNoSpaces.mp4", which works fine for one pass.
[16:04] <zap0> what makes you think what you want to do is possible?
[16:04] <Keshl> Cuz other people claim they've done it, oÉo.
[16:12] <DrSlony> Keshl here's my one-line script for recording screencasts and compress using 2-pass encoding, strip out what you dont need:
[16:12] <DrSlony> # record screencast with ffmpeg - 2 passes
[16:12] <DrSlony> fps="30"; vid="screencast_${fps}fps"; bitrate="2M"; preset="slower"; pushd /tmp/ && ffmpeg -y -ss 00:00:02 -f x11grab -show_region 1 -r ${fps} -s 1280x720 -i :0.0+0,0 -an -vcodec libx264 -preset ultrafast -crf 18 -threads 0 /dev/shm/${vid}.mp4 && ffmpeg -y -i /dev/shm/${vid}.mp4 -an -vcodec libx264 -pass 1 -preset ${preset} -b:v ${bitrate} -threads 0 -f rawvideo /dev/null && ffmpeg -y -i /dev/shm/${vid}.mp4
[16:12] <DrSlony> -an -vcodec libx264 -pass 2 -preset ${preset} -b:v ${bitrate} -threads 0 ~/${vid}_${bitrate}_${preset}_`date +%F_%H%M%S`.mp4 && popd && ls -l /dev/shm/${vid}*.mp4 && ls -l ~/${vid}*.mp4 && rm --interactive /dev/shm/${vid}*.mp4
[16:12] <DrSlony>                                                                                                                             
[16:12] <Keshl> Wow that's long. o_o Uh, kay, wish me luck. XD
[16:12] <Keshl> ...And nevermind.
[16:12] <Keshl> Got it.
[16:12] <Keshl> <.<
[16:13] <Keshl> Turns out I had to set a bitrate. Durrr.
[16:13] <Keshl> -b:v is different than -crf. Today I learn't'd. -É-
[16:13] <DrSlony> relaxed no need to pastebin a single line (or what was supposed to fit on a single line)
[16:13] <Keshl> ...Annnd now VLC crashes when I open it. Kay. <.<
[16:14] <Keshl> DrSlony: The point is it wasn't a single line. <.<
[16:14] <DrSlony> who would have guessed
[16:14] <Keshl> Crashing brings me to my other question. <.< Is there a stable build for Windows?
[16:15] <Keshl> It's like, unless I pass it a very speciffic line (The exact line I just typed, pretty much), either ffmpeg barfs, VLC crashes, or the video's totally green.
[16:15] <Keshl> And I can only use x32. x64 crashes VLC.
[16:16] <JEEB> what are you doing with both VLC and ffmpeg?
[16:17] <Keshl> Converting a stream of .png images to video, oÉo.
[16:17] <JEEB> uhh
[16:17] <JEEB> shouldn't that be doable with /just/ ffmpeg (or VLC)?
[16:17] <Keshl> VLC is a media player. You need that to display videos.
[16:18] <Keshl> Ffmpeg converts videos. It does not play them.
[16:18] <Keshl> Ffplay does, but not ffmpeg alone.
[16:18] <JEEB> VLC can also encode, it's used rather often for streaming f.ex.
[16:18] <Keshl> Okay, how do I do that then, oÉo?
[16:19] <JEEB> it's actually probably less simple there, as they have their own command syntax there
[16:19] <JEEB> also if you're doing crf you don't need 2pass
[16:19] <JEEB> crf is a single-pass rate control mode
[16:19] <JEEB> anyways, I'll have to get moving, be back in 20 or so
[16:19] <Keshl> oÉo... Dang.
[16:20] <Keshl> Well, not dang, but, dang. <.< Bothering me that one part of the video looks crappy cuz there's a lot of motion compared to the rest.
[16:21] <JEEB> if the movement part looks bad, you lower the crf until it looks good? Or use zones
[16:21] <JEEB> (and lower the crf in that zone)
[16:21] <Keshl> Never heard of zones. Mind linking me to something useful and actually up to date about them, oÉo?
[16:33] <Keshl> ...And now the command that always works fine for me, saved to a script, won't work anymore. Worked fine literally half an hour ago, same exact video, same conditions.
[16:33] <Keshl> Does ffmpeg have self-modifying code or something?
[17:05] <rrnn> hi all. im stuck at linking ffmpeg: http://pastebin.com/XemmYbF6 tried extern C, --enable-shared, gcc without much luck. how do i solve this?
[17:07] <Tjoppen> change the linker order
[17:07] <Tjoppen> -lavformat -lavcodec
[17:11] <rrnn> changing order gives the same error
[17:13] <rrnn> same with -lavutil first
[18:02] <rrnn> ok turns out avcodec_init has ben removed now? is there a replacement function taht should be used instead?
[18:04] <rrnn> sorry found it
[18:21] <Adys> asked this yesterday, maybe someone has any idea: I was recording a very long session with "ffmpeg -f video4linux2 -s 1024x576 -r 30 -i /dev/video0 -f alsa -i pulse -sameq -acodec libmp3lame -ab 48k", but right at the end instead of doing ctrl+c i killed the shell, which killed ffmpeg; now the mp4 file cannot be opened by mplayer/vlc. But it's still several gigabytes, so I'm guessing the video might be salvageable. Any advice?
[18:22] <Adys> "file" recognizes the file as a mp4, but vlc/mplayer/handbrake dont
[18:59] <An_Ony_Moose> I'm using the following command: "ffmpeg -i %04d.png -b 1M -bt 200k -i ../audio.wav output.mkv"  -- but it seems to be ignoring the bitrate option. What am I doing wrong?
[19:00] <JEEBsv> put both -i next to each other before the encoding parameters
[19:00] <An_Ony_Moose> JEEBsv: then it complains that the audio codec faac doesn't support the parameter.
[19:01] <JEEBsv> what parameter?
[19:01] <JEEBsv> pastebin the command you used and the full output of ffmpeg onto a pastebin site, and link it here
[19:01] <An_Ony_Moose> the bitrate I assume, seeing as I didn't provide anything else
[19:01] <An_Ony_Moose> but I fixed it, I had to use -b:0 and -bt:0
[19:02] <An_Ony_Moose> Thanks!
[19:02] <JEEBsv> or just -b:v
[19:02] <JEEBsv> to set video bit rate
[19:02] <An_Ony_Moose> nope that didn't affect it
[19:02] <JEEBsv> o_O
[19:02] <JEEBsv> ok, do what I said
[19:04] <An_Ony_Moose> http://www.pasteall.org/35321 (but I got it working, as I said)
[19:04] <JEEBsv> ok, you're using ffmpeg from libav, you want to use avconv with it as the ffmpeg binary was left unupdated
[19:05] <JEEBsv> libav rewrote a lot of ffmpeg (the app) and renamed it to avconv, then ffmpeg (the project) later merged most if not all of that into its ffmpeg (the app)
[19:05] <JEEBsv> the ffmpeg app in libav was there for a very short time after the rewrite
[19:05] <JEEBsv> your release still has it
[19:06] <JEEBsv> in any case, I recommend you use the avconv command in that case
[19:06] <An_Ony_Moose> ok, noted for future reference
[19:06] <An_Ony_Moose> but problem already solved
[19:06] <iive> or use real ffmpeg from ffmpeg.
[19:06] <An_Ony_Moose> yeah
[19:06] <An_Ony_Moose> I figured
[19:06] <An_Ony_Moose> thanks in any case
[19:07] <JEEBsv> yeah, but it could've been solved with what I said should you have used the more up-to-date binary (which is avconv in libav)
[19:08] <An_Ony_Moose> I see
[20:27] <rainmaker1> Hi, I have a ffmpeg doing transcoding and I would like to use the same instance of ffmpeg to make thumbnails every x minutes. Is this possible in signle line or I should invoke another ffmpeg via cron?
[20:28] <saste> rainmaker1: every X minutes of media, or every X minutes of system time?
[20:31] <rainmaker1> saste: what ever is possible, consider that this is live stream I think it's not releavnt, or I am wrong?
[20:35] <saste> rainmaker1, you can have several outputs, check the select filter or play with the -r option
[20:36] <rainmaker1> saste: thank you
[21:22] <burek> rainmaker1 https://ffmpeg.org/trac/ffmpeg/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video
[21:22] <burek> combine that with your transcoding and you'll get something like this
[21:22] <burek> ffmpeg -i input.flv -vcodec ... output1 -f image2 -vframes 1 thumb.png
[21:23] <burek> of course, instead of -vframes, you should use -r
[21:23] <burek> ffmpeg -i input.flv -vcodec ... output1 -f image2 -r 1/60 thumb.png (to get 1 image per minute)
[21:23] <burek> or -r 1 for each second, etc.
[22:06] <sparkst> Hey there - hoping someone can assist.  I am trying to transcode some ProRes .movs to h264+aac mp4s with ffmpeg, and the resulting files can be played with VLC just fine, but not with QT or with JW player once I upload
[22:07] <sparkst> just black screen+ audio in both of those
[22:08] <sparkst> Here is the command I'm using: ffmpeg -i 'input.mov' -acodec libfaac -vcodec libx264 -s 960x540 -aspect 16:9 -qscale 2 -ab 80k -ac 1 -r 30 'output.mp4'
[22:08] <sparkst> seems pretty straightforward...yet, no love from QT or JW
[22:08] <sparkst> if anyone has thoughts i'd be much obliged
[22:15] <relaxed> -qscale doesn't affect libx264, use -crf 18 instead
[22:16] <sparkst> ok will try hang on
[22:16] <relaxed> which version of ffmpeg are you using?
[22:18] <sparkst> i just grabbed the ffmpeg-devel build off macports today...it is 0.11.1.git-2de8877
[22:19] <sparkst> same result with -crf 1
[22:19] <sparkst> *18
[22:20] <relaxed> ffmpeg -i input.mov -filter:v scale=960:-1 -c:v libx264 -crf 18 -c:a libfaac -b:a 96k -ac 1 output.mp4
[22:21] <sparkst> ok trying this
[22:23] <cbsrobot-> sparkst: it's the god ol' pix_fmt problem
[22:23] <sparkst> what's that?
[22:23] <sparkst> (:
[22:24] <sparkst> relaxed, seems to be the same problem with the output of your suggestion
[22:24] <cbsrobot-> prores is yuv422p10 and converting it to h264 it chooses automaticly yuv422 (8b bit)
[22:24] <relaxed> oh, add -pix_fmt yuv420p
[22:24] <sparkst> ahhhhh
[22:24] <sparkst> that makes sense
[22:25] <cbsrobot-> so add -pix_fmt yuv420p to your command line and you're done
[22:25] <sparkst> ok trying
[22:25] <dicroce> I am writing some code that pulls video from a proprietary video database and then exports a chunk of it to 1 of a few containerized file formats (mp4, mov, avi)... Everything is working, in VLC... When I try to play the containerized files in anything other than VLC I just get black video (though it does appear that much of the stream metadata is known by quicktime... clip duration, resolution etc)...
[22:27] <dicroce> The video is h.264.... I thought that perhaps the problem was that I wasn't including the SPS or PPS in the stream so I added some code to write those as the first 2 frames... Is that correct?
[22:27] <sparkst> ahhh works like a charm
[22:28] <sparkst> thank you so much relaxed, cbsrobot
[22:28] <sparkst> just made my day
[22:28] <cbsrobot-> np - help somebody else and I'll be happy too !
[22:28] <sparkst> i do my best!
[22:28] <sparkst> last time I was in here i successfully helped someone, despite being a ffmpeg noob
[22:29] <sparkst> hopefully I can be helpful going forward too (:
[22:30] <cbsrobot-> it has nt to be ffmpeg related though &. :-)
[22:30] <sparkst> ha fair
[22:30] <cbsrobot-> dicroce: vlc uses ffmpeg / libav to decode the files
[22:31] <cbsrobot-> and qt and other players often do not support the whole set of the spec
[22:32] <cbsrobot-> i'd try to stay as simple as possible when encoding
[22:32] <dicroce> Hmm... Well, I am not transcoding... and the video is originating in an IP surveillance camera...
[22:33] <cbsrobot-> as I just told sparkst: use pix_fmt yuv420p and some standart rates for the audio aswell
[22:33] <cbsrobot-> if this is the case I just say:
[22:34] <dicroce> Not using the ffmpeg command line... this is custom code... I'm linking against libavformat... I can show you the relevant parts of that code if you'd like...
[22:34] <cbsrobot-> not sure I can help, but paste, maybe somebody else can
[22:35] <sparkst> hey cbsrobot, one more question while I've got you, if you don't mind
[22:36] <cbsrobot-> sparkst: don't ask to ask, just ask
[22:36] <sparkst> fair enough!  i have some h.264 flvs that were created by wowza media server, by recording a live stream encoded by wirecast coming thru it.  some of these flvs are just fine.  I can trim them in ffmpeg without trouble.
[22:37] <cbsrobot-> sounds like fms stuff
[22:38] <sparkst> oh wait a sec
[22:38] <sparkst> ha
[22:38] <sparkst> since i upgraded ffmpeg this AM, it works fine
[22:38] <sparkst> oh happy day!
[22:38] <cbsrobot-> nice
[22:38] <sparkst> i think the issue was that somehow the codec info was not being embedded in some of the files
[22:39] <cbsrobot-> (that was easy)
[22:39] <sparkst> for stream 0.0 ffmpeg returns Video: none, 1k tbr, 1k tbn, 1k tbc
[22:39] <cbsrobot-> fms - no ?
[22:39] <cbsrobot-> flash media server &. ?
[22:39] <sparkst> not using it
[22:39] <sparkst> wowza media server
[22:39] Action: cbsrobot- smells nellymoser audio
[22:39] <dicroce> http://pastebin.com/X3mQLLxA
[22:40] <sparkst> audio is aac
[22:40] <sparkst> but it is not important now
[22:40] <sparkst> as it is working
[22:40] <sparkst> hooray
[22:40] <sparkst> (:
[22:41] <cbsrobot-> I had some similar issues with fms
[22:41] <dicroce> that is obviously not a complete program... but it's the relevant parts... (and like I said, I know this sorts works as the files are playable in VLC... its just missing something that makes it playable in quicktime)...
[22:50] <cbsrobot-> dicroce: did you check doc/examples ?
[22:53] <dicroce> hmm... not, i just looked around online for example code... I'll go take a look...
[23:52] <llogan> dicroce: show the output of "ffmpeg -i input" where input is a file that works as expected with ffmpeg but not with quicktime
[23:53] <llogan> s/with ffmpeg/with VLC/
[00:00] --- Tue Sep 18 2012


More information about the Ffmpeg-devel-irc mailing list