[Ffmpeg-devel-irc] ffmpeg.log.20200110
burek
burek at teamnet.rs
Sat Jan 11 03:05:02 EET 2020
[00:27:04 CET] <tytan> hello everyone, I kinda need help with a task I am unable to perform. I have a video with two stereo audio tracks and one of those is the standard audio track. can I reencode the file with the second track to be standard instead?
[00:29:01 CET] <pink_mist> shouldn't need to reencode for that, remux or perhaps just changing some metadata should be all you need ... I'm not the guy to ask for how though, sorry
[00:33:13 CET] <tytan> ok, what if I do a -cv copy and shuffle the audio tracks?
[00:48:14 CET] <Beam_Inn> would using ffmpeg to double the speed of a video also automatically adjust its pitch?
[00:48:54 CET] <Beam_Inn> Lypheo thank you so much. Do you have more docs about making animated gifs? Someone at imagemagik told me ffmpeg would be a better option for making animated gifs.
[00:50:11 CET] <tytan> have a nice day everyone
[00:58:03 CET] <kepstin[m]> Beam_Inn: if you use a filter that modifies only the video speed, then the audio speed will be untouched. Depending on your goals, the "rubberband" filter is good for adjusting audio speed.
[01:25:35 CET] <hseg> Hi. Am having trouble figuring out the correct format to use for my Samsung TV. Have one file that is accepted, and one that isn't, but can't tell what the relevant difference is.
[01:27:16 CET] <hseg> Working: http://ix.io/26YY, http://ix.io/26YZ Not working: http://ix.io/26Z2, http://ix.io/26Z4
[01:28:31 CET] <hseg> The Samsung manual is here: http://downloadcenter.samsung.com/content/UM/201408/20140804154219440/[UH4200-AFRICA]BN68-06310A-02ENG-0523.pdf
[01:28:50 CET] <nicolas17> I'd say "has to be baseline"
[01:28:59 CET] <nicolas17> but then it's really weird that "constrained baseline" doesn't also work
[01:30:09 CET] <nicolas17> wait
[01:30:12 CET] <nicolas17> hseg: could it be the fps?
[01:32:59 CET] <hseg> checking...
[01:33:53 CET] <hseg> Hrm, am seeing sub-30 fps in supported videos, ~60 in unsupported
[01:35:22 CET] <furq> it does specify 6-30fps for h264 in the manual
[01:35:28 CET] <furq> that would be really weird though
[01:35:37 CET] <hseg> Why?
[01:38:11 CET] <Beam_Inn> well..., kepstin, do you have a command for slowing a video and its audio without causing it to sound like chipmonks?
[01:44:01 CET] <kepstin[m]> Yes, use the rubberband filter to adjust the audio speed.
[01:47:06 CET] <hseg> hrm, ran through files, getting some files with lower fps, lemme check whether those work
[01:48:13 CET] <nicolas17> hseg: baseline vs high could *still* be a problem, but I can't tell from your previous testcases
[01:48:19 CET] <nicolas17> see if 30fps high works :P
[01:48:48 CET] <hseg> lemme check
[01:49:43 CET] <furq> also make sure the files are level 4.1 or lower
[01:52:33 CET] <Beam_Inn> how long have rubberband filters existed?
[01:53:42 CET] <Beam_Inn> according to https://ffmpeg.org/ffmpeg-filters.html#rubberband (secion 8.81) the rubberband filter needs to be flagged before compilation.
[01:56:17 CET] <pink_mist> I mean, that's true of almost every external library ffmpeg supports
[01:56:33 CET] <pink_mist> why does this need to be noted?
[01:56:46 CET] <Beam_Inn> i want to add it to my log file.
[01:57:00 CET] <Beam_Inn> I haven't compiled ffmpeg yet.
[01:57:08 CET] <hseg> OK, so the low-framerate videos work
[01:57:17 CET] <hseg> Side question - is m4v=mp4?
[01:57:25 CET] <Beam_Inn> mp4
[01:57:56 CET] <Beam_Inn> They're just very similar.
[01:59:09 CET] <hseg> So a simple rename should be fine
[01:59:51 CET] <nicolas17> note that iTunes uses m4v extension
[02:00:01 CET] <Beam_Inn> no.
[02:00:34 CET] <Beam_Inn> you can't just rename an m4v file to *.mp4 and have a working output.
[02:00:37 CET] <nicolas17> which means it *might* be encrypted with FairPlay-DRM... but if your m4v didn't come from iTunes it should be just a matter of renaming
[02:01:08 CET] <hseg> It's my own video, and I don't recall encrypting it
[02:01:20 CET] <Beam_Inn> Yes, I agree with nicolas17.
[02:01:21 CET] <hseg> Eh, renaming is non-destructive
[02:03:46 CET] <hseg> OK, have more working cases, all of which are ~30fps
[02:04:03 CET] <hseg> or 25fps
[02:04:24 CET] <hseg> how do I reencode a 60fps video to 30fps?
[02:07:29 CET] <kepstin[m]> m4v and mp4 may indicate different brands of isombff files, but that's detected when they're opened and read.
[02:07:50 CET] <kepstin[m]> So no real effect to renaming them
[02:08:04 CET] <nicolas17> kepstin[m]: it's a Smart TV
[02:08:11 CET] <nicolas17> it could be dumb and only look for .mp4 extensions
[02:08:21 CET] <nicolas17> and refuse to load anything else
[02:08:37 CET] <hseg> I
[02:08:50 CET] <hseg> That's exactly what happened
[02:55:38 CET] <hseg> Success!
[02:55:43 CET] <hseg> Thanks
[03:15:37 CET] <wondiws> hi furq
[10:09:14 CET] <yang> Is this the right line to convert Matroska -> AVI and flac -> mp3 ?
[10:09:16 CET] <yang> ffmpeg -i out0021.mkv -c:v libx264 -acodec libmp3lame -b:a 128k -channels 2 -ar 48000 -crf 23 -c:a copy -threads 1 outmp3.avi
[10:09:50 CET] <Mavrik> Huh, wat.
[10:13:05 CET] <yang> converting the file
[10:13:19 CET] <yang> from Matroska/Flac to AVI/MP3
[10:15:47 CET] <Mavrik> Creating an AVI with H.264 in it is not a reasonable thing to do in 2019
[10:15:50 CET] <Mavrik> or 2020
[10:15:56 CET] <Mavrik> What are you trying to actually do?
[10:16:13 CET] <yang> I am trying to make a file playable by hardwarwe DVD player
[10:16:24 CET] <yang> best would be DVD
[10:16:35 CET] <Mavrik> And does your DVD player support H.264 video in AVI? That doesn't seem very likely.
[10:16:42 CET] <yang> but maybe4 the DVD player can aswell play AVI
[10:16:49 CET] <yang> I don't know
[10:16:52 CET] <Mavrik> AVI is just a container
[10:16:56 CET] <Mavrik> It's also important what is inside it
[10:17:03 CET] <Mavrik> Can you look at the spec sheet?
[10:17:24 CET] <yang> no, I don't have the DVD player nearby...it's for anotehr location
[10:17:42 CET] <Mavrik> The older era DVD players supported only MPEG-2 and DivX/Xvid content
[10:17:53 CET] <Mavrik> So it's more likely you'll have to put divx in it
[10:17:57 CET] <yang> Best would be to make DVD out of Matroska/FLAC, that would be playable by the DVD
[10:17:57 CET] <Mavrik> with -c:v libxvid
[10:18:14 CET] <yang> ok
[10:18:27 CET] <yang> i assumed that AVI = DivX
[10:20:21 CET] <yang> ffmpeg -i out0021.mkv -c:v libxvid -acodec libmp3lame -b:a 128k -channels 2 -ar 48000 -crf 23 -threads 1 outmp3.avi
[10:20:24 CET] <yang> like this ?
[10:21:12 CET] <yang> I get this warning
[10:21:14 CET] <yang> Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (Berlinmp3.avi) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[10:23:20 CET] <vlt> yang: If you assumed "AVI = DivX", why did you specify "-codec:v libx264"? And why "-codec:a libmp3lame" AND "-codec:a copy"?
[10:23:43 CET] <yang> vlt: it was a command line from previous conversion
[10:23:54 CET] <Mavrik> yang, yeah, libxvid doesn't listent to crf, you probably need to specify bitrate with -b:v
[10:27:14 CET] <yang> what is a bitrate, with previous conversion I had high bitrate 14000, now its averaging at 2000
[10:35:56 CET] <th3_v0ice> Why would i get segmentation fault here avfilter_graph_config(), while using CUDA? I created a HW device, used av_buffer_ref to reference it with AVCodecContext, used av_hwframe_ctx_alloc() and av_hwframe_init() to init HWFrameCtx for encoder and decoder. And when I try to open scale_cuda filter I get segmentation fault. Line printed before the error happens w:1920 h:1080 pixfmt:cuda tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[11:19:38 CET] <CounterPillow> yang: a bitrate is the rate of information per time interval, so 2000 kbit/s is 2000 kbit (250 kByte) per second. With a higher bitrate, you (generally speaking) get better quality, because the encoder can use more information to compress the input data into.
[11:23:57 CET] <CounterPillow> a good codec and encoder allows you to achieve the same quality at a lower bitrate compared to other codecs and encoders.
[11:23:57 CET] <CounterPillow> not all scenes are equally difficult to compress, so various mechanisms of adjusting the bitrate dynamically have been invented, for example ABR (reaching an average bitrate of a certain value over a certain span of time, but letting the actual bitrate within that fluctuate as is needed), VBR (variable bitrate, aiming for a target bitrate but having a maximum bitrate to cap it by, letting the rate fluctuate as it's needed otherwise) and
[11:23:57 CET] <CounterPillow> CRF (constant rate factor, trying to keep the quality consistent throughout and adjusting the bitrate as is necessary)
[11:29:31 CET] <yang> thank you CounterPillow
[11:59:14 CET] <yang> ffmpeg -i out0021.mkv -c:v libxvid -acodec libmp3lame -b:a 128k -channels 2 -ar 48000 -crf 23 -threads 1 outmp3.avi
[12:00:03 CET] <yang> this came out ok, except video isn't very clean, so how do I apply a higher bitrate options with -b:v ?
[12:01:01 CET] <yang> Duration: 01:03:34.16, start: 0.000000, bitrate: 1088 kb/s
[12:01:05 CET] <yang> this is default bitrate
[12:01:18 CET] <yang> probably I need to do something like
[12:01:35 CET] <yang> ffmpeg -i out0021.mkv -c:v libxvid -acodec libmp3lame -b:a 128k -channels 2 -ar 48000 -b:v 3000 -threads 1 outmp3.avi
[12:02:41 CET] <CounterPillow> probably 3000k, not 3000, though I'm not sure if ffmpeg accepts the latter too
[12:02:46 CET] <yang> ok yes
[12:05:12 CET] <CounterPillow> Instead of setting a bitrate with -b:v, you can try setting a video quality level with -qscale:v with a value ranging from 1 to 31 with 1 being the highest quality
[12:06:31 CET] <CounterPillow> (note that a value of 1 is not recommended, as this will be unnecessarily large)
[12:07:40 CET] <CounterPillow> I'd start with -qscale:v 10 and adjust it up if you notice no video degradation, or down if you do notice it
[12:31:02 CET] <yang> ok CounterPillow
[13:30:32 CET] <th3_v0ice> Why would i get segmentation fault here avfilter_graph_config(), while using CUDA? I created a HW device, used av_buffer_ref to reference it with AVCodecContext, used av_hwframe_ctx_alloc() and av_hwframe_init() to init HWFrameCtx for encoder and decoder. And when I try to open scale_cuda filter I get segmentation fault. Line printed before the error happens w:1920 h:1080 pixfmt:cuda
[13:30:38 CET] <th3_v0ice> tb:/25 fr:25/c1 sar:1/1 sws_param:flags=2
[13:30:47 CET] <th3_v0ice> Sorry for double posting.
[15:09:36 CET] <plumbe0> Hi, i'm trying to create a video with a base solid color and an image overlay that needs to be resized and stay in the center. the video should also have a song playing and should be as long as the audio file. This is my command: ffmpeg -f lavfi -i color=c=0xc03a08:s=1920x1080 -i .\a.png -i '.\audio.flac' -filter_complex
[15:09:36 CET] <plumbe0> "[1:v]scale=1000:1000[v1];[0:v][v1]overlay=(W-w)/2:(H-h)/2[out]" -map "[out]" output.mp4 ; the problem is that i don't have audio and the encoding doesn't stop until i press Ctrl+C
[15:11:49 CET] <BtbN> Well, you didn't map the audio.
[15:12:05 CET] <BtbN> And never told it to use the shorter of the two inputs.
[15:14:28 CET] <plumbe0> How can i do both? i tried adding [2:a] in the filter chain but i don't know where to put it. also i tried to add "shortest=1" after the overlay but i got an error
[15:14:55 CET] <BtbN> You map the audio from input 3
[15:15:06 CET] <BtbN> shortest is not a filter
[15:15:46 CET] <plumbe0> input 3 or input 2?
[15:17:02 CET] <BtbN> The one that has your audio
[15:17:11 CET] <plumbe0> i edited the map to be -map [out][2:a] but it is still silent
[15:17:17 CET] <plumbe0> i edited the map to be -map "[out][2:a]" but it is still silent
[15:17:29 CET] <plumbe0> also tried with 3
[15:19:08 CET] <BtbN> You map one source at a time.
[15:19:48 CET] <plumbe0> I'm not that expert using ffmpeg, sorry. Can you be a bit more explicit?
[15:20:16 CET] <BtbN> Not sure how to be more explicit than that. One source per -map.
[15:21:29 CET] <plumbe0> So where do i tell ffmpeg to also pick up the audio and limit the video length to match the length of the audio?
[15:21:48 CET] <pomaranc> plumbe0: you add another -map followed with the audio encoding params
[15:21:57 CET] <pomaranc> before the output file params
[15:23:13 CET] <plumbe0> ffmpeg -f lavfi -i color=c=0xc03a08:s=1920x1080 -i .\a.png -i '.\audio.flac' -filter_complex "[1:v]scale=1000:1000[v1];[0:v][v1]overlay=(W-w)/2:(H-h)/2[out][2:a]" -map "[out]" -map "[2:a]" output.mp4 -> No output pad can be associated to link label '2:a'.
[15:24:11 CET] <pomaranc> remove that [2:a] from the complex filter
[15:24:14 CET] <pomaranc> it makes no sense there
[15:31:21 CET] <plumbe0> removed -> "Output with label '2:a' does not exist in any defined filter graph, or was already used elsewhere."
[15:40:11 CET] <vlt> pomaranc: And don't map it.
[15:41:44 CET] <plumbe0> so how do i tell ffmpeg to use the audio? with or without the map doesn't seem to work and i'm not expert enough to figure it out myself what i'm doing wrong
[15:42:53 CET] <vlt> plumbe0: Ah, sorry, I didn't see the "-i" that corresponds to "[2:a]".
[15:48:40 CET] <pomaranc> plumbe0: 2:a, not [2:a]
[15:48:57 CET] <vlt> plumbe0: Ot just 2
[15:49:32 CET] <pomaranc> or 2:a:0 to be cool
[15:52:52 CET] <plumbe0> thanks that worked! now i only need to tell ffmpeg to match video length to audio length. i tried adding -shortest option but it adds 2 seconds of silence at the end
[18:18:36 CET] <plumbe0> Hello, I'm back with another call for help on options order: my command is "ffmpeg -i color=c=0xc03a08:s=1920x1080 -i ./a.png -i ./audio.wav -filter_complex "[1:v]scale=1000:1000[v1];[0:v][v1]overlay=x=(W-w)/2:y=(H-h)/2:shortest=1[out]" -map "[out]" -map "2:a" -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags
[18:18:36 CET] <plumbe0> +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output.mp4" and when i run it i get "Trailing options were found on the commandline. [...] Filter overlay has an unconnected output". From what i read on the internet it should just be a matter of reordering the options, but i'm at a loss. Can you help me spot the offending options?
[19:26:18 CET] <vlt> plumbe0: It might just be the missing "-f lavfi"
[20:38:52 CET] <saber1> hello! trying my luck here again. I have an mp4 video in Variable frame rate, and I'd like add the PTS to each frames, the problem I have right now is multiple frames in the output video have the same timestamp
[21:32:03 CET] <ddubya> saber1, by "add PTS" do you mean as a text overlay?
[21:32:34 CET] <saber1> ddubya: yeah
[21:33:08 CET] <ddubya> if you are transcoding, may as well make it cfr then
[21:34:02 CET] <saber1> ddubya: my knowledge is very limited and I don't know whether I am transcoding or not...can't I keep it same as VFR?
[21:34:39 CET] <ddubya> I'm not sure about that... cfr is more compatible
[21:34:57 CET] <ddubya> if you change the frame rate in the filter chain you should be good
[21:35:12 CET] <ddubya> could be before or after text overlay
[21:36:27 CET] <saber1> ddubya: do you mean I do a `-r 30` in the text overlay command?
[21:37:52 CET] <ddubya> you could do for example -vf framerate=30,text=...
[21:38:30 CET] <kepstin> I don't normally recommend the framerate filter, it does frame blending and produced bad/unnatural result on many types of video
[21:39:00 CET] <kepstin> what makes you think you have an issue with "multiple frames in the output video have the same timestamp"?
[21:40:56 CET] <Palkesonoh> Hello im using this command to remove the black bars and make the video fullscreen , ffmpeg -i 1.mkv -vf "crop=1920:800:0:140,scale=1920:1080,setsar=1" og1.mkv It works good , But the problem is the video is a stretched because of the new crop settings.
[21:41:05 CET] <kepstin> Palkesonoh: please don't pm me for no reason
[21:41:26 CET] <Palkesonoh> i need help
[21:41:28 CET] <saber1> ddubya kepstin : thanks. So I can see it by playing the video in the video player, as frame changes but the timestamp of the video doesn't change.
[21:41:55 CET] <kepstin> sefeng211: what video player with what options? are you using a deinterlacing filter?
[21:42:17 CET] <Palkesonoh> how i can fix it ?
[21:43:23 CET] <kepstin> Palkesonoh: you can't remove bars to make a video fullscreen without stretching it, that doesn't make sense
[21:43:51 CET] Action: saber1 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/MjfnLbswYvLcaSrrFXuLfpXT >
[21:44:17 CET] <kepstin> sefeng211: please don't paste long messages in the channel, use a pastebin site
[21:44:34 CET] <saber1> sorry!
[21:44:36 CET] <Palkesonoh> kepstin when scaling, how to keep shapes of people's heads , thats what i mean is like is stretched because of the height when u remove the black bars
[21:44:37 CET] <kepstin> sefeng211: please try running "ffprobe -show_frames" on the file, and pastebin the first 10 or so frames of output.
[21:45:12 CET] <kepstin> Palkesonoh: what you're asking makes no sense. you can't stretch a video without stretching the video.
[21:45:51 CET] <Palkesonoh> So the issue/problem that I'm trying to solve is how to prevent any stretching in either direction. In other words, a round soccer ball in the input file must yield a round ball in the output file ! (NOT oval-shaped in either axis).
[21:47:18 CET] <saber1> kepstin: https://termbin.com/yqix
[21:47:24 CET] <ddubya> saber1, what is your command line? Do other variables increment like frame_num etc
[21:48:08 CET] <kepstin> Palkesonoh: remove the ",scale=1920:1080,setsar=1" from your filter
[21:48:09 CET] <saber1> ddubya: this was the command ffmpeg -nostdin -i tmp.mp4 -c:v libx264 -profile:v baseline -vf "drawtext=x=(w-(max_glyph_w*13))/2: y=H-h/10:fontcolor=white:fontsize=h/14:box=1:boxcolor=0x000000AA:text='%{pts\\:hms}'" -y -vsync 0 tmp_timestamp.mp4
[21:48:32 CET] <kepstin> sefeng211: there are no repeated pts, it's just a rounding error in the player output log
[21:48:44 CET] <kepstin> sefeng211: there are however some really close pts values
[21:50:33 CET] <saber1> kepstin: er, so show_frames gave different result than show_packets, and I used show_packets previously
[21:50:59 CET] <kepstin> oh, hmm, show_frames might have some fixups by the decoder
[21:51:12 CET] <kepstin> they are the same values with show_packets? that's annoying
[21:51:25 CET] <ddubya> saber1, works for me, ... maybe "-fflags genpts" ?
[21:52:03 CET] <kepstin> sefeng211: so anyways, you have this file with this issue, what do you want to do with it?
[21:52:04 CET] <saber1> could it be I have some negative frames in the input video?
[21:52:39 CET] <kepstin> or is the file something that you're generating, and you need to fix it?
[21:53:26 CET] <saber1> kepstin: all I want to do is to get timestamps overlay for doing some analysis, because I need to know what the frame looks at at each timestamp
[21:54:06 CET] <kepstin> hmm. the filterchain only gets the "fixed up" timestamps, like the -show_frames option to ffprobe
[21:54:39 CET] <saber1> and since this issue, the generated video isn't very trustworthy
[21:54:58 CET] <kepstin> there might be some things you can do with e.g. the -copyts option to disable parts of ffmpeg's timestamp processing
[21:55:38 CET] <kepstin> also -vsync 0
[21:58:06 CET] <saber1> hmm, okay, let me check with -copyts, and don't I already using -vsync 0? or I should use it somewhere else
[21:58:51 CET] <Palkesonoh> kepstin current code ffmpeg -i 1.mkv -vf "crop=1920:800:0:140" -c:a copy out.mp4 , when i remove setsar and scale nothing happens (still with black bars)
[21:59:35 CET] <kepstin> the video no longer has the black bars encoded in it
[21:59:46 CET] <kepstin> but it doesn't match your screen shape
[21:59:53 CET] <kepstin> so there's space left over
[22:01:29 CET] <kepstin> Palkesonoh: if you want the video to fill the screen, you have two options: either stretch it, or chop off the sides
[22:01:46 CET] <kepstin> stretching makes it look stretched, chopping off the sides removes part of the video
[22:04:13 CET] <Palkesonoh> So because there are movies that are full screen and look good
[22:04:32 CET] <saber1> copyts doesn't seem to work, and I have to use -vsync 0, otherwise some frames will be missing :(
[22:08:07 CET] <plumbe0> Hello, I'm back with another call for help on options order: my command is "ffmpeg -i color=c=0xc03a08:s=1920x1080 -i ./a.png -i ./audio.wav -filter_complex "[1:v]scale=1000:1000[v1];[0:v][v1]overlay=x=(W-w)/2:y=(H-h)/2:shortest=1[out]" -map "[out]" -map "2:a" -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags
[22:08:07 CET] <plumbe0> +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output.mp4" and when i run it i get "Trailing options were found on the commandline. [...] Filter overlay has an unconnected output". From what i read on the internet it should just be a matter of reordering the options, but i'm at a loss. Can you help me spot the offending options?
[22:08:53 CET] <kepstin> Palkesonoh: movies that fill your screen were either filmed in 16:9 ratio, or were adjusted to that ratio before being sent to you.
[22:09:24 CET] <kepstin> plumbe0: your error message does not match the command line you pasted.
[22:11:22 CET] <kepstin> plumbe0: also, you left before anyone responded last time, vlt helpfully mentioned that you need "-f lavfi" before the input with the color filter in it
[22:15:40 CET] <Palkesonoh> kepstin then is not possible remove top & bottom black bars without look stretch?
[22:15:59 CET] <kepstin> Palkesonoh: the other option is to remove some video from each side
[22:16:46 CET] <Palkesonoh> Yes, but it won't look so good, I'll just download the open matte version, thanks anyways.
[22:17:14 CET] <kepstin> i'm not sure what you're hoping for, it's not like ffmpeg can "make up" something to fill the missing space
[22:17:56 CET] <plumbe0> Looking into these comments, thanks
[22:18:21 CET] <Palkesonoh> kepstin https://i.ytimg.com/vi/4q-kFrnXHL0/maxresdefault.jpg
[22:18:30 CET] <Palkesonoh> Look the image , i wanted like that but you said is not possible
[22:18:35 CET] <Palkesonoh> So i will try to find the open matte version
[22:18:44 CET] <kepstin> no, they did the thing i said you could do
[22:18:48 CET] <kepstin> they removed some video from the sides
[22:19:08 CET] <kepstin> notice how the person's head is closer to the left, and there's less black space on the right
[22:19:18 CET] <kepstin> you can do that with the crop filter in ffmpeg
[22:19:40 CET] <Palkesonoh> true
[22:19:54 CET] <Palkesonoh> ffmpeg -i 1.mkv -vf "crop=1920:800:0:140" -c:a copy out.mkv
[22:19:59 CET] <Palkesonoh> so what i have to change here?
[22:20:35 CET] <kepstin> change the width so that it's a ratio of 16:9 with the height (and also a multiple of 2) and adjust the x value to center it.
[22:21:12 CET] <kepstin> if you do that, you can also add the ",scale=1920:1080,setsar=1" back to the end if you need a 1080p video
[22:21:39 CET] <Palkesonoh> okey i will try and let u know thanks you
[22:25:04 CET] <kepstin> I'd use crop=1422:800:250:140 but note that those values all have to be rounded a bit, and you can shift it left or right if you prefer.
[22:26:27 CET] <Palkesonoh> i will try
[22:28:27 CET] <Palkesonoh> kepstin
[22:29:48 CET] <Palkesonoh> why is that
[22:30:06 CET] <kepstin> why is what?
[22:32:01 CET] <Palkesonoh> kepstin
[22:32:40 CET] <kepstin> ... do you have a question?
[22:35:02 CET] <plumbe0> thanks everybody, i got it working
[23:01:27 CET] <saltarob> I got following error while compiling ffmpeg-4.2.2 on macOS 10.14.6 with the Haivision-SRT 1.4.1 package:ERROR: srt >= 1.3.0 not found using pkg-configFirst I tried it with the srt package from Homebrew and then I compiled it from source. But both times I got the same error. I compiled the same ffmpeg 4.2.2 package on Ubuntu with SRT 1.4.1 without
[23:01:28 CET] <saltarob> problems.From the ffbuild/config.log:require_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket check_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket test_pkg_config libsrt srt >= 1.3.0 srt/srt.h srt_socket false --exists --print-errors srt >= 1.3.0 ERROR: srt >= 1.3.0 not found using pkg-configWhy is it asking for such an old libsrt version?
[23:01:28 CET] <saltarob> From where does it get this requirement?Thank you.
[23:10:23 CET] <void09> i found a video where if i select 2 consecutive scenes with -ss -to, I get a duplicated frame (tried with both ss/to before and after -i). anyone here with some knowledge who can take a look at what happens ?
[23:17:15 CET] <vlt> void09: Can you show the command you used?
[23:20:27 CET] <void09> vlt: let me check if it happens with local file too.. i used it over http
[23:20:31 CET] <void09> i mean http input
[23:24:03 CET] <void09> ./ffmpeg -ss 00:02:16.845 -to 00:02:23.643 -i file.mkv -crf 0 1.mkv
[23:25:15 CET] <void09> sorry that's:
[23:25:41 CET] <void09> ./ffmpeg -ss 00:01:59.619 -to 00:02:16.845 -i file.mkv -crf 0 1.mkv
[23:26:11 CET] <void09> ./ffmpeg -ss 00:02:16.845 -to 00:02:23.643 -i file.mkv -crf 0 2.mkv
[23:26:30 CET] <void09> vlt: last frame of 1.mkv is the first frame of 2.mkv
[23:26:37 CET] <void09> i checked the source and there is no duplicate frame there
[23:27:39 CET] <vlt> void09: You tell it to do exactly that.
[23:27:52 CET] <void09> vlt: nope, that's not how it works
[23:28:11 CET] Action: vlt doublechecks
[23:28:14 CET] <void09> not sure exactly how it works, but i think the end timestamp is exclusive, not inclusive
[23:28:25 CET] <void09> [ss to)
[23:29:02 CET] <void09> because I am using exactly the same pattern to select scenes from the input video (generated with pyscenedtect), and this happens in only 2 plaes i found so far
[23:29:05 CET] <void09> places*
[23:30:39 CET] <void09> could be because of some rounding errors i think. the input video is 23.976 fps
[23:31:44 CET] <void09> sometimes the frame length is rounded to 41ms sometimes to 42ms (as it appears in mpv)
[23:33:25 CET] <void09> for 25 fps video a frame is always 40ms, no rounding errors
[00:00:00 CET] --- Sat Jan 11 2020
More information about the Ffmpeg-devel-irc
mailing list