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

burek burek021 at gmail.com
Thu Nov 22 03:05:02 EET 2018

[01:21:40 CET] <fling> Can't ffmpeg input from libarchive like mpv does?
[01:43:07 CET] <JEEB> fling: no
[01:43:13 CET] <JEEB> it has no module to use libarchive
[03:53:22 CET] <twtduck> Hey people, I'm looking to transcode all the videos on my media server. What encoding and format would you recommend, to avoid losing any quality and make it easy for my server to decode the files?
[03:53:54 CET] <twtduck> Storage is not a huge concern, but I do have a few hundred hours and only 8 terabytes of storage, so nothing excessive.
[05:06:10 CET] <twtduck> bump
[05:14:53 CET] <ariyasu> you will always loose some quality
[05:15:10 CET] <ariyasu> and depends what sort of content it is
[05:15:49 CET] <ariyasu> if it's scripted (movies) encoding them to x264 at a crf of 18 or 19 would be a good ish idea, and the audio to aac
[05:16:27 CET] <ariyasu> you could also downscale them to like 720p or lower which would reduce the file sizes considerably
[05:20:07 CET] <twtduck> Most of them are 1080p, which is already less than ideal for my 4k screens
[05:20:46 CET] <twtduck> My server struggles when decoding 2-3 at a time, which is why I'm more concerned.
[17:09:34 CET] <podman_> I'm having difficulty maintaining proper colors when extracting a jpg from a video using bt709 colorspace and the tv color range. Any thoughts on where to start?
[17:12:04 CET] <podman_> it seems to be converting it to yuvj420p(pc) which i think is what's causing the problem
[17:32:58 CET] <furq> podman_: use zscale if your build has it
[17:34:16 CET] <furq> maybe just -vf format=yuv420p will work
[17:34:46 CET] <furq> if you want to force everything then -vf zscale=rin=limited:r=limited:pin=709:tin=709:min=709,format=yuv420p
[17:36:24 CET] <podman_> furq: thanks, i'll give that a try
[17:56:57 CET] <podman_> furq: it looks like i don't have zscale, so i tired -vf scale=in_range=tv:in_color_matrix=bt709:out_range=limited:out_color_matrix=bt709,format=yuv420p. it doesn't seem to have any effect. the output always just seem to be Stream #0:0: Video: mjpeg, yuvj420p(pc)
[17:58:06 CET] <furq> try out_range=full
[17:58:26 CET] <furq> and then get rid of format=yuv420p
[18:02:01 CET] <podman_> furq: sure thing
[18:02:22 CET] <podman_> furq: no dice.
[18:05:24 CET] <durandal_1707> podman_: mjpeg encoder supports only J, aka pc range
[18:08:00 CET] <furq> limited to full range should look fine as long as the scaler is converting it properly
[18:08:00 CET] <podman_> durandal_1707: interesting. is there any way i can shift the range then to make it match?
[18:08:00 CET] <furq> that's what that last command should do
[18:08:00 CET] <furq> it should also work by default
[18:08:00 CET] <podman_> hmm, doesn't seem to be doing anything
[18:08:46 CET] <podman_> to give you an idea of what i'm talking about: https://imgur.com/a/YIUs8O3 the top image is the jpg, and the bottom is a png. the png properly matches the input video
[18:14:26 CET] <kepstin> hmm, that doesn't look like a color range issue (I'd expect it to either be dim/low contrast or have blown out highlights)
[18:14:39 CET] <podman_> kepstin: yeah, seems like a color space issue maybe?
[18:18:01 CET] <kepstin> Hmm. could be color matrix or primaries? Could be that it's mixed up between bt601/bt709
[18:18:49 CET] <kepstin> (how did you make that png?)
[18:19:50 CET] <podman_> ffmpeg -ss 1 -i in_file.mp4 -vframes 1 out_file.png
[18:22:18 CET] <ritsuka> kepstin: are you on a mac?
[18:22:26 CET] <podman_> ritsuka: i am
[18:22:47 CET] <ritsuka> when you play a video in chrome, does it have the same colors as in quicktime player?
[18:24:38 CET] <podman_> yep, the issue is specifically with converting to jpeg though
[18:24:38 CET] <kepstin> podman_: that's really weird, I'd expect that the png and jpeg both made by ffmpeg should have the same colours when viewed
[18:24:38 CET] <podman_> the interesting thing is that if i convert the original video and don't specify the color primaries and color range, the output video displays the same color shift
[18:24:45 CET] <podman_> so i have to force it to bt709 and tv color range
[18:26:27 CET] <podman_> if i don't, the output looks like the jpg instead of the png
[18:26:45 CET] <ritsuka> podman_: right, the chrome is color managed the same way as quicktime, that means that ffmpeg won't output the same image, because it uses a different transfer function
[18:26:45 CET] <podman_> ritsuka: so why would the png look right?
[18:27:56 CET] <ritsuka> good question, then chrome doesn't handle colors the same way as quicktime, and please ignore my message
[18:28:56 CET] <podman_> ultimately the output jpg looks the same everywhere, it's just different than the input mp4.
[18:46:10 CET] <podman_> with -vf scale=in_range=tv:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt=709 the colors are the same, but the output is a bit dimmer
[18:46:13 CET] <podman_> so, that's close
[19:06:51 CET] <podman_> i guess maybe something is wrong with this specific video?
[20:36:24 CET] <friendofafriend> I am compiling ffmpeg with --enable-static --disable-shared, but the resulting binary is still looking for shared object files.  Am I misunderstanding what these flags do?
[20:37:47 CET] <furq> those flags only affect the internal libs
[20:38:09 CET] <furq> if you want a fully static build then you want something like --extra-ldflags="-static"
[20:40:19 CET] <friendofafriend> Wonderful, I'll try compiling again.  It only takes about a day on my Raspberry Pi.  :P
[20:40:55 CET] <friendofafriend> Thank you for your help.
[20:41:08 CET] <furq> you can cross-compile from something less underpowered
[20:42:33 CET] <pink_mist> like a 10 year old cellphone
[20:42:48 CET] <pink_mist> (ok, that might not be the best thing to do it from :P)
[20:43:33 CET] <Harzilein> pink_mist: i think i actually do have distcc on my lil'debi chroot :)
[20:43:47 CET] <Harzilein> pink_mist: and it's >10y old
[20:44:13 CET] <pink_mist> haha, nice :P
[21:03:08 CET] <friendofafriend> That's very strange, when I add --extra-ldflags="-static", now configure complains that it cannot find mmal.
[21:03:08 CET] <furq> i don't think you can static link mmal or omx
[21:03:08 CET] <furq> they definitely don't provide static libs by default
[21:07:39 CET] <foo> Strange, getting this AttributeError: module 'ffmpeg' has no attribute 'input' - with python-ffmpeg.
[21:07:39 CET] <foo> Also this AttributeError: module 'ffmpeg' has no attribute 'Error'
[21:07:39 CET] <foo> (Python errors)
[21:21:05 CET] <safinaskar> how to remove black frames from stream?
[21:22:02 CET] <safinaskar> they are absolutely black
[21:23:54 CET] <ariyasu> crop
[21:24:16 CET] <ariyasu> -vf crop=width:height:crop_from_left:crop_from_top
[21:26:42 CET] <ariyasu> oh frames
[21:26:51 CET] <safinaskar> ariyasu: yes
[21:26:51 CET] <ariyasu> ignore me, i just woke up
[21:29:56 CET] <safinaskar> so how?? the only way i am aware of is converting into raw video and then removing the frames using hand-written c++ program
[21:30:05 CET] <safinaskar> so i probably have to do this
[22:01:14 CET] <foo> disregard my error, looks like I get this error: https://paste.ofcode.org/pvSLTmbTigdxAuYTfJnpDD - with that code there... on a 64MB mp3 file.
[22:20:10 CET] <giaco> hello
[22:23:53 CET] <giaco> I have a general question about audio file formats. I have a folder containing a dash stream, so it has a stream.mpd, a init-stream0.m4s and many chunk-stream0-<number>.m4s. I am trying to create 5 minutes segments out of it. I already have a ffmpeg concat based solution, but I wonders if it could be done even faster. If I do "cat init-stream0.m4s chunk-stream0-00001.m4s chunk-stream0-00002.m4s  ... > output.mp4" I can hear the
[22:23:53 CET] <giaco> file, but to make 5 minute segments I need to start from the middle of the list such as "cat $(ls -p chunk-stream0-0002* | sort) > output.mp4" but this second version is not playable. Do you know why I face this difference? Thank you
[22:24:43 CET] <BtbN> You forgot the init segment.
[22:25:04 CET] <giaco> BtbN: is the init segment required even when catting starting from the middle?
[22:25:13 CET] <BtbN> That's the whole point of it.
[22:25:51 CET] <giaco> BtbN: this is really a good news!
[22:26:06 CET] <giaco> But why? Which standard should I read to understand how it works?
[22:26:35 CET] <BtbN> the dash one I guess
[22:27:02 CET] <BtbN> and the mp4, mov, isobmff ones
[22:29:58 CET] <giaco> BtbN: thank you, it works
[22:30:31 CET] <giaco> oh dear, that was easy ... I feel so stupid it was obvious
[00:00:00 CET] --- Thu Nov 22 2018

More information about the Ffmpeg-devel-irc mailing list