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

burek burek021 at gmail.com
Thu Sep 11 02:05:01 CEST 2014


[00:00] <c_14> You can't use audio filters when stream copying. Since you have a pcm stream, just reencode it when demuxing, or when muxing it doesn't matter.
[00:00] <c_14> Add the asetpts audio filter when you reencode the audio.
[00:01] <joules> c_14: can't explain it.
[00:01] <c_14> works now?
[00:03] <joules> no i'm annoyed because I'm sure I gave the same command and with the deint it took three hours and looked like crap in theend.
[00:04] <joules> and yes it looked better with mcdeint (sport video).
[00:04] Action: Suchiman working on 58GB MKVs take some time
[00:05] <joules> Suchiman: x264 supports threads.
[00:05] <Suchiman> yeah but if you just want to get the smaller Audio stream it still Needs to seek through the whole 58GB
[00:06] <joules> Suchiman: probably mostly IO, working on a ssd scratch disk or ramdisk (I have 72GB).
[00:07] <joules> ?
[00:07] <Suchiman> yeah, USB 3 HDD, CPU is boring itself at 3%
[00:08] <joules> oh no. USb3 is soo noob,
[00:08] <joules> but I'm sure the actually HDD is the bottle necik.
[00:08] <Suchiman> ffmpeg doing 75MB/s IO on HDD
[00:08] <Suchiman> yeah
[00:09] <joules> I use a SSD scratch disk and ramdisk for most editing.
[00:09] Action: Suchiman should get that 128GB Hynix DDR4 module
[00:09] <Suchiman> just need a CPU to handle that :/ xD
[00:11] <joules> thunderbolt does 20G http://en.wikipedia.org/wiki/Thunderbolt_%28interface%29
[00:11] <joules> I have 12cores.
[00:12] <Suchiman> c_14: it didn't seem to have any effect: http://pastebin.com/sqAVJRN1
[00:12] <Suchiman> joules: um... i fear my 4670K @ 4,4GHz can't stand your 12 cores
[00:13] <joules> lol westmere-EP
[00:14] <Suchiman> joules: uhh... talking about hyper threaded cores :P ?
[00:15] <joules> that would make it 24hthreads.
[00:15] <c_14> Suchiman: hmm, the audio should be about 02:07:45.01 ?
[00:15] <Suchiman> c_14: yeah but according to ffprobe it's still a second longer
[00:15] <Suchiman> and still at 48kHz
[00:19] <joules> c_14: well it's doing the lossless version, and it will dump to rawvideo pretty fast, it's the whole deint that slows it down. i have no idea what happened :/
[00:21] <c_14> Suchiman: hmm, I have a couple things I'd like to try, but it depends on how patient you are. There's the quick and dirty solution, and there's the searching for why it's messing up solution.
[00:22] <Suchiman> c_14: i've already wasted days on this shit, a few more hours can't hurt. i'm planning on digitalizing old VHS tapes
[00:23] <Suchiman> unfortunately ffmpeg can't use the grabber device directly because the DShow filter for the device uses crossbar
[00:23] <c_14> Right, try extracting the audio with -af aresample=async=1000
[00:24] <c_14> That'll stretch/squeeze samples to the audio timestamps.
[00:24] <c_14> So in the hope that the audio timestamps are correct it'll squish the audio down to fit the timestamps.
[00:24] <Suchiman> ahh, that sounds like an idea
[00:26] <Suchiman> c_14: by the way, maybe it's worth noticing, when i captured the streams in directShow (i used a graph editor to construct a DShow graph manually) into a avi Container it always desynced so it seems to be a piece of magic by the MKV muxer filter
[00:29] <c_14> Magic just makes everything better.
[00:29] <Suchiman> ;)
[00:30] <joules> sweet
[00:30] <joules> Suchiman: just I"m fixing some old broadcast
[00:31] <joules> mkv as lossless is good archive format, but for editing I go raw formats.
[00:32] <Suchiman> codec* mkv is a Container ;)
[00:33] <Suchiman> c_14: that Looks better
[00:33] <Suchiman> Input: Duration: 02:19:02.92 -> Output: Duration: 02:19:02.85
[00:35] <joules> mkv takes rawvideo?
[00:35] <c_14> I'd probably call that close enough. To whomever can discern a 70 millisecond desync I will give a prize.
[00:35] <c_14> joules: sure, I said so earlier
[00:35] <joules> alrighty then.
[00:36] <Suchiman> c_14: gimme some minutes, i will denoise the Audio and then try to remux it
[00:36] <joules> not sure if alot of gui editors support mkv though. Just been using avi for ages.
[00:37] <Suchiman> joules: there is for example a mkv plugin for virtualdub (:s) but you're right, there are way more editors for avi
[00:37] <joules> yeh I just downloaded lightworks the other day.
[00:49] <joules> well 30G(lossless) is way better than 80G(raw). Almost done, see if lightworks can take it.
[00:51] <Suchiman> joules: well 58GB lossless for me, i don't want to even try raw ;)
[01:08] <Suchiman> c_14: :D
[01:08] <c_14> Is that an it's working smiley?
[01:09] <Suchiman> Original MKV: 02:19:02.92; Resampled Audio: 02:19:02.85; Remuxed MKV: 02:19:02.91; Sync: perfekt ;D
[01:09] <c_14> yay
[01:09] <Suchiman> many thanks, you've ended my misery
[01:09] <c_14> np
[01:09] <c_14> Now if only I could find that other guy with the same/a similar issue from earlier today...
[01:11] <c_14> benbro: you still around?
[01:11] <Suchiman> 00:21:57 <c_14> Suchiman: hmm, I have a couple things I'd like to try, but it depends on how patient you are. There's the quick and dirty solution, and there's the searching for why it's messing up solution. <-- anything else you've wanted to try for academic purposes?
[01:12] <c_14> Nah, it was mainly if that didn't work to try adding some more resampling/pts setting options on top of that.
[01:16] <Suchiman> then another question: while audacity does a very good job at denoising the audio, are there any filters in ffmpeg (Zeranoes builds) which can improve PAL movie quality? and if i cut the black borders of the video, VLC starts showing two sizes for the video, resolution and display resolution
[01:17] <joules> can't polish a turd.
[01:17] <joules> what do you mean improve :)
[01:17] <Suchiman> joules: making it look less like turd ;)
[01:18] <joules> http://www.ffmpeg.org/ffmpeg-filters.html#toc-setdar_002c-setsar
[01:19] <joules> if you want to crop and scale, best to stick the standard scales.
[01:20] <Suchiman> for example, it has some... "ghosting"? meaning objects are surrounded by conspicuous dark / bright contours and the video has "interlacing like" issues, you can slightly see that the first line is slightly offset to the second line, but every second line is aligned
[01:21] <joules> color bleeding?
[01:21] <Suchiman> probably, i will get a pic
[01:21] <joules> can't do anything about that, you can deinterlace though.
[01:23] <joules> so the pic with no aspect btw.
[01:25] <Suchiman> http://suchi.teneon.de:8080/video.jpg
[01:26] <Suchiman> joules: so if you look at the right door frame above the head thats what i mean by "interlacing like" and at the left side of the head you see this "ghosting" or color bleeding
[01:27] <joules> umm 1920×1080?
[01:27] <Suchiman> Screen pic in VLC
[01:27] <joules> that is interlaced frames.
[01:28] <joules> if you want to tidy it up, you should start with a noaspect screenshot.
[01:29] <joules> theres also cropdetect, but I find it does too much.
[01:30] <Suchiman> joules: it does nothing in my case, the lighting of the black is too bright
[01:30] <debianuser> Hello, I have an unusual problem. I have an mkv file with subtitles (SRT), and I need to convert it to mp4, so I'm trying to embed subtitles into a video. And the hardest part is that the video is half-side-by-side 3D. I know how to keep it 3d (-x264opts frame-packing=3), but how can I embed subtitles there? Any hints to what I should look at?
[01:30] <joules> Suchiman: you one windows?
[01:31] <Suchiman> joules: yes
[01:32] <debianuser> (I mean I can go with "-vf subtitles=subs.srt", but then subtitle spans both frames which breaks completly when switched to 3d)
[01:36] <c_14> debianuser: maybe use the stereo3d filter to convert to a different stereoscopic image format like alternating frames maybe, throw the subtitles filter on that, and then convert back using the stereo3d filter?
[01:37] <c_14> Not sure how that will look once it's 3d again, but...
[01:38] <c_14> You could also try the above below 3d, but then the subtitles would only be on one eye...
[01:38] <debianuser> interesting idea, thanks! let's see...
[01:45] <debianuser> it _almost_ worked. :( I get two equal copies for left and right eye, but they're squeezed horizontally (because initially those were half-side-by-side). I guess now I'll need to play with scale filters...
[01:48] <c_14> I'd probably scale the input to iw*2 do the stereoscopic filter, then subtitles, then stereoscopic then scale to iw/2
[01:48] <c_14> But I'm not sure the order makes a difference since it's up/downscaling anyway...
[01:54] <debianuser> c_14: With scale+stereo3d+subtitle+stereo3d+scale it works! Thanks for the idea!
[02:00] <c_14> np
[02:00] <c_14> I honestly wasn't sure that would work though.
[02:03] <joules> lightworks is a no go for matroska
[02:04] <debianuser> It works. :) Now I'm looking for the way to increase subtitle font a bit. I can downscale, add subtitle then upscale, but that noticeably decreases image quality.
[02:05] <Suchiman> joules: what did you mean by noaspect screenshot?
[02:10] <joules> frame size
[02:11] <joules> if cropdetect isn't cutting it you have to figure it out manually.
[02:12] <joules> I use kruler (kde desktop) or you could just load it in an image editor.
[02:12] <Suchiman> joules: ffplay remuxed.mkv -vf "crop=704:432:8:73[crop]; [crop]setdar=dar=16/9" gives http://suchi.teneon.de:8080/cropped.png
[02:12] <joules> looks like lightworks can't even handle this avi.
[02:13] <joules> is that vlc?
[02:13] <Suchiman> um... no
[02:13] <Suchiman> thats ffplay ;) doh
[02:14] <joules> ok - framesize snapshot is more useful to people (well to me anyhow).
[02:17] <joules> hmm and lightworks wants my money.
[02:18] <Suchiman> pitty that VLMC does not get dev's
[02:19] <benbro> c_14: I'm here
[02:20] <c_14> About your audio length/sync problem from earlier: just for academic purposes/future reference could you try extracting the audio from the video again using -af aresample=async=1000 ?
[02:21] <joules> kdenlive supports all (?!) ffmpeg formats it seems.
[02:23] <benbro>  c_14: what do you mean by extracting?
[02:24] <c_14> eh, the one where you had your video as input and the wav as output
[02:24] <joules> is there such a thing as lossless mpeg2video?
[02:24] <benbro>  c_14: this is what I have http://dpaste.com/24SB0MH
[02:24] <c_14> let me check the logs
[02:25] <benbro> c_14: I have mkv where the audio lags behind the video.
[02:25] <benbro> when stretching the video by a factor of ~1.08992 with mkvtools the audio and video are almost in perfect sync
[02:25] <benbro> so the factor is constant throughout the video
[02:26] <joules> benbro: yeh i mentioned PTS to you yesterday.
[02:26] <c_14> It was this paste: http://dpaste.com/3J4TYB9
[02:26] <c_14> They just went ahead and deleted it though.
[02:27] <benbro> it's the sam epast5e
[02:27] <benbro> past
[02:27] <c_14> Does/did your source video have the audio lag?
[02:27] <benbro> yes. I captured the screen with avconv and now I'm trying to fix it with ffmpeg :)
[02:28] <c_14> ah, ok. So it was a similar issue but not quite the same.
[02:28] <c_14> Just wanted to check because there could have been a more general solution.
[02:28] <benbro> what is your solution?
[02:28] <benbro> I saw something about -af asetpts=0.91875*PTS
[02:29] <benbro> the factor I found is 0.9175
[02:29] <c_14> the solution would have been using the async feature of aresample, but that won't work if the source video is already misaligned.
[02:29] <benbro> I don't understand why. 44.1/48 makes sense
[02:29] <benbro> what do you mean by source video?
[02:29] <benbro> I just captured audio and video from my desktop
[02:29] <c_14> Yes, that captured video would be the source in this case.
[02:30] <benbro> I don't know if it's misalined
[02:30] <joules> benbro: didn't -vf setpts=0.999*PTS work?
[02:30] <benbro> joules: how to use it?
[02:30] <joules> ffplay to check.
[02:31] <benbro> ffplay -vf setpts=0.999*PTS capture.mkv ?
[02:32] <joules> tias
[02:33] <benbro> what does 0.999*PTS do?
[02:34] <joules> !pts
[02:34] <joules> http://www.ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts
[02:35] <benbro> but why 0.999 ?
[02:35] <benbro> is it arbitrary/
[02:36] <benbro> ?
[02:36] <joules> 29.97fps
[02:37] <joules> are you sure it's the video?
[02:37] <benbro> what do you mean?
[02:38] <joules> ok i'm done guessing..back to work.
[02:38] <benbro> thanks :)
[02:38] <benbro> my factor is 0.9175 not 0.999
[02:40] <joules> asetpts correct?
[02:41] <joules> so it works then great?!
[02:41] <benbro> 0.9175 almost work. I can find better number but I'll just use it
[02:41] <benbro> I still don't understand why the capture is bad
[02:41] <benbro> I'll try to compile ffmpeg on ubuntu and use it
[02:42] <benbro> but I couldn't find a simple capture command (not even on the wiki)
[02:42] <benbro> I also couldn't make it work on windows without installing other drivers (which I don't trust)
[02:42] <joules> ¯
[02:43] <joules> avconv sux ¯\o/¯
[02:43] <benbro> ?
[02:43] <benbro> yes
[02:43] <benbro> so ffmpeg will give me better results when capturing the screen?
[02:44] <c_14> https://trac.ffmpeg.org/wiki/Capture/Desktop ?
[02:44] <joules> unless you are DIW :)
[02:44] <joules> I'm really disappointed in lightworks.
[02:44] <benbro> not sure what it means
[02:44] <benbro> yet, it's not trivial to install ffmpeg on ubuntu
[02:45] <benbro> avconv -f pulse -ac 1 -i alsa_output.pci-0000_00_05.0.analog-stereo.monitor -f x11grab -framerate 15 -s 1280x960 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset:v ultrafast -crf 0 -threads 0 capture.mkv
[02:46] <benbro> ^^ this is what I'm using with avconv. it's not trivial but seems to be very common
[02:46] <benbro> I'm not sure what all the options does
[02:46] <c_14> What's up with that alsa input man...
[02:46] <benbro> c_14: I don't know but that what worked for me
[02:46] <benbro> without it, I couldn't capture audio
[02:47] <c_14> If you're using pulse, couldn't you just ffmpeg -f alsa -i pulse [foobar]
[02:47] <c_14> It'll use whatever's the default pulse audio capture device.
[02:47] <benbro> let's start with something basic
[02:48] <benbro> is there an "official" way to install ffmpeg on ubuntu 14.04?
[02:48] <c_14> There's the compilation guide.
[02:48] <benbro> that's hard
[02:49] <c_14> It's mainly copy+paste tbh.
[02:49] <benbro> https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[02:49] <benbro> that's not trivial
[02:50] <benbro> and is complex for no reason
[02:50] <c_14> It _is_ mainly copy+paste though.
[02:50] <c_14> If you have suggestions, I will gladly edit the page.
[02:50] <benbro> a deb package
[02:50] <benbro> dumb users like me a scraed by such steps
[02:50] <Nanashi> What else does "installing" do besides letting you type ffmpeg in a term?
[02:50] <benbro> that's the first contact I have with ffmpeg
[02:50] <benbro> but I just want to start using it
[02:51] <benbro> not read some compliation guide
[02:51] <Suchiman> mhh... cropping to exact video (702x430) size and then letter boxing to 16:9 ? or scaling? what would be the best solution? or even keeping it at 702x430?
[02:51] <benbro> I'm not trying to be rude
[02:51] <benbro> just honest
[02:51] <benbro> I also tried this https://github.com/stvs/ffmpeg-static
[02:52] <benbro> but it's not perfect either
[02:52] <joules> Suchiman: for achiving no just set the DAR. (IMO),
[02:53] <c_14> Nanashi: not much
[02:53] <Suchiman> joules: what about the SAR? when setting DAR the result is somewhat [SAR 3440:3159 DAR 16:9]
[02:53] <joules> Suchiman: also when you say letter boxing, do you intend on adding black bars?
[02:53] <benbro> c_14: that's why I can't use ffmpeg on ubuntu https://github.com/pyke369/sffmpeg/issues/9
[02:53] <c_14> benbro: There are efforts to getting FFmpeg into the Debian (and then Ubuntu) repos. But it might take a while.
[02:53] <Suchiman> joules: yeah, for making the encoder happy with a default ratio / something that is devideable by 16
[02:54] <Suchiman> c_14: are you an ffmpeg dev?
[02:54] <benbro> c_14: first step could be an official debian/ubuntu repository :)
[02:54] <benbro> by official I mean from the ffmpeg team
[02:54] <c_14> Suchiman: I have patched FFmpeg, but I would not consider myself an FFmpeg dev.
[02:56] <c_14> benbro: there's this ppa: https://launchpad.net/~jon-severinsson/+archive/ubuntu/ffmpeg
[02:56] <benbro> yes, a personal ppa
[02:56] <benbro> I can't trust it on my server
[02:56] <benbro> I don't know this guy
[02:56] <joules> Suchiman: 704×480 is a standard res (AFAIK).
[02:56] <benbro> I'm sure he is a great dev but I don't know him
[02:57] <joules> Suchiman: So not PAL?
[02:58] <joules> i'm using ffmpeg on debian?!
[02:58] <joules> or did I get it from dmm.org?
[02:58] <joules> yah I did.
[03:01] <Suchiman> joules: well it's shitty i think ;) the grabber grabs at 720x576 which is digital PAL?, the source material is analog PAL which is 704x576? or 702x576? and this contains an anamorph 16:9 video?! something like that, i hate analog shit ;) xD
[03:01] <joules> 704
[03:03] <c_14> benbro: all I know is that the stones are rolling on getting FFmpeg into Ubuntu + Debian, and barring any major roadblocks it should get there soon".
[03:03] <c_14> Where soon is by debian's definition.
[03:03] <Suchiman> 20years*
[03:04] <joules> lol
[03:04] <joules> thus we have dmm
[03:04] <Suchiman> whoever forked avconv, i hate him for confusing me that much
[03:05] <joules> no hate some guy for being an maintainer at debian
[03:05] Action: joules checks.
[03:05] Action: joules mode +b debian
[03:07] <Suchiman> [swscaler @ 00000000042f3d80] Warning: data is not aligned! This can lead to a speedloss <--- by the way, why is data misaligned ;)
[03:07] <joules> what's the final res?
[03:08] <Suchiman> 704x430 [SAR 215:198 DAR 16:9]
[03:08] <joules> dunno
[03:09] <Suchiman> interestingly VLC states that resolution is 704x450 while display resolution is 704x430
[03:12] <joules> needs deinterlacing too.
[03:13] <joules> well I'm probably on +kb on #debian
[03:20] <joules> http://www.lwks.com/index.php?option=com_content&view=article&id=100&Itemid=211 <-which one of the uncompressed are a good match? tried png/yuv4/rawvideo so far.
[03:24] <c_14> do you need uncompressed or would lossless H.264 be ok?
[03:33] <Suchiman> any recommendations on deinterlace filter? ffmpeg has many :o yadif seems to be good
[03:41] <relaxed> use yadif
[03:41] <Suchiman> ok
[03:52] <active8> !paste
[03:53] <active8> !welcome
[03:53] <active8> !topic
[03:53] <active8> nice
[03:53] <joules> Suchiman: and if it's pal use bff but check it (ffplay). you will see it not working when theres jitter.
[03:54] <joules> that's it, if lwks, can't take a simple avi yuv4 encoded. then I can use it. ;d
[03:54] <joules> s/can/can't/
[03:54] Action: joules hnds are cold it's true.
[03:55] <Suchiman> joules: whats the difference? could i really see it which one of These lines is the first, how would it influence the result
[03:57] <Suchiman> joules: i can't tell if there is an difference between tff and bff
[04:01] <joules> try a scene with some movement.
[04:04] <joules> oh yadif=1:1 sorry. render the fields.
[04:05] <joules> (playback)
[04:05] <Suchiman> joules: so yadif=parity=0 doesnt seems to be different from yadif=parity=1 even in quick movement
[04:08] <joules> hang on it's a movie.
[04:09] <Suchiman> and send_field also doesn't seems to change the effect ;)
[04:10] <joules> anyone?
[04:11] <joules> Suchiman: it's not captured as fields (movie).
[04:11] <Suchiman> so it doesn't really matter in the end?
[04:11] <joules> look at pullup
[04:12] <joules> never used it.
[04:12] <joules> http://www.ffmpeg.org/ffmpeg-filters.html#pullup-1
[04:12] <Suchiman> is PAL teleclined? i think it's just played faster
[04:13] <Suchiman> therefore also known as PAL acceleration
[04:13] <joules> movies are over broadcast.
[04:13] <joules> http://www.ffmpeg.org/ffmpeg-filters.html#dejudder
[04:15] <Suchiman> i'm neither converting from film to NTSC or PAL to NTSC
[04:16] <Suchiman> i'm in germany, PAL country
[04:18] <Suchiman> so currently i'm at: ffplay -i remuxed.mkv -vf "yadif[deint]; [deint]crop=w=698:h=430:x=10:y=74[crop]; [crop]pad=width=704:height=432:x=3:y=1:color=black[dar]; [dar]setdar=dar=16/9" which gives already a good improvement over the source material
[04:18] <joules> Suchiman: interlaced content is captured in fields and broadcast in frames so PAL at 50, so a movie (progressive) played over broadcast are telecined
[04:20] <joules> depends on the content, if it was broadcast captured video (interlaced) or broadcast telecined movie.
[04:21] <Suchiman> DVB ftw :o
[04:21] <Suchiman> die interlacing die!!!1
[04:23] <joules> pullup!
[04:23] <joules> interlacing is ok
[04:24] <Suchiman> joules: with which options? assuming it's 25fps broadcast and 24fps movie
[04:24] <joules> consider it 25fps
[04:25] <Suchiman> "PAL uses a similar system, "2:2 pulldown"."
[04:25] <joules> actully I don't know. Never played with it.
[04:27] <Suchiman> anyway, it's extremely late here, i must go to sleep now if i want to stand up in 4h, you guys are stealing my sleep ;D
[04:32] <joules> lwks stole my morning.
[04:41] <Suchiman> *short re-awakening* and thanks all for the help :)
[04:52] <active8> I'm trying to grab audio only from the computer - using a youtube video. It's protected from downloadhelper of course, or I wouldn't have to do this. I'd rather be able to just grab audio while I do other things and grab it in raw PCM to use fewer CPU cycles. I pasted my efforts here: http://pastebin.com/Q9pf1pt2
[10:00] <termos> I keep getting immediate exit requested messages from av_interleaved_write_frame, they seem to happen at somewhat random intervals
[10:00] <termos> 9 minutes to 25 minutes
[10:00] <termos> after encoding has started
[10:07] <Keshl> termos: If it's a bug with ffmpeg I can't help at all, but I've run into similar issues with other software. Just a few sanity checks real fast.. Is your system running hot, and is your disk filling up, are you running out of ram/swap?
[10:11] <Keshl> Oh, and, if you're overclocking, back off .2 ghz even if you don't think you need to. Same with your RAM. The fact that this is a sustained load can mess with an otherwise appearntly stable overclock. x.x
[10:12] <termos> Ah, I will try to monitor those things when it happens again. Could be worth mentioning that it happens when writing hls segments to disk
[10:13] <termos> they shouldn't be running hot, the load is very small about 7-10% cpu load
[10:14] <Keshl> Odd..
[10:50] <K4T> hello
[10:50] <K4T> frame=116272 fps= 50 q=23.0 size= 1275863kB time=00:38:45.42 bitrate=4494.6kbits
[10:50] <K4T> what is that 'q' parameter?
[11:00] <relaxed> quantizer
[12:08] <joules> anyone aware of crop and scale supporting timeline editing? Appears not with my version. I can see why, but I promise to retain the aspect ratio.
[12:37] <Keshl> joules: I don't have an answer for you, but if you ever get one, _please_ tell me. Same deal here, same promise. <É<
[13:03] <joules> Keshl: I don't think it would be supported.
[13:05] <Keshl> It might be. Ffmpeg supports a bunch of weird stuff you wouldn't think it should.. XD
[13:05] <joules> unless checks where coded in to make sure the output (crop/scale) is consistent.
[13:05] <joules> For now I just punch out the frames.
[13:10] <joules> I wonder what would happen if a encoder received a frame a difference size to the previous? Something bad would happen?
[14:22] <emulator> I am trying to build the example transcoding.c, but for some reason once built it either gives me a message that the output file could not be opened ( not permitted) IF ran on a VOB file... or it segfaults when ran on an avi
[14:23] <emulator> Can anyone help me figure out why the example seems to not work?
[14:33] <valder> I am in desperate nee dof assistance.  I'm writing some android native code using ffmpeg to mix video and audio together.  I'm not sure how to figure out this issue I am having.  The code keeps on crashing.  I don't know how to get the error code or condition why I get sigsegv errors during execution of the av_interleaved_write_frame method.  Is there anybody around that can look at what I wrote and help me figure
[14:33] <valder>  out what is wrong?
[14:35] <valder> Here's the pastebin I have: http://pastebin.com/d4pbWVTk
[14:50] <emulator> @valder What version are you using?
[14:50] <valder> @emulator: of ffmpeg? the latest tag release
[14:51] <emulator> Hmm... looking at your code... (but I may not be of much help)
[14:52] <valder> v2.3.1
[14:54] <valder> @emulator: thanks.  I can't figure why it fails on the av_interleaved_write_frame.  My code is very similar to other SO examples I've come across.  The input is a MP4 video file taken from the camera on my GalaxyTab
[14:55] <valder> @emulator: what I'm trying to do is take that original video and return a shorter version of it basically.  I know the inframe and outframe locations of each of the snippets I want to keep.
[14:59] <valder> @emulator: please tell me if what I am doing is completely ass-backwards or somehitng..  I'm new to using ffmpeg.  I'm used to working at higher levels.  On iOS all of this stuff is handled in AVFoundation classes.
[14:59] <emulator> @valder ... looking at the code... I don't see anything wrong... Have you checked your build options for ffmpeg. (No worries I am a newbie too.)
[15:00] <valder> @emulator, what options am I looking for?
[15:00] <valder> I basically copied somebody's instructions on building ffmpeg for Android.  so I don't know what needs to be turned on/off.
[15:01] <emulator> Honestly... I don't know... but I know that some errors on running can be caused by mis-configured ffmpeg builds.
[15:01] <emulator> I am trying to figure out why an example from ffmpeg website is not working on THIS fedora box...
[15:02] <valder> @emulator: here's my build script: http://pastebin.com/t8KDVehz
[15:04] <emulator> @valder :'(
[15:06] <valder> @emulator: perhaps I'm missing a few flags.. I found a few other scripts that enable different types of muxers
[15:06] <emulator> @valder I don't see anything wrong... but you could try manually  going to your build directory and checking what options the configure script has and see if you notice anything.  (./configure --help ) See if I overlooked anything
[15:06] <emulator> @valder that is what I am thinking might be the problem...
[15:06] <valder> @emulator: you mean the ffmpeg build right?
[15:06] <emulator> yes.
[15:07] <valder> @emulator, any idea on how I can get the error message other than a segfault to appear in logcat?
[15:08] <emulator> Nope :(
[15:08] <valder> @emulator: thanks
[15:08] <emulator> @valder you could pepper your source with debug statements.... that could help.
[15:10] <valder> @emulator: I did, that's how I figured out where it crashes
[15:10] <valder> notice the DLOG statements?  DLOG is my macro to android logging
[15:10] <emulator> @valder: Yeah.. I assumed that.
[15:11] <emulator> @valder: but I wasn;t going to assume and take it as fact.
[15:11] <valder> @emulator: only issue is I don't know how to print out an arbitrary object.
[15:12] <valder> for instance the args to av_interleaved_write_frame, how can I do a dump of those values?
[15:12] <klaxa|work> looks like twitter in here
[15:15] <emulator> Have you tried just passing them into a debug message?  That *sometimes* works
[15:18] <emulator> @valder: you may also want to build with debug.
[15:19] <valder> @emulator: mind if we go into private chat? seems our conversation is annoying a few people.
[15:25] <klaxa|work> if you are referring to me, i was just trying to make a witty comment
[15:27] <emulator> Apparently we didn't get it...
[15:27] <klaxa|work> s-sorry
[15:27] <emulator> No worries... (I don't mind)
[15:29] <klaxa|work> i mean you both were obviously talking to each other, i prefer not to prefix my messages with a nick then, but that's a matter of taste
[15:30] <klaxa|work> and etiquette i guess
[15:31] <emulator> Ehh... I like making it easy for users...  and it gets confusing following a conversation when multiple are going on(different channels, different etiquette)
[15:31] <valder> klaxalwork: I didn't want to exclude anybody if they had anything to add to the conversation. private chats exclude additional help
[15:32] <valder> different channels different rules. klaxalwork: if you have anything that can help me I would greatly appreciate it.
[15:32] <klaxa|work> hmm yes i guess i would have been better off just reading :)
[15:33] <klaxa|work> i am not exactly familiar with the C API of ffmpeg
[15:34] <valder> neither am I that's why I'm here. :)  SO only goes so far it seems.  :)
[15:35] <klaxa|work> does it crash at the very first call of av_interleaved_write_frame() ?
[15:35] <klaxa|work> or does it write a few frames and crashes then?
[15:36] <klaxa|work> because the pFormatCtx variable is initialized by opening a file, i'm not sure you can just use it and write there too
[15:37] <valder> crashes on first call
[15:38] <klaxa|work> does av_interleaved_write_frame() also take an OutputFormatContext?
[15:38] <valder> do I need to create a new AVFormatContext var and pass that to av_interleaved_write_frame?  Or are you saying I'm missing some configuration for pFormatCtx
[15:39] <klaxa|work> i think you have to allocate a new formatcontext, yes
[15:40] <valder> so is each formatContext tied to a specific file or write call?
[15:41] <klaxa|work> i'm not sure myself, but the documentation for av_interleaved_write_frame() says it's a "media file handle" so i would think you have to use a different file for writing than you use for reading
[15:41] <klaxa|work> did you look at the remuxing.c example code?
[15:42] <klaxa|work> maybe take a look at: https://www.ffmpeg.org/doxygen/trunk/remuxing_8c-example.html#a25
[15:42] <valder> hmm ok.. I think I got confused.. been looking at too many examples.  some showed writing using only a single context and others with two
[15:42] <klaxa|work> avformat_alloc_output_context_2()
[15:42] <klaxa|work> oh?
[15:42] <klaxa|work> maybe i'm completely wrong
[15:43] <klaxa|work> i only took snippets from remuxing.c too
[15:43] <valder> yeah.. it could also be that the code I used as reference was older too
[15:43] <klaxa|work> those parts worked though
[15:44] <valder> i've had to go through hell the last few weeks trying to rebuild this code i'm working on.  easily could have munged things up.. thanks1
[16:45] <emulator> I still can't get the transcoding.c example to work... does anyone know why? Or can give pointers or anything?
[16:50] <emulator> It creates the file... just fails to open it.  I think.
[16:53] <emulator> Passing into it an avi causes a segfault...
[16:55] <emulator> Figured it out.  :-) THANKS
[17:43] <valder> klaxalwork: in the sample code you linked to, the output file is built using the input file's codec as a reference.  What if I already know what output codec I want to use?  Where is the documentation for that?  I assume its a constant somewhere where I can say I want the output format to be MP4/H.264 or something right?
[17:46] <valder> n/m just noticed klaxalwork logged out.
[17:47] <valder> can somebody assist me again?  :)  in https://www.ffmpeg.org/doxygen/trunk/remuxing_8c-example.html#a25  The output file is conifugred using the input file's information.  How do I create the output file without using the input file?
[20:00] <atr2006> libx264 requires that frame width and height are even numbers. Is it restriction of H.264 standard or just its implementation in libx264?
[20:01] <JEEB> it requires what your picture type requires
[20:02] <JEEB> 4:2:0 is mod2 width and height
[20:02] <JEEB> 4:2:2 is mod2 width and mod1 height
[20:02] <JEEB> 4:4:4 is mod1 width and height
[20:02] <JEEB> chroma subsampling :P
[20:04] <atr2006> oh yes, i suspected that it is due to chroma subsampling :) thank you very much
[20:04] <JEEB> np
[20:23] <BtbN> h264 even requires the width/height to be multiples of 16
[20:23] <BtbN> not just even numbers
[20:24] <BtbN> That's why 1080p videos are encoded as 1920x1088
[20:24] <BtbN> + a flag saying crop the bottom 8 pixels
[20:25] <JEEB> yes, but that isn't visible to the user
[20:25] <JEEB> but yes, if we're really pedantic AVC encodes in macroblock sizes
[20:25] <JEEB> I think the limitations change a bit with interlacism, too
[20:26] <JEEB> in HEVC the internal size depends on the coding tree maximum size
[20:26] <JEEB> which can be up to 64x64
[20:29] <emulator> In C how do you prevent the AVCodecContext from making the output significantly smaller?  For simplicity I am working with the transcoding example, but I can't seem to figure out how to not let it get shrunk to about 1/4 the original size.
[20:33] <onyx> c_14: is there a way to make the video rendering not stop when 1 frame is missing?
[20:34] <emulator> Would that be qmin and qmax?  To prevent the shrinkage?
[20:35] <BtbN> Why do you even reencode it if you don't want it to change at all?
[20:36] <BtbN> The only real point in re-encoding is switching to a diffrent codec or reducing its size
[20:36] <emulator> I want to be able to control the size of the file... not not get it smaller but control how much
[20:44] <c_14> onyx: you could switch from the sequence pattern type to glob pattern type.
[20:44] <onyx> ooooh great
[20:44] <onyx> I think I saw that before
[20:44] <onyx> yeah yesterday there were missing 3 frames
[20:45] <onyx> so the rendering stopped
[20:45] <onyx> I had to manually duplicate some images and rename them for it to finish rendering
[21:38] <bryno> hi! this might seem silly, but... v2.3.3 is considered the latest "stable", right?
[21:39] <sacarasc> That's what the topic says.
[21:40] <bryno> sorry. i look at the site and see 1.2.8, 2.2.7, and 2.3.3 listed. i don't really know the differences :D
[21:42] <llogan> for general users the latest "stable" is considered to be the latest from git master ~98% of the time
[21:42] <llogan> the various release numbers are different release branches
[21:43] <bryno> that's what i typically went with long ago, before versions were put out more often :S
[22:01] <Mavrik> bryno, yes, 2.3.3 is the newest
[22:01] <Mavrik> the older versions are there for people who have legacy software relying on those versions
[22:02] <bryno> i'm in that spot of deciding which version to go with: 2.3.3 or git master
[22:02] <JEEB> just go with master unless something is specifically broken
[22:03] <JEEB> or well, nothing says that the release isn't
[22:03] <JEEB> since there is no assurance that someone remembers to maintain the release branches with bug fixes
[22:03] <JEEB> welcome to open source multimedia
[22:03] <JEEB> at least for latest master you can check fate.ffmpeg.org
[22:04] <JEEB> and see the test results on various platforms
[22:04] <Mavrik> I usually grab the release just to have reproducable builds
[22:04] <Mavrik> also I did see backported patches there occasionally ;)
[22:04] <JEEB> yes, at times they do get backported
[22:04] <JEEB> and you can have reproduce'able ones from master too
[22:04] <JEEB> just note the hash
[22:04] <JEEB> :)
[22:04] <bryno> eheh, thanks :D
[22:05] <JEEB> anyways, it's better than it was but it's still somewhat of a mess with releases
[22:05] <Mavrik> JEEB, meh
[22:05] <Mavrik> I link against a certain version of API so releases help there :)
[22:05] <Mavrik> don't have to manually check which hash is the "newest" for an API
[22:05] <JEEB> :)
[22:06] <Mavrik> but yeah, I'm crazy enough to run production software on OSS :P
[22:07] <JEEB> oh that is nothing new :)
[22:48] <emulator> when remuxing how can I set the frame rate to the same as when it was decode?  Trying to get the example transcoding to give me 1/2 the frames of the original.
[22:48] <emulator> *transcoding.c
[22:50] <BtbN> you can't do that without re-encoding.
[22:51] <BtbN> Or what do you mean?
[22:53] <emulator> well, what I mean... is... I want to slow down the frames... and the example actually returns it at 59.94 when originally it was 29.97.  I want to be able to do the opposite
[22:53] <emulator> I believe it is re-encoding.
[22:54] <emulator> It's not a script... It is the example in trunk
[22:55] <emulator> I can paste it if you want.
[22:55] <emulator> This file: https://www.ffmpeg.org/doxygen/trunk/transcoding_8c_source.html
[22:57] <c_14> Do you want to slow down the video or just cut the framerate?
[22:58] <emulator> Eventually I would like to know how to do both...
[22:59] <c_14> init and use the fps/setpts filters
[23:00] <emulator> uhhhh.... I don't know how/what that is... LOL... hold on let me hit the api.
[23:02] <emulator> That would be this call? av_malloc_array(ifmt_ctx->nb_streams, sizeof(*filter_ctx))
[23:05] <c_14> Think so
[23:06] <emulator> ok... thanks.
[23:06] <emulator> I will look into that later... I goota go.  Thanks for everything.
[23:23] <Suchiman> applying hqdn3d or not to apply, that is the question
[23:30] <rivarun> hello. i have a 30fps video that i'd like to play at half the speed. i've seen some samples of people who upconverted videos to 60fps (and i believe some frame smoothing/generation was done too) to get a smoother animation. is there a way to get a similar result with ffmpeg?
[23:31] <rivarun> interpolation is probably the word i'm looking for
[00:00] --- Thu Sep 11 2014


More information about the Ffmpeg-devel-irc mailing list