[Ffmpeg-devel-irc] ffmpeg.log.20130515
burek
burek021 at gmail.com
Thu May 16 02:05:01 CEST 2013
[00:04] <Paranoialmaniac> luc4: it depends on lengthSizeMinusOne in avcC
[00:06] <Paranoialmaniac> luc4: ffmpeg uses always 4 byte length. see ff_isom_write_avcc() > avio_w8(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */
[00:06] <luc4> Paranoialmaniac: sorry, not understanding... I'm reading annex B, I throw away PPS and SPS and I read I have to replace start prefix with the size in bytes of the frame. What tells me the size of field in which I have to put the size of the frame?
[00:07] <luc4> Paranoialmaniac: ah ok ok, thanks, I thought so but I wanted to be sure of that instead of simply testing.
[02:20] <llogan> swordfischer: now i can't seem to duplicate the issue...
[09:29] <luc4> Hi! Someone who knows how I am supposed to place the nal size in a avcc stream for ffmpeg to mux to mp4 correctly?
[11:50] <luc4> Hi! Do have to put PPS and SPS in the avcc h264 stream to mux into mp4?
[11:52] <muken> luc4: for avc1 and avc2, yes
[11:53] <Paranoialmaniac> for avcp, have to put sps and pps parameter set track
[11:53] <luc4> Paranoialmaniac: oh, ok, I read somewhere that I was supposed to discard those, only placing in extradata for avcodec.
[11:53] <Paranoialmaniac> though i never seen avcp format
[11:54] <luc4> Paranoialmaniac: so I should create an AVPacket containing PPS, SPS and I-frame, and provide it to livavformat, correct?
[12:03] <Paranoialmaniac> luc4: wrong. you split sps and pps by the parser and set them to extradata before writing the header.
[12:07] <Paranoialmaniac> libavformat mov/mp4 muxer can't handle multiple avcC
[12:07] <durandal_1707> how so?
[12:10] <Paranoialmaniac> durandal_1707: mov_write_avcc_tag is called only once in mov_write_trak_tag.
[12:11] <Paranoialmaniac> uh. wrong sorry. libavformat just write sample description entry once
[12:13] <durandal_1707> and why multiple times writing is needed?
[12:13] <luc4> Paranoialmaniac: ah ok, so av_write_header after extradata is set from PPS and SPS. That is ok. But then, should I provide SPS and PPS also to av_write_frame?
[12:17] <Paranoialmaniac> durandal_1707: impossible to write parameter sets with same parameter set id in a sample description entry. h264 stream can change parameter set without changing its id on the way of stream
[12:18] <Paranoialmaniac> luc4: don't provide sps and pps for each frame
[12:18] <durandal_1707> Paranoialmaniac: if it is bug than it should be reported
[12:19] <luc4> Paranoialmaniac: ok, not for each frame, but not even for an I-frame? Or do I have to leave those there for the I-frame and provide to av_write_frame?
[12:20] <Paranoialmaniac> durandal_1707: anyway libavformat (de)muxer don't support multiple sample descrriptions. should implement it for demuxer at the first
[12:21] <durandal_1707> Paranoialmaniac: are there such samples, if yes this also should be reported as bug
[12:22] <Paranoialmaniac> luc4: s/each frame/any frame/ sorry
[12:23] <Paranoialmaniac> durandal_1707: i can make such sample easily. and also can provide a sample with different codecs in one track: P
[12:24] <luc4> Paranoialmaniac: but I tried to produce the mp4 using the ffmpeg binary, which is fine. I opened with an hex editor and those PPS and SPS were inside it. If I try to remove, vlc won't play the mp4.
[12:25] <JEEB> libavformat-based stuff can play a lot of stuff, including plain Annex B in "mp4". That still doesn't mean you should do it, though :P
[12:25] <Paranoialmaniac> luc4: where do you remove sps and pps from
[12:26] <Paranoialmaniac> for avc1 and avc2, it is illegal that a frame contains sps and pps
[12:26] <luc4> Paranoialmaniac: I created the mp4 from my h264 annex b using the ffmpeg binary. That plays fine, except for the speed. In the binary, I see PPS and SPS are clearly inside the mp4. That is why I was asking.
[12:27] <JEEB> yes, but did you look at how they're located within the file?
[12:27] <Paranoialmaniac> sps and pps in avcC is OK
[12:27] <JEEB> they have to be in the file
[12:27] <JEEB> otherwise you can't play it :P
[12:27] <Paranoialmaniac> sps and pps initialize the h264 decoder
[12:28] <Paranoialmaniac> without them, IDR-frame also can't be a keyframe
[12:28] <luc4> ah ok ok, sorry, so, I guess I read those from my h264 annex b, set those in codec extradata, and send those with av_write_frame with their keyframe. Am I getting it correct this time? :-)
[13:27] <zeeflo> im using bureks build, because it has srt support. My question is.. Is it possible to make like a... transparent box behind the subs?
[13:28] <zeeflo> sorta like this: http://designguide.ku.dk/billeder/undertekster.jpg/
[13:28] <JEEB> zeeflo, (ab)use the ass format? I think that thing converts srt to ass internally anyways :D
[13:29] <zeeflo> JEEB: ok
[13:29] <JEEB> aegisub is a great editor for that format
[13:29] <zeeflo> aegisub..
[13:29] <zeeflo> i dont know if thats available for debian
[13:29] <zeeflo> lemme check
[13:30] <JEEB> someone had ppas available at one point
[13:30] <JEEB> 3.x requires wx 2.9.3 or newer, and 2.9.x isn't packaged on debian...
[13:30] <zeeflo> nope
[13:30] <zeeflo> its not
[13:30] <JEEB> last time I tested on ubuntu I had to build it
[13:30] <zeeflo> im actually on linuxmint
[13:30] <zeeflo> an ubuntu deviasoin
[13:30] <JEEB> 2.9.x should've been possible because that only needed wx 2.8
[13:31] <zeeflo> maybe theres a deb on their website
[13:31] <JEEB> hey, aegisub is in debian's unstable :D
[13:31] <JEEB> lol
[13:31] <JEEB> http://packages.debian.org/unstable/aegisub
[13:31] <JEEB> 2.1.9 because debian/ubuntu don't package wx 2.9.x
[13:32] <zeeflo> yea
[13:33] <zeeflo> HAH
[13:33] <zeeflo> the content of the README:
[13:33] <zeeflo> To be made
[13:33] <zeeflo> ffs
[13:33] <JEEB> there's actually pretty good documentation for aegisub
[13:33] <JEEB> regarding usage
[13:34] <JEEB> and the IRC channel on rizon is pretty active
[13:34] <zeeflo> i need the install doc..
[13:34] <zeeflo> theres no doc for that
[13:35] <JEEB> oh, you're OK with compiling yourself?
[13:35] <zeeflo> although it has an install-sh
[13:35] <zeeflo> yea yea
[13:35] <JEEB> did you already compile wx 2.9.x?
[13:35] <JEEB> because that's needed for up-to-date aegisub
[13:35] <zeeflo> no, I dont have it compiled
[13:35] <JEEB> and if you're going to be using aegisub 2.1.x then you might as well install the debian/ubuntu package :P
[13:35] <zeeflo> i dont know what the v. is
[13:35] <zeeflo> lemme check
[13:36] <zeeflo> 3.0.2
[13:36] <zeeflo> straight off their website
[13:36] <JEEB> yeah, that will need wx 2.9.3 or newer IIRC
[13:37] <JEEB> so if you just want to use aegisub, just install the debian/ubuntu 2.1.x package that can be seen in the debian's unstable repos f.ex.
[13:37] <JEEB> that bases on 2.8 wx
[13:38] <zeeflo> yea
[13:38] <zeeflo> wx is only 2.8
[13:38] <zeeflo> do you know what the repo is for it?
[13:38] <JEEB> yes, which I noted before :P Because 2.9.x is "unstable" and thus debian doesn't want to provide it
[13:38] <JEEB> yet wx wants people to use 2.9.x
[13:38] <JEEB> and there are bugs affecting aegisub fixed in 2.9.x so they moved :V
[13:38] <zeeflo> hmmm
[13:39] <zeeflo> then I should probably compile 2.9?
[13:39] <JEEB> if you just want to use aegisub RightNow, it's better to just install the package for now
[13:39] <JEEB> if you want to go the long way one day
[13:39] <JEEB> then you can later install wx 2.9
[13:39] <JEEB> and then aegisub 3
[13:41] <zeeflo> god damnit
[13:41] <zeeflo> stupid linuxmint
[13:48] <JEEB> lol
[13:49] <JEEB> someone made debian source package for another wx 2.9 project by just including the wx in there :D
[13:49] <JEEB> (and probably builds wx as well with its build scripts
[13:50] <zeeflo> its ok
[13:50] <zeeflo> i got it working
[13:50] <zeeflo> only 2.1.9
[13:51] <zeeflo> but guess its ok for now
[13:51] <JEEB> should work
[13:51] <JEEB> yeah
[13:51] <zeeflo> now i just gotta figure out how to make those shadow boxes etc etc
[13:53] <JEEB> open style editor, edit the current script's default style
[13:53] <JEEB> see the outline setting and the opaque box setting
[13:54] <zeeflo> would that be styles manager?
[13:54] <JEEB> yup
[13:54] <zeeflo> ahh yea
[13:56] <zeeflo> wtf
[13:56] <zeeflo> do I have to do this with every subtitle?
[13:56] <JEEB> no?
[13:56] <zeeflo> doesnt it save the settings?
[13:56] <JEEB> that's why you have styles
[13:56] <JEEB> make sure you edited the style of the current script and not the one from the archive or whatever it was
[13:57] <JEEB> and then make sure that the style for all of those subtitles is whatever style you edited
[13:57] <zeeflo> i edited the Default
[13:57] <JEEB> you did notice there were two lists? :P
[13:57] <JEEB> in the style manager
[13:57] <JEEB> storage and current script
[13:57] <zeeflo> yes
[13:57] <JEEB> ok
[13:57] <zeeflo> Ahh
[13:57] <zeeflo> should I edit the Storage one?
[13:58] <JEEB> no, the current script one
[13:58] <zeeflo> and then save it?
[13:58] <zeeflo> and then every sub i load, will use that?
[13:58] <JEEB> no... but if you want to have a certain style in the storage for easy copying into the current script, then yes
[13:59] <zeeflo> so, I have to copy the storage to the current script every time I load a new sub?
[13:59] <JEEB> yes
[13:59] <zeeflo> ok
[13:59] <JEEB> if you want that style to be applied
[13:59] <zeeflo> i do
[13:59] <zeeflo> it should be uniform
[14:00] <JEEB> if you need to apply identical styles to many files then I also recommend taking a look at the command line tool of pysubs https://github.com/tigr42/pysubs/wiki/Using-the-CLI-tool
[14:01] <JEEB> "use SubStation styles from given file: --update-styles modified_styles.ass"
[14:03] <zeeflo> I just noticed that if I edit the Default in the Storage, its the style I created.
[14:04] <zeeflo> So thats good
[14:04] <zeeflo> I can just load the srt, and hit save
[14:04] <zeeflo> it will use the style i created
[14:04] <zeeflo> testing time!! :D
[14:05] <JEEB> there are more fancy and possibly better ways of doing this as well
[14:05] <JEEB> but the box adding is simple and unless you're a perfectionist it should work
[14:06] <zeeflo> how?
[14:06] <zeeflo> with aegisub?
[14:06] <JEEB> yes
[14:06] <zeeflo> is the result the same with more fancier ways?
[14:06] <JEEB> no, I mean, the result would be more fancy
[14:07] <JEEB> editing the color, alpha...
[14:07] <JEEB> or I just missed the option to edit those, but I couldn't as I just tried :D
[14:08] <zeeflo> hmm
[14:10] <zeeflo> that box is in NO way shape or form, opaque!!
[14:10] <zeeflo> there is not a grain of transparrency in it
[14:11] <JEEB> ah, ok -- I was failing. You can make it transparent with just the style
[14:12] <JEEB> set outline to what you need, shadow to zero
[14:12] <JEEB> then set the color/alpha for outline
[14:12] <JEEB> also you might want to use the preview in aegisub to preview the result ;)
[14:12] <JEEB> load up the video and see
[14:12] <JEEB> so yeah, if that's what you need, it seems to work rather well :)
[14:12] <zeeflo> hmm
[14:12] <zeeflo> alpha
[14:13] <zeeflo> outline is 2, shadow is 0
[14:13] <zeeflo> but where do I set the color for alpha?
[14:13] <JEEB> uhh, the amount of alpha (opacity)
[14:13] <JEEB> at least aegisub 3 has it in the color selection for outline
[14:13] <zeeflo> i dont see it
[14:14] <zeeflo> ahh
[14:14] <zeeflo> there it is
[14:14] <zeeflo> outline is just black
[14:14] <JEEB> yes, the default is "black, no alpha (opacity)"
[14:14] <zeeflo> yup
[14:14] <zeeflo> 0
[14:15] <zeeflo> wow.. I gotta go up to almost 90
[14:15] <zeeflo> 80 looks like something ;)
[14:18] <zeeflo> aight
[14:18] <zeeflo> follow me on this
[14:18] <zeeflo> no wait
[14:18] <zeeflo> ill make a screenie
[14:20] <zeeflo> http://oi40.tinypic.com/e0pgkl.jpg
[14:20] <zeeflo> can you see how the box cross each other inbetween the subs?
[14:21] <zeeflo> which creates a darker "box" inbetween the lines
[14:22] <zeeflo> and using spacing, only creates space horisontally inbetween the letters
[14:23] <zeeflo> how can I compensate for that?
[14:24] <JEEB> there should be margin settings
[14:24] <JEEB> in the style editor
[14:24] <JEEB> you need vertical margin
[14:24] <JEEB> default in aegisub 3 is "10"
[14:24] <zeeflo> yes, but that looks like its a margin for where the subs should be placed in the image???
[14:25] <zeeflo> default in that setting is 10 right?
[14:25] <JEEB> might affect that as well, but you can always set the position
[14:25] <JEEB> although I'm actually not sure :s
[14:25] <JEEB> it's probably used for both
[14:25] <JEEB> you could ask on #aegisub @ rizon
[14:26] <JEEB> also see the styling documentation of aegisub
[14:26] <JEEB> http://docs.aegisub.org/manual/
[14:26] <JEEB> http://docs.aegisub.org/manual/Styles
[14:28] <zeeflo> hmm
[14:31] <zeeflo> looks like you cant adjust that
[14:35] <zeeflo> screw it
[14:35] <zeeflo> back to srt :)
[14:37] <zeeflo> thanks for helping me thouh
[15:21] <lkiesow> Hi, I played around with the ffmpeg filters and found that ffmpeg -i in -vf "select=eq(pict_type\,PICT_TYPE_I)" out work on some systems while on others it is ffmpeg -i in -vf "select=eq(pict_type\,I)" out. Does anyone know why?
[15:22] <lkiesow> The latter version is in the filter documentation.
[15:22] <lkiesow> The other is used in the filter examples
[15:42] <durandal_1707> lkiesow: yes, now both should be supported, later one was introduced recently
[15:55] <lkiesow> The first one doesn't work on any version we tested (from ffmpef 0.7.x up to 1.1.6). The second one doesn't work with the ffmpeg of someone else&
[15:58] <durandal_1707> lkiesow: yes, but with latest master both cases should work
[16:14] <cjdavies> just doing a very simple mp4 to wmv conversion, can't get it to preserve decent quality
[16:14] <cjdavies> -q doesn't seem to do anything no matter what value I pass
[16:14] <cjdavies> the input file is 23.6MB, the output is always 4.2MB no matter what -q I set
[16:14] <cjdavies> any ideas?
[16:19] <zeeflo> cjdavies: pastebin your conversion command
[16:22] <cjdavies> zeeflo: no need anymore, I put it through openshot
[16:26] <burek> cjdavies, probably you used a wrong cmd line
[16:27] <burek> assuming that ffmpeg will magically guess what you want
[16:27] <burek> that's why it's best to provide your cmd line + complete output
[17:00] <luc4> Hi! I created a mp4 file using libavformat muxing h264. The result seems to be played correctly by mplayer and mediainfo seems to be providing correct information. Anyway vlc seems read correctly without showing any frame. Duration is correct and playback runs, but no frame and no clear error. Anyone who can suggest a way to guess what is wrong here?
[17:07] <Devedse> Is there a way to use intelquicksync or cuda with ffmpeg?
[17:23] <salamanderrake> hello is there an equilivent to libav's avconv?
[17:25] <sacarasc> ffmpeg.
[17:27] <salamanderrake> yah I just read that.
[17:27] <salamanderrake> have to convert a script from avconv syntax to ffmpeg
[18:44] <RobertNagy> I'm getting a negative pts from avcodec_encode_audio2, how does one handle that?
[18:47] <JEEB> encoder delay
[18:47] <JEEB> it means that you should deal with it accordingly
[18:48] <RobertNagy> and accordingly entails?
[18:48] <RobertNagy> if i try to av_interleaved_write_frame
[18:48] <RobertNagy> the resulting packet it fails
[18:48] <RobertNagy> should I throw it away?
[18:50] <JEEB> <RobertNagy> and accordingly entails? <- write the delay in an appropriate way, of course
[18:50] <RobertNagy> ?
[18:51] <RobertNagy> I'm not following
[18:51] <RobertNagy> I have a packet, with data and negative pts, I can't write it to the output stream, what do I do with it?
[18:51] <JEEB> IT MEANS THAT THE AUDIO HAS A FUCKING DELAY, I'M TELLING YOU THE THIRD TIME
[18:54] <RobertNagy> yes, I understood what is means, what I don't understand is why I'm getting a packet if there is a delay, if got_packet == 0 then it would make sense to me, but since I'm getting got_packet == 1, my question is what I do with the packet
[18:55] <JEEB> it's not an empty packet, is it?
[18:55] <JEEB> it contains the audio data encoded from that point in time ,containing the encoder delay
[18:55] <JEEB> most audio encoders encode some amount of encoder delay material at the beginning
[18:56] <JEEB> you can't exactly cut it off either
[18:57] <RobertNagy> so I can't write the packet and I can't throw it away, what do I do with it?
[18:58] <JEEB> who said you can't write the packet?
[18:58] <JEEB> possibly not in the way that you tried to do it
[18:58] <JEEB> but the negative pts means that you set a delay accordingly in the container
[18:58] <JEEB> and mux it in
[19:02] <RobertNagy> I'm getting, "Queue input is backward in time"
[19:10] <naquad> hi
[19:11] <naquad> i have rtsp stream on input that i need to pack to flv container. all good except that input stream is variable frame rate, but it looks like outgoing flv has fixed bitrate and output is played for mere seconds
[19:12] <naquad> how do i tell ffmpeg to set variable frame rate or how do i convert stream (h264) to constant rate?
[19:14] <JEEB> does the input have any timestamps?
[19:15] <naquad> mmm
[19:15] <naquad> it has some
[19:15] <naquad> but they're mess
[19:28] <naquad> any ideas?
[20:13] <swordfischer> llogan: By the way thanks for your help last night. I didn't really get that webcam issue fixed. Though, I just made luvcview be on top instead - so kind of the same effect, but I could see myself :)
[20:18] <llogan> swordfischer: i'll try to take a look at at again later...maybe
[20:20] <swordfischer> Cheers, no rush though - don't have to use that feature for quite some time now :) - would be nice to pinpoint the issue anyhow
[20:22] <llogan> just remember to update to latest whenever you do try again since maybe it will be resolved by then
[20:24] <swordfischer> yes of course - my distros package manager will handle git version every time I update my packages, so should be newest all the time :)
[00:00] --- Thu May 16 2013
More information about the Ffmpeg-devel-irc
mailing list