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

burek burek021 at gmail.com
Tue Oct 2 02:05:01 CEST 2012


[02:07] <mapreduce> Hi, I'm working on a program that links to libavcodec, and it crashed in avcodec_decode_video2.. I read that the usual culprits are missing calls to av_init_packet, avcodec_alloc_context and avcodec_open, but all that looks correct to me.
[02:08] <mapreduce> Is there anything about the inputs I could check before calling it?  Even if that causes a crash, at least I'd know which check on the inputs caused the crash which would be a big clue.  This is not yet a reproducible problem, just something from the field.
[02:48] <iive> mapreduce: there was some function about registering all codecs. it should be called before anything else.
[02:48] <iive> mapreduce: if this doesn't help, compile with debug support, run your program in debugger and make a backtrace.
[03:45] <tcurdt> hours later and all "ffmpeg -r 12 -b:v 3000k -f image2 -pattern_type glob -i 'GOPR*.JPG' ../video.mp4" gives me is a 10GB all black movie :-(
[03:47] <relaxed> tcurdt: Always create a small sample to check that everything is okay before a large encode. "ffmpeg -i input -t 60 output" will create a one minute sample.
[03:49] <relaxed> Also, your command is a little messed up. the bitrate goes after the input since it applies to the output.
[03:51] <relaxed> To get help here you need to pastebin your command and output so we can see what's going on.
[03:52] <tcurdt> relaxed: hm& what about the -r 12? that as well?
[03:52] <tcurdt> relaxed: https://gist.github.com/25740af6ece3bbe52623
[03:56] <relaxed> no, that's the framerate you want to use as the input
[03:57] <relaxed> tcurdt: 3840x2880 is huge
[03:57] <relaxed> you didn't move the bitrate after the input
[03:57] <tcurdt> so it should be "ffmpeg -f image2 -r 12 -pattern_type glob -i 'GOPR*.JPG' -b:v 2000k -t 10 ../video.mp4"
[03:58] <relaxed> yes, that will create a 10 second sample
[03:58] <relaxed> do you really want the output to be 3840x2880?
[03:58] <tcurdt> relaxed: that's the input size & TBH I only need 1080p
[04:02] <relaxed> well, 3840x2880 is 4/3 so... ffmpeg -pattern_type glob -i 'GOPR*.JPG' -filter:v "scale=-1:1080,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" -crf 20 output.mp4
[04:02] <relaxed> add -t 10 in there
[04:03] <relaxed> If you want better compression add -preset veryslow
[04:03] <relaxed> (after the input)
[04:05] <relaxed> If you don't need padding on the left/right sode then omit it from the filter chain.
[04:05] <tcurdt> relaxed: and if I want to keep the input ratio? just remove the pad?
[04:06] <relaxed> well, the input aspect ratio is maintained but with padding on the side.
[04:06] <tcurdt> seems like you just read my mind :)
[04:06] <tcurdt> what's the -crf 20 ?
[04:08] <relaxed> It's libx264 rate control setting. Do you really need 2000k or was it an arbitrary guess?
[04:09] <relaxed> The of it as a quality setting that ranges from 0 (lossless) to 51 (crappy quality)
[04:09] <relaxed> Think*
[04:09] <tcurdt> relaxed: it better be really good quality & 2MB/s was a guess & I've seen it as a default in another software
[04:10] <tcurdt> so it replaces the -b:v 2000k
[04:10] <tcurdt> I see
[04:10] <relaxed> Yes, start with -crf 20 and work your way down until you're happy with the quality.
[04:12] <tcurdt> relaxed: just wondering - why use cry over b:v?
[04:12] <tcurdt> crf
[04:12] <relaxed> it's the recommended 1 pass rate control method
[04:13] <tcurdt> ah & ok
[04:13] <tcurdt> yay - test worked and it wasn't all black!
[04:13] <relaxed> In practice you should only set a specific bitrate if you're shooting for a specific size or average bitrate.
[04:13] <tcurdt> (nod) ok
[04:33] <tcurdt> relaxed: thanks you so much & finally at a point where it works as it should :)
[04:33] <relaxed> you're welcome
[10:07] <wica> Hi, we use ffmpeg for live transcoding. Is there a way, to monitor ffmpeg with nagios?
[10:57] <Bruno`> hello !
[10:58] <Bruno`> i'm trying to replace the deprecated "m_format_context->timestamp" use in the OSG Plugin. So i'm looking for the entry "creation_time", in the context metadata.
[10:58] <Bruno`> The value type is char*. Should I simple cast it to double* ?
[10:58] <Bruno`> simply*
[10:59] <saste> Bruno`, no, metadata contains textual data
[11:00] <Bruno`> saste: so i shoud do something like atof ?
[11:00] <saste> Bruno`, what's the content of creation_time?
[11:02] <Bruno`> saste: attribute_deprecated int64_t timestamp; //@deprecated use 'creation_time' metadata tag instead
[11:02] <Bruno`> (avformat.h)
[11:03] <saste> Bruno`, that is not what i asked for
[11:03] <saste> what does the creation_time tag contains, what's the value of the stored string
[11:03] <Bruno`> saste: i don't know, that's what i am asking, kind of :p
[11:04] <saste> Bruno`, if it is a metadata, you can see it with ffprobe or ffmpeg -i
[11:04] <Bruno`> right now, in my code, I use the deprecated "timestamp" attribute. So I want to listen to what ffmpeg says, and use "creation_time" instead.
[11:04] <saste> and no, parsing a date with atof is not a good idea, you need a more specialized function
[11:08] <Bruno`> saste: ok, it is something like "2012-07-26 17:40:00"
[11:08] <saste> what value do you want to extract from it?
[11:09] <saste> strptime should be able to parse it (or even av_small_strptime)
[11:19] <Bruno`> ok. Thanks.
[12:11] <ameeth> hi i want to stream an raw video and do an mp4 encoding  onto an rtmp server i am using ffmpeg  0.11.1 with the pandaboard
[12:11] <ameeth> on ubuntu os
[12:18] <Bruno`> another question.. My code seems to use the deprecated function "url_ferror".. how am i supposed to replace it ?
[12:20] <Bruno`> seems to be an avio_ prefixed function.
[13:17] <kendooo> how to create thumbnail using version  ffmpeg version N-44781-g299c0b3
[13:17] <kendooo> can somebody give me a working exmaple for that version, it seems ffmpeg is really broken into lots of different versions and some commandlines that used to work are no longer working
[13:17] <kendooo> please provide me with the right info thank you
[13:18] <kendooo> here is the ffmpeg -version http://www.pastebin.ca/2237915
[14:56] <blaman> hi! I'm trying to play a VOB file with ffplay, but all I get is garbage on the output and lots of errors. I am pretty sure the VOBs are not corrupted as VLC plays the DVD fine (as in, if I point it to the IFO files, it works). ffplay output is at http://pastebin.com/F7hMQLX4. Is there something I'm missing / doing wrong?
[15:02] <burek> blaman, could you open the ticket at the bug tracker?
[15:03] <burek> it seems that either your mpeg2video is corrupted
[15:03] <burek> or the mpeg2video decoder has some bugs
[15:03] <burek> kendooo check out the wiki
[15:04] <burek> ameeth, can you rephrase your question
[15:05] <burek> wica, what exactly do you want to monitor?
[15:05] <blaman> yeah, I'm betting on corrupted, but then, why does VLC play it correctly? VLC uses libavcodec, so ffplay should play it OK as well...?
[15:05] <burek> vlc doesn't use libav for everything
[15:05] <burek> i.e. it's not just a wrapper for ffmpeg libraries
[15:05] <burek> it has got its own codecs too
[15:09] <blez> where to get the latest windows build?
[15:10] <blez> ffmpeg.zeranoe.com?
[15:10] <burek> google usually helps with questions like that
[16:08] <Chatterbox> Hi all
[16:08] <Chatterbox> I am trying to convert an image sequence to a video using ffmpeg
[16:09] <Chatterbox> I found this on stackoverflow
[16:09] <Chatterbox> ffmpeg -i frame%04d.png -vcodec ffv1 -sameq test.avi
[16:09] <Chatterbox> my images are name from 0000.png to 0070.png
[16:09] <ubitux> aren't you missing a -f image2 before -i?
[16:10] <ubitux> -sameq is *not* doing what you expect to btw
[16:10] <Chatterbox> ubitux: OK
[16:10] <Chatterbox> ubitux: I remove -sameq
[16:11] <Chatterbox> ubitux: But, what should I use instad of frame%04d.png?
[16:11] <Chatterbox> my images are name from 0000.png to 0070.png
[16:11] <ubitux> %04d.png?
[16:12] <Chatterbox> ubitux: I also tried that, but it doesn't work
[16:12] <Chatterbox> ffmpeg -r 24 -f -i %04d.png -vcodec ffv1 test.avi
[16:12] <Chatterbox> ubitux: OK
[16:12] <ubitux> what is this standalone -f?
[16:13] <Chatterbox> http://www.pasteall.org/35809
[16:14] <Chatterbox> ubitux: I don't know :|
[16:16] <ubitux> you want -f image2
[16:17] <Chatterbox> ubitux: Thanks, but the error changed:
[16:18] <Chatterbox> http://www.pasteall.org/35810
[16:18] <ubitux> why did you remove the -i?
[16:19] <Chatterbox> ubitux: yep, % ffmpeg -r 24 -f image2 %04d.png -vcodec ffv1 test.avi
[16:19] <Chatterbox> ubitux: Oh, no :|
[16:19] <Chatterbox> ubitux: The same error after removing -i
[16:20] <ubitux> put it back.
[16:20] <ubitux> -f image2 -i %04d.png
[16:21] <Chatterbox> ubitux: Thanks, it worked
[16:21] <Chatterbox> ubitux: Thsnk a million for helping
[16:22] <ubitux> np
[16:33] <wica> burek: I lik eto monitor if the stream is stil play. And when it is possible the number of drop frames
[16:34] <wica> s/I lik eto/I like to/
[16:36] <burek> wica, redirect stderr of ffmpeg process to a log file and monitor its content
[16:39] <burek> ffmpeg -i ... output.wav 2>logfile.txt
[16:40] <wica> Thnx, was working on that :)
[16:40] <wica> Was hoping on something betr :)
[16:49] <burek> wica, better in what way
[16:56] <wica> burek: beter then a script of my own :)
[16:56] <burek> wica, well give an example
[17:14] <tmatth> is it possible to simultaneously send and receive RTP (specifically H.264) packets using the same socket with ffmpeg?
[17:19] <sine_> relaxed: you about ?
[17:20] <sine_> I have a treepad lite folder where i am storing all the commands and syntax that i need and use
[17:20] <sine_> can someone give me the syntax for converting an VORBIS audio into mp3 192 please
[17:20] <sine_> its in video format so im assuming you can just ignore the -vc
[17:22] <sine_> ffmpeg -i lol.webm -acodec liblamemp3
[17:26] <relaxed> ffmpeg -i input -map 0:a -c:a libmp3lame -q:a 0 output.mp3
[17:27] <relaxed> It's better to map what you want.
[17:27] <sine_> what does the a mean
[17:28] <sine_> im assuming its leaving out the video codec
[17:28] <relaxed> -map allows you tell ffmpeg exactly what you want in the output.
[17:29] <sine_> ok but what does the rest mean
[17:29] <relaxed> -vn just ignores video but sometimes you want a specific stream or there may be mulitple audio streams
[17:30] <relaxed> So -map 0:a:0 maps only the first audio stream to the output
[17:30] <sine_> i have copied what you have written i just want to comment it so i can understand and rmembe for next time
[17:30] <sine_> -c ?
[17:31] <relaxed> -map 0:v:0 -map 0:a:1 would map the first video stream and the econd audio stream to the output.
[17:31] <relaxed> -c:a = codec:audio
[17:32] <sine_> 0:a (first stream) -c:a (codec audio) CODEC -q:a 0 (highest quality?)
[17:34] <sine_> also i dont understand why you have done 0:a:0
[17:34] <sine_> rather than 0:a
[17:34] <sine_> is that if you are doing a huge line
[17:34] <sine_> and processing the seperate streams later in the line
[17:35] <sine_> then it would be 1,2 ,3
[17:35] <relaxed> 0:a will include all audio streams in the output
[17:35] <sine_> ok
[17:36] <relaxed> and yes, -q:a 0 is highest quality
[17:38] <sine_> thanks mate your a real help.
[17:38] Action: sine_ copy and pastes
[17:56] <crypticmofo> wow i haven't been here in ages
[17:57] <crypticmofo> anyway .. i have a mpeg that i need to be made into a dvd .. im assuming its just ffmpeg -i file here -aspect 16:9 -target ntsc-dvd dvd.mpg
[17:57] <crypticmofo>  ?
[17:57] <crypticmofo> also why do i have to put it -aspect 16:9 will ffmpeg tell me what it is by default ?
[17:58] <crypticmofo> i don't need a menu or anything
[18:00] <relaxed> crypticmofo: ffmpeg -i input -target ntsc-dvd -filter:v 'scale=720:720*(((16/9)*(2/3))/(iw/ih)),pad=0:480:0:(oh-ih)/2,setdar=16:9' ...
[18:00] <crypticmofo> umm
[18:01] <crypticmofo> how would i know that ifi iddn't come here and what does it do
[18:01] <relaxed> ^^ should give you the sorrect aspect ratio
[18:01] <relaxed> correct*
[18:01] <crypticmofo> how would i know this thought if i didn't come here
[18:01] <crypticmofo> is there like a n00b proof way of finding what i need ?
[18:02] <relaxed> Use something clicky like handbrake?
[18:02] <relaxed> convertxtodvd works in wine
[18:03] <crypticmofo> don't have wine installed
[18:04] <crypticmofo> relaxed, can ffmpeg tell me my aspect ?
[18:04] <crypticmofo> well i see that its playing at 1.78.1 aspect
[18:04] <crypticmofo> i know thats is around 16x9
[18:04] <crypticmofo> if im correct
[19:29] <burek> tmatth why would you want that
[19:30] <tmatth> burek: When using RTP in the context of a SIP call, PBX's expect the RTP to be sent/received on the same port
[19:33] <burek> well, in theory it is, if you modify ffmpeg's source code
[19:34] <tmatth> that's what i've been experimenting with...would a patch allowing "reuse" options for SDP/RTP be a good idea?
[19:36] <burek> it would be welcome I guess
[19:36] <burek> if a use-case is reasonable
[19:37] <tmatth> burek: the case i'm looking at is peer to peer calls with freeswitch as the SIP softswitch
[19:39] <tmatth> burek: when it detects that RTP from peer A is being sent from an unexpected (i.e. different port than the peer receives on) port, it automatically starts sending RTP from peer B to that port
[20:02] <creep> hey
[21:27] <sine_> hye
[21:27] <sine_> relaxed: you here bro ?
[21:27] <sine_> :d
[21:27] <sine_> syntax king
[21:31] <sine_> anyone know how i can do a batch conversion of files
[21:31] <relaxed> bash?
[21:32] <sine_> like all files with *.this and *.that convert into mp3 keeping their filename
[21:32] <aleksm> Hello all, I'm trying to take two videos and combine them into one using a multiply effect. How can this be done with filters?
[21:33] <sine_> I dont use linux im on windows using a build
[21:33] <creep> like find ./ -iname "*.wav" | while read asd; do ffmpeg -i "$asd" $(basename "$asd").mp3 ; done ?
[21:33] <sine_> it doesnt matter anyway im going to work now. ill check out the wiki at work
[21:33] <relaxed> Then I have no idea.
[21:33] <sine_> thanks - bye.
[00:00] --- Tue Oct  2 2012


More information about the Ffmpeg-devel-irc mailing list