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

burek burek021 at gmail.com
Thu Oct 25 03:05:02 EEST 2018


[01:13:44 CEST] <KombuchaKip> JEEB: Which I believe is what I'm doing already?
[08:58:06 CEST] <ecraven> hello ;) is it possible to *crop* a video without recoding?
[08:59:05 CEST] <ecraven> H264 inside mp4, in this case
[09:11:18 CEST] <ritsuka> ecraven: there is a "clap" box, but I don't know if either ffmpeg or video players support it
[09:12:36 CEST] <ecraven> ritsuka: I don't have much idea about how encoders work, so maybe this is just plain impossible ;) I naively assumed that like in jpeg, there are "blocks", so you might be able to just crop at the block borders
[11:42:28 CEST] <furq> ecraven: https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata
[16:31:56 CEST] <qqz> https://justpaste.it/5gt8r
[16:32:06 CEST] <qqz> I want to employ two pass coding
[16:32:19 CEST] <qqz> can anyone tell me what is wrong about the above example?
[16:32:56 CEST] <BlackBishop> hi awesome peeps
[16:33:06 CEST] <BlackBishop> so I have 2 mp3 files, in.mp3 and one out.mp3
[16:33:12 CEST] <BlackBishop> is there an easy way to mix them ?
[16:33:25 CEST] <BlackBishop> like, put one in the left channel and one on the right channel ?
[16:37:56 CEST] <durandal_1707> BlackBishop: if you use filtering for mp3 during playback only i will help you
[16:44:30 CEST] <BlackBishop> durandal_1707: mkay :) all I want is in.mp3 on the left channel, and out.mp3 on the right channel .. or both on both
[16:44:41 CEST] <BlackBishop> but I don't want to concatenate them ( one after the other )
[16:44:47 CEST] <BlackBishop> I want them playing both at the same time
[16:44:57 CEST] <BlackBishop> I couldn't find a google online example for this
[16:45:51 CEST] <qqz> anyone here who can tell me about the secrets of two pass coding
[16:45:52 CEST] <durandal_1707> BlackBishop: are they both mono/single channel?
[16:46:02 CEST] <qqz> I want an exact bitrate to be met
[16:46:51 CEST] <BlackBishop> yep, they're both mono
[16:50:06 CEST] <hiihiii> hi
[16:50:15 CEST] <hiihiii> I am trying to
[16:50:17 CEST] <hiihiii> -filter_complex "[0:v]fps=30[out_1]" -filter_complex "[out_1]fps=40[final]" -map [final]
[16:50:54 CEST] <hiihiii> I'm getting errors. missing something? is this even possible?
[16:52:28 CEST] <furq> you can't set -filter_complex twice
[16:52:36 CEST] <furq> also you could just do -vf fps=30,fps=40
[16:52:59 CEST] <durandal_1707> BlackBishop: ffmpeg -i in.mp3 -i out.mp3 -lavfi amerge=2 out.flac
[16:53:00 CEST] <qqz> furq: can you help me with two pass coding?
[16:53:22 CEST] <furq> qqz: you need to set a bitrate
[16:53:29 CEST] <hiihiii> I'm trying to avoid using select filter in the chain. it affects everything
[16:53:51 CEST] <hiihiii> I'm using select because -itsoffset doesn't work with -r
[16:53:57 CEST] <hiihiii> as in
[16:54:18 CEST] <furq> qqz: also there's no reason to use 2-pass unless you have a specific target bitrate
[16:54:26 CEST] <hiihiii> -r 60 -itsoffset -00:00:15 -i input.mp4
[16:54:43 CEST] <qqz> how to set the target bitrate; I am already setting audio and video bitrates
[16:54:54 CEST] <furq> you're not setting any bitrates in that command you pasted
[16:55:12 CEST] <qqz> what does -vb -ab then do?
[16:55:20 CEST] <furq> they set the bitrates
[16:55:21 CEST] <hiihiii> so I'm using select=gte(n\,900) but I'm not getting the results I want
[16:55:21 CEST] <qqz> according ffprobe it sets a bitrate
[16:55:23 CEST] <furq> they're also not present in that paste
[16:55:45 CEST] <hiihiii> I get 15 seconds off black screen then it goes to where I want it to start
[16:56:02 CEST] <BlackBishop> durandal_1707: that's the one !
[16:56:04 CEST] <furq> hiihiii: you need setpts after select
[16:56:40 CEST] <furq> also -itsoffset does work with -r, but obviously -r changes the input timestamps
[16:56:47 CEST] <furq> so you'd need to calculate the correct offset for the new framerate
[16:57:06 CEST] <furq> that's probably more efficient than using select and setpts
[16:57:49 CEST] <hiihiii> -r changes TS? the input is 60fps and I'm setting it to -r 60
[16:57:58 CEST] <furq> don't use -r then
[17:01:13 CEST] <hiihiii> I need to set -r 60 otherwise I won't get the desired result
[17:01:20 CEST] <hiihiii> for example
[17:01:41 CEST] <hiihiii> -i input.mp4 -vf fps=30 out.mp4
[17:02:58 CEST] <furq> i don't know what this example is showing me
[17:04:48 CEST] <hiihiii> will output the frames A,B,E,F,I,J,M,N... instead of A,C,E,G,I,K,M,O...
[17:05:31 CEST] <hiihiii> setting -r will make the fps=30 skip everyother frame
[17:05:59 CEST] <hiihiii> not setting it will make the filter skip two frames in a row
[17:07:04 CEST] <Accord> is there a codec more suitable for multiple re-encodings than h264?
[17:07:27 CEST] <Mavrik> Anything losless
[17:07:46 CEST] <furq> hiihiii: iirc you want -vf fps=30:round=zero
[17:07:59 CEST] <Accord> Mavrik: what would you recommend?
[17:08:13 CEST] <BtbN> anything that's lossless works, including lossless h264
[17:08:40 CEST] <Mavrik> Yeah, lossless H.264 probably has the "best" maintained encoder
[17:08:54 CEST] <qqz> furq: I am now using -maxrate but pass 2  still does not work
[17:09:23 CEST] <furq> paste the command again
[17:09:44 CEST] <BtbN> (m)jpeg actually has no generation loss as well. Assuming you don't change any settings like resolution, compression strenght, ...
[17:10:02 CEST] <furq> it has generation loss when you want to convert it to something useful
[17:10:36 CEST] <Accord> thanks, will look into lossless h264
[17:11:58 CEST] <qqz> furq: ??
[17:12:31 CEST] <hiihiii> use rgb then
[17:17:12 CEST] <hiihiii> furq: nope still the same issue, this time I even get weird frame order C,D,F,I,J,L,O,P...
[17:20:50 CEST] <hiihiii> I'll set start_time and see what happens
[17:27:04 CEST] <hiihiii> idk
[17:28:38 CEST] <hiihiii> using select filter or fps=select:15 both work for me as long as I'm not chaining filters
[17:29:21 CEST] <hiihiii> ffmpeg -r 60 -i input.mp4 -vf "fps=30:start_time=15" out.mp4
[17:29:28 CEST] <hiihiii> that works
[17:31:06 CEST] <hiihiii> this won't
[17:31:12 CEST] <hiihiii> ffmpeg -r 60 -i input.mp4 -i input_2.mp4 -filter_complex "[0:v]fps=30:start_time=15[tmp];[tmp]fps=40[final]" -map [final] out.mp4
[17:31:45 CEST] <BtbN> Why do you specify -r as an input parameter?
[17:32:06 CEST] <qqz> furq: why are you so excessively unhelpful; I just need a command line that works with -pass 2 and an upper bounded bitrate; why does -max-rate not do that?
[17:32:13 CEST] <hiihiii> fps doesn't work well without it
[17:32:30 CEST] <hiihiii> at least for my case
[17:32:34 CEST] <raytiley> Any suggestions on improving this command: ffmpeg -i rtp://10.0.101.15:4444 -vsync 1 -af aresample=async=1 -c:v h264 -preset superfast -r 29.97 -maxrate 10000k -g 60 -s 1920x1080 -c:a aac -ac 2 -ar 48000 -f rtp_mpegts  rtp://10.0.101.15:5556
[17:33:00 CEST] <raytiley> https://www.irccloud.com/pastebin/3ZZhQMBs/
[17:33:18 CEST] <raytiley> I'm getting frequent output like ^^ and i'm not sure how concerned I should be with it
[17:42:37 CEST] <hiihiii> you know what I'll just sub fps with select='not(mod(n\,2))
[17:47:10 CEST] <hiihiii> thx for your help.-vsync 0 and this select will do. fixed
[18:57:09 CEST] <King_DuckZ> hello, I'm told some formats such as prores mov should be able to support 3D videos, is that right? if so, what do I need to do in code to encode a 3D frame?
[18:57:43 CEST] <durandal_1707> nothing
[18:57:55 CEST] <King_DuckZ> I'm currently sending yuvyuv which should be L and R interleaved, but the output video is just a stretched version of my input frame
[19:02:37 CEST] <King_DuckZ> did I say interleaved? I meant planar, I'm passing in 6 buffers
[19:04:41 CEST] <durandal_1707> King_DuckZ: well you are supposed to encode it in TB or SBS way?
[19:05:02 CEST] <King_DuckZ> tb? sbs? :S
[19:05:17 CEST] <durandal_1707> top/bottom sidebyside
[19:06:07 CEST] <King_DuckZ> I don't know, either is fine I guess
[19:06:38 CEST] <King_DuckZ> wait a second, you mean I have to stitch the two views together as if it was one frame only?
[19:08:32 CEST] <furq> it depends what the decoder expects
[19:09:38 CEST] <durandal_1707> prores does not have special mode for 3d afaik
[19:10:37 CEST] <furq> afaik side by side and alternating frames are the most common way of packing stereo 3d
[19:10:42 CEST] <furq> but i've not looked into it in a while
[19:10:53 CEST] <furq> you'd need to actually check what your target device wants
[19:11:13 CEST] <furq> but yeah you probably don't need any kind of special support for it
[19:11:14 CEST] <King_DuckZ> so it depends on... what? other tools we use in the company?
[19:11:20 CEST] <furq> the thing that's playing it back
[19:11:42 CEST] <King_DuckZ> ok, let me check if someone knows anything then
[19:12:52 CEST] <GuiToris> hey, I made a theora video 5 years ago and it has such a bad quality. I've just read an article about postprocessing and I was wondering if 'uspp' could enhance it's quality?
[19:13:07 CEST] <King_DuckZ> btw I think we're still recruiting, ffmpeg and c++ would make for a good candidate, let me know if you're interested (uk, europe)
[19:13:12 CEST] <furq> there isn't much that'll improve the quality of theora
[19:13:26 CEST] <furq> just use vp8/vp9 instead
[19:14:32 CEST] <GuiToris> furq, I don't have the source files anymore. Do you think there's nothing I can do about it?
[19:14:40 CEST] <furq> anything you can do is going to reduce the quality
[19:14:56 CEST] <furq> if it's super blocky then maybe aggressively denoising it will make it more watchable, but you'll obviously lose a ton of detail
[19:15:42 CEST] <furq> or there's a deblock filter, but i've never had cause to use it
[19:15:57 CEST] <furq> i'm sure it has the same caveat though
[19:19:35 CEST] <GuiToris> furq, https://ptpb.pw/iqG0
[19:19:38 CEST] <GuiToris> a screenshot
[19:21:04 CEST] <GuiToris> do you think it can be somewhat improved?
[19:21:43 CEST] <ChocolateArmpits> furq, I've cleaned up a noisy+slightly overcompressed source once, denoising helps a lot to stabilize random compression noise, the side effect is of course that areas that had noise stabilized became somewhat wobbly, but I guess that is a compromise. I used MCTemporalDenoise back then if I remember correctly.
[19:22:08 CEST] <ChocolateArmpits> my source was in better condition than GuiToris  once is though lol
[19:22:13 CEST] <ChocolateArmpits> one*
[19:22:46 CEST] <GuiToris> ahh, I shouldn't have used theora ... :(
[19:22:49 CEST] <ChocolateArmpits> GuiToris, you have lots of ringing, probably due to downscaling
[19:23:02 CEST] <ChocolateArmpits> ringing that seems impossible to clean up
[19:23:19 CEST] <GuiToris> it has been rotated
[19:23:26 CEST] <ChocolateArmpits> GuiToris, really suggest to investigate Avisynth filtering here, ffmpeg won't cut it
[19:23:38 CEST] <ChocolateArmpits> Go to the forums and look up cases similar to yours
[19:23:47 CEST] <ChocolateArmpits> see what people did and try yourself
[19:23:55 CEST] <ChocolateArmpits> GuiToris, did you rotate is just now?
[19:24:03 CEST] <ChocolateArmpits> rotate it*
[19:24:26 CEST] <GuiToris> no-no, this is the final video
[19:24:39 CEST] <GuiToris> it was edited 5 years ago, I hasn't touched it since then
[19:24:46 CEST] <ChocolateArmpits> yeah I understand
[19:24:50 CEST] <GuiToris> I've just noticed how bad the quality is
[19:27:13 CEST] <GuiToris> ChocolateArmpits, here's another frame: https://ptpb.pw/bnnq
[19:27:20 CEST] <GuiToris> that's the highest quality
[19:27:48 CEST] <GuiToris> it's not sharp at all
[19:27:49 CEST] <ChocolateArmpits> GuiToris, did you reduce the framerate to 12 frames per second as well?
[19:28:03 CEST] <ChocolateArmpits> reminds me of shitty web compression in the 00s
[19:28:34 CEST] <ChocolateArmpits> GuiToris, seriously, is the framerate alright though?
[19:30:18 CEST] <GuiToris> ChocolateArmpits, https://ptpb.pw/LgUD
[19:30:21 CEST] <GuiToris> it seems so
[19:32:04 CEST] <GuiToris> I might have choosen low quality
[19:32:12 CEST] <GuiToris> + theora
[19:32:56 CEST] <GuiToris> I bet it wouldn't look the same with h265 or vp9
[19:34:53 CEST] <ChocolateArmpits> GuiToris, I'll try fetching a few frames of another source that I had tried to uplift a few months ago
[19:35:12 CEST] <ChocolateArmpits> It's in comparatively worse condition than yours
[19:35:37 CEST] <ChocolateArmpits> 240x180 12 frames per second at 642kbps cinepak
[19:36:19 CEST] <ChocolateArmpits> I haven't continued with it, but got some results anyways
[19:37:44 CEST] <ChocolateArmpits> it became a choice between smooth denoised wobbly sections, or keeping more "stable" artifacts of the original video
[19:40:38 CEST] <GuiToris> I was thinking about using a denoiser and an unsharp mask
[19:43:41 CEST] <GuiToris> I read about denoisers the other day and it's not completely clear. They are either temporal or spatial. Does spatial mean it denoises the images individually while temporal pays attention to other frames too?
[19:43:54 CEST] <GuiToris> from this point of view a temporal denoiser is superior
[19:43:56 CEST] <ChocolateArmpits> GuiToris, correct
[19:44:10 CEST] <ChocolateArmpits> temporal filters have a higher performance cost
[19:44:13 CEST] <ChocolateArmpits> generally
[19:44:37 CEST] <ChocolateArmpits> but in your case you should definitely go for temporal filters
[19:45:48 CEST] <GuiToris> thank you for your help ChocolateArmpits!
[19:45:57 CEST] <durandal_1707> garbage in -> garbage out
[19:47:33 CEST] <ChocolateArmpits> GuiToris,  look https://files.catbox.moe/6t3xvn.png
[19:47:40 CEST] <ChocolateArmpits> left original, right filtered
[19:48:02 CEST] <GuiToris> now, that's quite smooth
[19:48:05 CEST] <GuiToris> I like it
[19:48:23 CEST] <ChocolateArmpits> i think it look pretty awkward in motion due to pulsing noise pattern
[19:48:39 CEST] <ChocolateArmpits> like not pulsing bit starving, but something to do with framerate
[19:48:56 CEST] <ChocolateArmpits> as in the filtered output in motion looks awkward last I remember
[19:49:34 CEST] <ChocolateArmpits> I specifically used these two filters for Vapoursynth: https://github.com/HomeOfVapourSynthEvolution/vsTAAmbk https://github.com/IFeelBloated/Oyster
[19:50:08 CEST] <ChocolateArmpits> one is an anti alias filter, which can help in your case, because you have quite a lot of it
[19:50:27 CEST] <ChocolateArmpits> another one is a few kinds of other artifacts
[19:50:31 CEST] <ChocolateArmpits> "ringing, staircase noise and blockiness"
[19:50:56 CEST] <GuiToris> thank you, hopefully they'll help :)
[19:51:05 CEST] <ChocolateArmpits> GuiToris, I'll give you the script
[19:51:16 CEST] <GuiToris> that would be awesome
[19:52:35 CEST] <ChocolateArmpits> GuiToris, here https://pastebin.com/raw/c76H31LG
[19:52:45 CEST] <ChocolateArmpits> you'll have to set up vapoursynth by yourself
[19:52:56 CEST] <ChocolateArmpits> where LWLibavSource goes your video source
[19:52:58 CEST] <durandal_1707> that is only to make video look more anime
[19:53:15 CEST] <ChocolateArmpits> durandal_1707, doesn't sound like a bad thing
[19:53:44 CEST] <ChocolateArmpits> GuiToris, I also only filter luma because that's the most notable change to happen
[19:53:54 CEST] <ChocolateArmpits> copying over chroma unchanged
[19:54:07 CEST] <ChocolateArmpits> and upscale to 640x480 but that may change with your video
[19:54:39 CEST] <GuiToris> thank you so much ChocolateArmpits
[19:55:06 CEST] <ChocolateArmpits> GuiToris, this is just a head start, I'm sure your end result will change
[19:55:26 CEST] <ChocolateArmpits> vapoursynth has powerful denoisers as well
[19:55:36 CEST] <ChocolateArmpits> so investigate them as well
[19:55:52 CEST] <GuiToris> will do
[19:56:29 CEST] <ChocolateArmpits> GuiToris, also read the filter notes
[19:57:06 CEST] <ChocolateArmpits> one of the two that I provided lists that you have to process each scene separately
[19:57:48 CEST] <GuiToris> ohh, that makes it even more difficult
[20:00:39 CEST] <ChocolateArmpits> they additional specific functions too, I've written my script to run a slow system, so it doesn't use additional functionality
[20:00:47 CEST] <ChocolateArmpits> specify additional*
[20:10:16 CEST] <qwertymodo> I'm looking for some help restoring a video file, but I don't really know the right terms for what I'm trying to do, so the very generic search results I'm getting are useless.  Basically, the original video was created at 24FPS, but it was converted to 30FPS, and I'm wondering if it's possible to convert it back to 24FPS and clean up the frames that were blended together in the original conversion.  The conversion turned every 4 frames
[20:10:16 CEST] <qwertymodo> into 5 in a pattern 1, 2, 2+3, 3+4, 4.  So, frame 3 doesn't exist in a "clean" form, just the frames where it was blended with the ones before and after it.  Is there any way to restore frame 3 from the clean frames 2 and 4?
[20:12:44 CEST] <iive> qwertymodo, i guess you are looking for inverse telecine
[20:12:49 CEST] <ChocolateArmpits> qwertymodo, did you try these examples? https://ffmpeg.org/ffmpeg-filters.html#toc-Examples-61
[20:13:56 CEST] <ChocolateArmpits> qwertymodo, btw that's the exact pattern you are describing https://en.wikipedia.org/wiki/Three-two_pull_down
[20:14:15 CEST] <qwertymodo> the video isn't interlaced though
[20:14:31 CEST] <iive> qwertymodo, but it looks interlaced half of the time, does it not?
[20:14:36 CEST] <qwertymodo> no
[20:14:37 CEST] <ChocolateArmpits> oops correct link to the examples https://ffmpeg.org/ffmpeg-filters.html#Examples-61
[20:14:52 CEST] <qwertymodo> the full frames are actually blended
[20:15:09 CEST] <ChocolateArmpits> it's just framerate conversion
[20:15:21 CEST] <ChocolateArmpits> it doesn't need to "look" interlaced
[20:15:23 CEST] <iive> qwertymodo, are you sure? this complicates thing.
[20:15:40 CEST] <ChocolateArmpits> unless fields have been shifted, but as he describes it, there's none of that
[20:15:52 CEST] <iive> qwertymodo, i guess that they looked interlaced, so somebody run deinterlacer on them and blended them.
[20:16:56 CEST] <qwertymodo> nah, it was animated at 24FPS and then put into a video game at 60FPS, they probably just did a lazy default-settings framerate conversion
[20:17:45 CEST] <qwertymodo> (the actual video file is rendered at 30, the game runs at 60)
[20:18:27 CEST] <qwertymodo> here's an example: https://imgur.com/a/6LXn0
[20:19:02 CEST] <ChocolateArmpits> qwertymodo, dude just try one of the examples in the filters link that I gave, it'll probably work correctly without corrections
[20:19:22 CEST] <qwertymodo> yeah, I'm doing that now
[20:19:25 CEST] <ChocolateArmpits> ohhh
[20:19:28 CEST] <ChocolateArmpits> this is nastier
[20:19:41 CEST] <qwertymodo> yeah...
[20:19:52 CEST] <ChocolateArmpits> I sort of expected fields to not be blended
[20:20:03 CEST] <iive> he said they are blended
[20:20:13 CEST] <ChocolateArmpits> I can't read x.x
[20:20:15 CEST] <iive> qwertymodo, is this from game or ffplay?
[20:20:56 CEST] <qwertymodo> those screenshots were exported from VLC, but in-game I don't see any combing artifacts
[20:21:12 CEST] <qwertymodo> I don't think the video was ever interlaced
[20:21:23 CEST] <furq> vlc doesn't deinterlace by default anyway
[20:21:33 CEST] <furq> obviously doublecheck it's turned off though
[20:22:11 CEST] <fsphil> quick q, if I do av_frame_ref(dst, src) is it safe to reuse src again with avcodec_receive_frame() without it affecting dst? implmenting an AVFrame double buffer
[20:26:05 CEST] <furq> qwertymodo: there might be an avisynth/vapoursynth script that will do something about this, but i don't know of any
[20:26:12 CEST] <furq> i suspect you're pretty much screwed
[20:27:56 CEST] <atomnuker> fsphil: no, not until both src and dst are unref'd
[20:28:17 CEST] <atomnuker> av_frame_ref creates a reference to the memory used by src in the dst frame
[20:31:36 CEST] <iive> qwertymodo, vlc may deinterlace it, try playing the file with ffplay
[20:31:57 CEST] <qwertymodo> well, at least some of the videos they appear to have used a different pulldown, where it's 1, 1+2, 2, 3, 3+4, 4.  So at least on those videos I can pull out all of the original frames.
[20:32:37 CEST] <qwertymodo> is there a windows build of ffplay?
[20:34:14 CEST] <ChocolateArmpits> qwertymodo, builds by zeranoe have it
[20:37:13 CEST] <qwertymodo> I tried the IVTC examples, and the output looks exactly the same
[20:37:33 CEST] <furq> well if you ivtc it then you'll only have one blended frame instead of two
[21:05:56 CEST] <fsphil> atomnuker: thanks. makes sense
[21:09:31 CEST] <atomnuker> technically if there's one reference left and you own it you can do whatever you want, so only dst would need to be unref'd
[21:10:49 CEST] <iive> qwertymodo, the thing is in theory you can revert that, but I don't think ffmpeg have filter that does it. also compression artifacts make it even harder.
[21:11:46 CEST] <iive> qwertymodo, the idea is that one of the blended fields is repeat of the previous frame, so you can reconstruct the other field. then use the reconstructed field for the following frame.
[21:20:24 CEST] <furq> if it's actually split into frames, sure
[21:20:27 CEST] <furq> or fields, rather
[21:36:10 CEST] <qwertymodo> The more closely I look into these videos files, the more I realize there simply isn't going to be a way to automate this conversion if I want to do it right.  The pulldown switches from scene to scene within the same file, and all kinds of other stuff (some scenes are only animated at 12fps, others at 24).  It's probably a fool's errand to even try.
[21:36:42 CEST] <qwertymodo> Dangit, Squaresoft...
[00:00:00 CEST] --- Thu Oct 25 2018


More information about the Ffmpeg-devel-irc mailing list