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

burek burek021 at gmail.com
Tue May 7 03:05:02 EEST 2019


[02:41:13 CEST] <DaniloPereira> what is the best encoder to reduce video size without losing quality?
[02:41:14 CEST] <DaniloPereira> HEVC, VP9 or AV1?
[02:41:53 CEST] <furq> the question is how long are you prepared to wait for it to encode
[02:42:04 CEST] <DaniloPereira> i don't care about the time
[02:42:33 CEST] <furq> probably av1 then
[02:42:40 CEST] <furq> although i suspect you'll start caring about the time if you try to use it
[02:43:10 CEST] <DaniloPereira> nah
[02:43:10 CEST] <DaniloPereira> i tested AV1
[02:43:10 CEST] <DaniloPereira> but you sure this is the best choise to reduce size?
[02:43:45 CEST] <furq> it's the best in theory
[02:43:56 CEST] <furq> i couldn't tell you how it works out in practice because i don't have a year to spend on testing it
[02:45:56 CEST] <DaniloPereira> XD well
[02:45:56 CEST] <DaniloPereira> i don't care much
[02:45:56 CEST] <DaniloPereira> i'm making a big colection of movies
[02:45:56 CEST] <DaniloPereira> to have it for like 10 or 20 years
[02:45:56 CEST] <DaniloPereira> in 10 years 4K will be a thing
[02:45:57 CEST] <DaniloPereira> so if i let a small pc encoding the movie
[02:45:57 CEST] <DaniloPereira> i don't care if it will take years to encode
[02:45:58 CEST] <DaniloPereira> i just want to save space for more movies
[02:46:11 CEST] <klaxa> benchmarks suggest the best quality for the least bits
[02:47:46 CEST] <DaniloPereira> also
[02:47:46 CEST] <DaniloPereira> why its so hard to have subtitles in ffplay?
[02:48:05 CEST] <furq> because you're not supposed to actually use ffplay
[02:48:16 CEST] <DaniloPereira> :| why not?
[02:48:19 CEST] <DaniloPereira> its so good
[02:48:24 CEST] <furq> use mpv
[02:48:36 CEST] <furq> ffplay is more of a demo/debugging tool than anything else
[02:48:58 CEST] <DaniloPereira> really?
[02:48:58 CEST] <DaniloPereira> i have been using this for a long time as media player
[02:49:19 CEST] <DaniloPereira> its small and works well
[02:51:28 CEST] <DaniloPereira> oh nooo dude
[02:51:39 CEST] <DaniloPereira> did you see how many libs mpv needs?
[02:56:26 CEST] <DHE> needs? you can omit many of them...
[02:56:43 CEST] <DHE> but mpc is a true media player, with a GUI that makes sense and everything
[02:56:50 CEST] <DHE> *mpv
[02:57:02 CEST] <DaniloPereira> yeah...
[02:57:13 CEST] <DaniloPereira> its small compared to vlc
[02:57:18 CEST] <DaniloPereira> damn i hate vlc
[03:02:11 CEST] <DaniloPereira> :T i need to drop a file in mpv to play it?
[03:15:03 CEST] <DHE> on windows? I guess. you would set it up as the preferred player for a video file and double-click that file to play it normally
[06:22:47 CEST] <thender> Hi, for h264_nvenc , is  forced-idr=1 tier=1 strict_gop=1 enough to force I frames for all frames? I am trying to use it to record video that is more friendly to an NLE editing program.
[06:24:34 CEST] <thender> I noticed for libx264, the video became much more editable when I forced I frames for all frames, but am unsure how to accomplish this with hevc_nvenc, if it is possible at all.
[06:24:41 CEST] <thender> I am using open broadcaster: previously, the best codec to use for high quality video that survived being edited/transcoded that was also very easy to edit with(no lag when jumping around the file editing) was prores, but prores_aw and prores_ks have been broken in OBS since 20.0.3, so I am using hevc_nvenc as the encoder.
[06:48:36 CEST] <kepstin> thender: the general way to set ffmpeg to do intra-only encoding is to use "-g 1", should work in most if not all supported video codecs.
[06:49:00 CEST] <thender> Thank you so much kepstin.
[06:49:32 CEST] <thender> It is very hard to find a codec that is editing friendly since OBS-Studio stopped working with prores in 20.1.3.
[06:50:52 CEST] <thender> kepstin: My apologies for wasting your time with a dumb followup: is there a tool I can use to check and see what type of frames a video file has been encoded with? B frames, P frames, I frames, etc, to confirm that the codec/parameters I have chosen is outputting intra-only?
[06:51:14 CEST] <furq> ffprobe -show_frames foo.mkv | grep pict_type
[06:51:53 CEST] <thender> Thank you very much furq!
[06:54:51 CEST] <thender> Is there any way I can leave a tip for kepstin and furq for your help? Please /msg me if you have a link or a paypal account for the help. I really appreciate it.
[09:49:18 CEST] <localhorse> hi. i have the following problem: i concatenated 2 videos with `ffmpeg -f concat -i mylist.txt -c copy output` but the 2nd vid's part is black, only the audio is there, why?
[09:50:28 CEST] <localhorse> btw, i think it's related to the fact that i rotated the 2nd vid (before). when i don't rotate it before, that part is not black, but upside down
[09:51:21 CEST] <localhorse> i rotated it by setting metadata and then `ffmpeg -i input.mp4 -c:a copy output.mp4` to hardcode the rotation into it. because otherwise, ffmpeg's concatenation didn't respect the rotation metadata of the 2nd vid
[09:52:20 CEST] <localhorse> i did `ffmpeg -i vid2.mp4 -map_metadata 0 -metadata:s:v rotate="0" -codec copy vid2_f.mp4`
[09:58:48 CEST] <localhorse> concat prints a lot of these msgs: `[mp4 @ 0x5633bb671000] Non-monotonous DTS in output stream 0:0; previous: 21945021, current: 4037883; changing to 21945022. This may result in incorrect timestamps in the output file.`
[10:47:52 CEST] <superware> is there a way to detect whether input is a file or a stream by examining AVFormatContext?
[11:10:04 CEST] <justinasvd> Morning, guys.
[11:12:30 CEST] <justinasvd> I'm grepping through ffmpeg documentation and I found that ffmpeg supports various filters, etc. What I am interesting in would be frame-by-frame comparison. In particular, I want to compare one AVFrame with another AVFrame and find out their structural similarity or whatnot.
[11:12:41 CEST] <justinasvd> Is this implemented somewhere?
[11:15:47 CEST] <durandal_1707> justinasvd: what exactly you mean by comparison?
[11:16:13 CEST] <durandal_1707> there are millions of why how you can compare two frames
[11:16:37 CEST] <durandal_1707> libvmaf, ssim, psnr, etc
[11:20:12 CEST] <justinasvd> durandal_1707: I know what. I just don't want to reinvent the proverbial wheel and to implement ssim, pnsr and whatnot by myself. I suspect that ffmpeg has already implemented all this stuff, I am just having trouble finding where.
[11:20:18 CEST] <justinasvd> s/what/that/
[11:21:44 CEST] <durandal_1707> http://ffmpeg.org/ffmpeg-filters.html ?
[11:23:30 CEST] <justinasvd> I am looking at that page as-we-speak. But I want the API. I am operating on AVFrame level.
[11:24:32 CEST] <durandal_1707> you need to build filtergraphs
[11:24:46 CEST] <justinasvd> Using libav?
[11:25:05 CEST] <durandal_1707> ffmpeg
[11:25:13 CEST] <durandal_1707> libavfilter library
[11:26:11 CEST] <justinasvd> Thank you. Going there to read the docs.
[11:28:55 CEST] <termos> When I overlay an image in ffmpeg using the `overlay` filter with `premultiply` it increases the luminance in the entire video causing light areas to over-expose and just turn white. Is this a known problem?
[11:30:25 CEST] <durandal_1707> termos: then your alpha is not premultiplied
[11:33:07 CEST] <termos> okey, the way we arrived at premultiply is just that "it made it look correct". Without it the overlays look too transparent which does not fit our benchmark. Could there be something else that's wrong?
[11:35:44 CEST] <durandal_1707> termos: first make sure is your alpha premultiplied
[11:35:55 CEST] <durandal_1707> does your main and overlay have both alpha?
[11:39:10 CEST] <justinasvd> durandal_1707: Found it. I needed something like this: https://ffmpeg.org/doxygen/3.0/ssim_8h.html
[11:40:34 CEST] <termos> durandal_1707: hmm good question, the alpha frame is coming out of chromium embedded framework so I need to look into what it outputs. I think it's not premultiplied, but not sure. The main does not have an alpha channel, it's yuv420p
[11:42:02 CEST] <durandal_1707> termos: than i'm 100% it is not premultiplied
[11:47:18 CEST] <termos> so then the output of CEF is correct and we should blend it straight with no premultiplied? We don't know how the benchmark is created, but we need to ask them how they are blending it
[11:49:37 CEST] <durandal_1707> termos: ask how they blend alpha
[13:13:07 CEST] <useretail> hi, is it possible to output from ffmpeg to fifo (named pipe)? i'm trying to use my webcam as a source
[13:14:53 CEST] <durandal_1707> it should be possible
[13:16:13 CEST] <useretail> this is what i'm trying to use: ffmpeg -y -f v4l2 -framerate 25 -video_size 320x180 -i /dev/video0 -map 0:v -f yuv4mpegpipe -vcodec rawvideo /tmp/mypipe
[13:16:24 CEST] <useretail> ERROR: Codec not supported.
[13:16:25 CEST] <useretail> Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing inputStream mapping:
[13:16:25 CEST] <useretail>   Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
[13:16:25 CEST] <useretail>     Last message repeated 1 times
[13:19:12 CEST] <useretail> any ideas?
[13:20:50 CEST] <durandal_1707> useretail: what pixel format is that?
[13:21:29 CEST] <useretail> huh?
[13:22:03 CEST] <durandal_1707> pixel format of video
[13:23:01 CEST] <useretail> no idea. probably square
[13:23:15 CEST] <useretail> how to check?
[13:24:03 CEST] <durandal_1707> square is not pixel format, its probably rgb which is not supported by yuv4mpegpipe
[13:24:24 CEST] <useretail> ok, so what to use instead?
[13:25:07 CEST] <durandal_1707> add -pix_fmt yuv444p or yuv420p before ' -vcodec'
[13:26:39 CEST] <useretail> same
[13:26:45 CEST] <useretail> *same error
[13:27:23 CEST] <durandal_1707> pastebin full ffmpeg command and its output
[13:28:37 CEST] <durandal_1707> useretail: actually use -vcodec wrapped_avframe
[13:28:56 CEST] <useretail> sometimes it works, i see it cause webcam led lights up
[13:30:13 CEST] <useretail> here is the output when it worked: https://pastebin.com/vkimwXgc
[13:32:03 CEST] <useretail> but when i try to access a file when it works, ffmpeg crashes into that error
[13:32:50 CEST] <durandal_1707> useretail: actually use -vcodec wrapped_avframe
[13:36:15 CEST] <useretail> durandal_1707, yes, it worked. but when i try to access the pipe, ffmpeg stops
[13:37:01 CEST] <durandal_1707> useretail: please pastebin output of command with wrapped_avframe as codec
[13:39:02 CEST] <useretail> https://pastebin.com/dexnsb9q
[13:40:23 CEST] <durandal_1707> useretail: and output when you try to use it from other side?
[13:40:58 CEST] <useretail> there is no output. i'm trying to add the file to vlc playlist
[13:41:42 CEST] <useretail> it probably tries to read some tags, or information, but of course, they are missing
[13:43:26 CEST] <durandal_1707> useretail: that can not work, once you open it it will be empty next time you open it
[13:44:00 CEST] <useretail> just tried to cat while running ffmpeg, it showed the stream, so it works
[13:44:17 CEST] <useretail> but how can i use it like this?
[13:44:43 CEST] <useretail> i mean i want to access camera any time i read that file
[13:45:10 CEST] <durandal_1707> you can not use it at all, vlc will open it once you add it to playlist - parse it and file is gone after that
[13:46:04 CEST] <useretail> ok, but is there a way to achieve what i want?
[13:46:28 CEST] <durandal_1707> cant vlc access it directly without using ffmpeg in any way?
[13:46:55 CEST] <useretail> i don't think vlc can read directly from /dev/video0
[13:47:17 CEST] <durandal_1707> it should be able to, if not, complain to them
[13:48:38 CEST] <useretail> ok, thanks for help
[13:59:16 CEST] <sgo11> hi, how to scale a video without loosing quality? I tried many commands and googled for a long time. None of the options can keep the quality. For example, ffmpeg -i MyMovie.mp4 -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy MyMovie_720p.mp4
[14:05:01 CEST] <sgo11> I even tried -crf 1, but the quality is still not good
[14:06:57 CEST] <durandal_1707> i you want quality, try zscale filter instead
[14:07:47 CEST] <sgo11> durandal_1707: thanks a lot for the reply. I will google how to use zscale.
[14:19:16 CEST] <sgo11> ok, I am on MacOS and tried zscale, it says no such filter. I checked brew info, I am using the latest ffmpeg.
[14:24:27 CEST] <durandal_1707> sgo11: because you havent read docs at all, and you havent build with correct library
[14:25:01 CEST] <durandal_1707> http://ffmpeg.org/ffmpeg-filters.html#zscale
[14:25:40 CEST] <sgo11> durandal_1707: I am not building it. just install it via brew. not sure how to include zscale with brew install. I am googling now.
[14:44:19 CEST] <DaniloPereira> hello
[14:44:19 CEST] <DaniloPereira> i tested to record my screen with this comand
[14:44:19 CEST] <DaniloPereira> ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1080 -i :0 -vf 'hwupload,scale_vaapi=format=nv12' -c:v h264_vaapi -qp 24 output.mp4
[14:44:19 CEST] <DaniloPereira> i run a game but the video is very dark
[14:44:19 CEST] <DaniloPereira> :T
[15:01:46 CEST] <DaniloPereira> fixed :)
[15:02:00 CEST] <DaniloPereira> but the video compression is horrible
[15:06:13 CEST] <BtbN> Set a higher quality then
[15:07:03 CEST] <DHE> .. is there no hardware image capture function available for screen grabbing?
[15:07:19 CEST] <BtbN> There's kmsgrab, but it's quite limited
[15:08:12 CEST] <DaniloPereira> aye
[15:08:16 CEST] <DaniloPereira> i will try this
[16:22:14 CEST] <devinheitmueller> Im in the process of writing a new video avfilter which modifies an existing frame, and Im seeing lots of different ways that different filters do this:  av_filter_clone(), specifying needs_writable in the AVFilterLink, calling ff_get_video_buffer() and then av_frame_copy().  What is the current best practice?
[16:23:31 CEST] <devinheitmueller> It seems like using needs_writable is probably the cleanest, since it results in the filter not having to taken any action to copy the frame, check if its writable, or av_frame_free() the input.
[16:23:54 CEST] <jkqxz> If by "modifies" you mean "writes to only some pixels of the frame" then I think needs_writable is the right way to go.
[16:23:58 CEST] <DHE> frames can be reference counted and held by multiple... things. while that happens the frame is considered read-only, so you should copy it to a new frame
[16:24:12 CEST] <DHE> or use this function to do essentially the same thing for you
[16:24:54 CEST] <devinheitmueller> Yeah, seems like there are various implementations all doing essentially the same thing, which I assume is a byproduct of the APIs having evolved over the years but the existing filters not being updated.
[16:25:20 CEST] <devinheitmueller> jkqxz: Yeah, Im doing an operation such as burning some content into an existing video frame (e.g. an overlay).
[16:25:25 CEST] <JEEB> durandal_1707 is the guy mostly poking at avfilter
[16:26:02 CEST] <devinheitmueller> Seems like Ive got three or four approaches, all of which will work.  But I wasnt sure if there is current best practice for new filters being created (i.e. use this API convention).
[17:09:55 CEST] <durandal_1707> devinheitmueller: it depends what and how much filter changes...
[17:10:20 CEST] <devinheitmueller> In my case, Im changing less than 5% of the actual pixels.
[17:11:20 CEST] <durandal_1707> than you not copy/clone/allocate or something else, just make frame writable
[17:11:30 CEST] <devinheitmueller> That said, Im looking closer at the code and starting to wonder how all these options are impacted by filters which never actually change the pixels but do things like add frame metadata.  In those cases cloning the frame content is very wasteful.
[17:12:18 CEST] <durandal_1707> do you have specific filter in mind?
[17:12:36 CEST] <devinheitmueller> For example, vf_psnr.
[17:13:41 CEST] <devinheitmueller> psnr calculates the PSNR on the incoming frame and puts it into the frames dictionary.  Thats something that wouldnt modify any of the actual pixel data but you would still have to make the frame writable (i.e. memcpy all the pixels).
[17:14:22 CEST] <durandal_1707> that filter does not memcpy pixels, it just takes frame from first input and pass it to others in filtergraph
[17:14:46 CEST] <devinheitmueller> Right, but wouldnt the frame have to be writable in order to change its metadata?
[17:15:08 CEST] <devinheitmueller> or does the writable for a frame only apply to the underlying pixels and not other aspects of the AVFrame struct?
[17:15:51 CEST] <devinheitmueller> If that were the case then that would be fine.  The language is just ambiguous.
[17:16:18 CEST] <durandal_1707> only buffer stuff in refcounted -> meaning only data[X]
[17:16:23 CEST] <devinheitmueller> Ok.
[18:18:03 CEST] <meltingwax> i'm evaluating libx264 for compressing some video-like scientific data (not camera imagery, not visible light; they're particle measurements), and I'm noticing that I'm getting an every-other-pixel periodic variation in the image statistics. is there anything in the codec that can easily explain this?
[18:19:12 CEST] <DHE> yuv420 compression ?
[18:19:39 CEST] <pink_mist> that would be my first guess too
[18:20:07 CEST] <DHE> adjacent pixels share some colour information
[18:20:35 CEST] <DHE> you really want yuv444 compression, but be aware that some players - notably hardware decoders like TVs, and quicktime - can't play it
[18:54:55 CEST] <meltingwax> yes, am using yuv420. thank you pink_mist and DHE, i will give yuv444 a shot
[19:26:06 CEST] <sternj> Hi all, I'm using a Ruby application to listen to a RTP connection and send it onto an instance of ffmpeg. However, ffmpeg keeps throwing "cur_dts is invalid (this is harmless if it occurs once at the start per stream)". I can't find anything useful on the forums, anyone have any idea what's going on?
[19:31:10 CEST] <JEEB> sternj: timestamps are not getting set
[19:32:15 CEST] <sternj> JEEB: so do I have to reset those on the fly in my echo server?
[19:33:45 CEST] <JEEB> I'm not sure what you're doing but clearly something's not setting timestamps right. whether that's your input or you doing something I cannot comment on
[19:33:57 CEST] <JEEB> you're utilizing ffmpeg.c it seems since that message is in ffmpeg.c
[19:37:51 CEST] <sternj> would non-unique timestamps be an issue?
[21:02:30 CEST] <ncouloute> How do I get ffmpeg keep the negative starting time stamps of my original file. I tried -copyts and -avoid_negative_ts disabled. Still starts at 0. =/
[21:05:19 CEST] <JEEB> ncouloute: since you most likely are utilizing ffmpeg.c,  -debug_ts 1 should let ffmpeg.c print the timestamps at various points. -copyts and -vsync passthrough should be enough to keep the timestamps through ffmpeg.c, and then if something happens it happens in the muxer
[21:05:36 CEST] <JEEB> you should be able to grasp how things go and if ffmpeg.c even ever gets those original timestamps that way
[21:06:12 CEST] <JEEB> and if it does change them still, you should be able to see where (most likely the muxer if anywhere)
[21:10:31 CEST] <ncouloute> I am not using ffmpeg.c. Just using command line, but I probably should be using the api at this point. keep running into limitations with the command line functionality. Although the api appears very intimitdating.
[21:11:48 CEST] <JEEB> ffmpeg.c is the command line app
[21:12:12 CEST] <JEEB> the basics of the API isn't too bad. there are various examples under doc/examples
[21:14:12 CEST] <ncouloute> ah i see
[21:18:36 CEST] <DHE> the fundamental API isn't that bad actually. ffmpeg.c is intimidating due to all the features it supports and handling of broken kinds of inputs, etc.
[21:19:18 CEST] <Hello71> the api is fine, it's just terribly documented
[21:20:40 CEST] <JEEB> I am going to be a bit facetious here, but this documentation is so bad I would never https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[21:26:46 CEST] <DHE> I thought the documentation was sufficient, especially combined with the examples. I had virtually no problems on the ffmpeg side of things in my application.
[21:28:43 CEST] <JEEB> it mostly gets weird when you want something that the API doesn't support as a general use case (or supported before semi-accidentally)
[21:29:02 CEST] <JEEB> thus leading through a narrow and scary road of looking into all the random structures you're getting etc :P
[21:34:28 CEST] <DHE> my biggest concern was that my source - over-the-air TV - was too unreliable/unstable and ffmpeg.c doesn't really handle that
[21:35:10 CEST] <JEEB> yea
[21:35:15 CEST] <JEEB> well, it was never meant for live
[21:35:19 CEST] <JEEB> inputs coming and going
[21:35:23 CEST] <JEEB> non-static stream selection
[21:35:24 CEST] <JEEB> etc
[22:08:23 CEST] <ncouloute> I think for me C++ is overwhelming enough and also not having a video background doesn't help. Although it is on my todo list to learn how to use the api directly. So looking at this data dump. It looks like the encoder line is wrong. filter, decode, demuxer and demuxer+ffmpeg is okay. Encoder is starting at 0.
[22:50:23 CEST] <SixEcho> anyone can help with resolving this error?  doing 2 video overlays over a black color background; [0]+[1] is yuvj420p& i've tried specifying format=yuv420p on the overlay commands, but no effect.
[22:50:24 CEST] <SixEcho> [h264_videotoolbox @ 0x7fe031810000] Color range not set for yuv420p. Using MPEG range.
[22:51:09 CEST] <SixEcho> https://pastebin.com/vastxYRZ
[22:54:10 CEST] <kepstin> SixEcho: can you paste the complete output of the ffmpeg command?
[22:55:02 CEST] <kepstin> is there an actual error (something that prevents the command from running) or just a warning message?
[22:55:24 CEST] <SixEcho> kepstin: https://pastebin.com/5LMHpS3K
[22:56:25 CEST] <SixEcho> kepstin: it produces video fine& but the blacks are not as dark as they should be. i've read the darker blacks are rounded up to 16 for the MPEG colorspace.
[23:04:20 CEST] <cehoyos> Why on earth did you remove the command line now??
[23:06:01 CEST] <SixEcho> ?
[23:06:07 CEST] <cehoyos> If you want your output video to be "yuvj420p" (note the "j") as the input video - which is quite unusual and at least some players will show bad colours - you have to tell FFmpeg, if you don't tell it, it will assume "yuv420p" which has lowest value 16.
[23:06:44 CEST] <cehoyos> (Don't you agree that it is much more difficult for us to switch between two posts from you and it probably wasn't easier for you either not to post the command line together with the console output)
[23:07:49 CEST] <cehoyos> Try to add "-pix_fmt yuvj420p"
[23:08:29 CEST] <SixEcho> cehoyos: sorry; will combine next time& now i get this:
[23:08:29 CEST] <SixEcho> Incompatible pixel format 'yuvj420p' for codec 'h264_videotoolbox', auto-selecting format 'nv12'
[23:08:45 CEST] <DaniloPereira> any codec better than h264 from before 2011?
[23:08:51 CEST] <cehoyos> Yes, sorry, this only works with libx264
[23:09:02 CEST] <cehoyos> (Or at least, I don't know how to make it work with videotoolbox)
[23:09:25 CEST] <cehoyos> As said, it is usual to have yuvj420p instead of yuv420p, what is your usecase?
[23:09:26 CEST] <SixEcho> the hardware encoding with videotoolbox is 5x+ faster&
[23:09:29 CEST] <cehoyos> Define "better"
[23:09:44 CEST] <cehoyos> No, the usecase for using "j"
[23:10:02 CEST] <cehoyos> as said, it is UNusual...
[23:10:16 CEST] <SixEcho> cehoyos: i honestly don't care which per-se& however the resultant blacks are more grey when using videotoolbox
[23:10:37 CEST] <SixEcho> ^ i would like to preserve the black/shadow quality
[23:11:46 CEST] <cehoyos> I wonder now if "color" is really black if you mix yuv420p and yuvj420p, sorry I don't remember, it's late here
[23:12:04 CEST] <DaniloPereira> :'V any codec better than h264 from before 2011?
[23:12:29 CEST] <cehoyos> DaniloPereira: Many (!) very old codecs are "better" than x264 for some usecases that are likely not your usecase, for most usecases there is no better codec in 2019...
[23:12:49 CEST] <DaniloPereira> i mean
[23:13:29 CEST] <cehoyos> qtrle comes to mind
[23:14:23 CEST] <DaniloPereira> my friend is watching movies in his xbox 360 using ffplay
[23:14:23 CEST] <DaniloPereira> i need to convert the movies to him because his DVD broke
[23:14:23 CEST] <DaniloPereira> i'm using h264 but i want to know if there is any codec that can reduce more of the final size without losing quality
[23:15:07 CEST] <cehoyos> There are two or three but none of them will work on the xbox (and all are hugely time-consuming at encoding)
[23:15:23 CEST] <cehoyos> Compared to x264
[23:15:27 CEST] <DaniloPereira> :'V just tell me please
[23:15:27 CEST] <DaniloPereira> if you know
[23:15:31 CEST] <cehoyos> (I am sure some broken h264 encoders also exist)
[23:15:56 CEST] <DaniloPereira> i just want to test
[23:16:42 CEST] <cehoyos> If you don't trust others, feel free to test av1, vp9 and x265
[23:17:30 CEST] <DaniloPereira> i said from before 2011
[23:19:54 CEST] <cehoyos> And I said, x264 is the best codec in 2019, how do you suppose an eight year old codec should be able to beat it?
[23:20:03 CEST] <cehoyos> (Depending on what "best" is)
[23:20:17 CEST] <cehoyos> The decoding quality of mentioned codecs can be better at least in some cases.
[23:20:28 CEST] <cehoyos> (But at a huge performance cost)
[23:20:54 CEST] <DaniloPereira> but HEVC, AV1 and VP9 didn't existed before 2011
[23:23:49 CEST] <kepstin> DaniloPereira: h264 (and the x264 encoder specifically) is better than all the codecs that came before it for general use.
[23:24:02 CEST] <cehoyos> And I tell, that at least for some usecases, x264 beats hevc, avc1 and vp9 today: So, no there is no better codec years ago
[23:26:06 CEST] <ncouloute> So I took the easy way out and seeked to 0 seconds. That way I dont need to deal with the negative pts frames.
[23:27:48 CEST] <DaniloPereira> ok so
[23:27:53 CEST] <DaniloPereira> thanks :)
[23:30:13 CEST] <SixEcho> cehoyos: i setup the same pip videos in davinci resolve and exported; it produced an mp4 with yuv420p(tv, bt709) and appears to preserve the darker blacks&   i'm probably just missing some small piece in my ffmpeg filter somewhere
[23:31:49 CEST] <JEEB> you really don't want full range YCbCr for the output. you want to check what's making your thing full range and at which point it gets introduced, and then either make it not happen, or convert to limited range before feeding to any encoder :P
[23:32:16 CEST] <DaniloPereira> :O another question
[23:32:16 CEST] <DaniloPereira> what is the best codec to reduce the size of music without loosing quality?
[23:32:22 CEST] <JEEB> not sure if scale filter with swscale can do it, but that would probably be the first thing to try
[23:32:41 CEST] <JEEB> if swscale doesn't do it then zscale would probably be my second pick
[23:32:51 CEST] <DaniloPereira> not lossless
[23:32:52 CEST] <DaniloPereira> i mean whouth any noticeable quality loss
[23:32:56 CEST] <JEEB> (which utilizes the 3rd party zimg library)
[23:33:10 CEST] <kepstin> DaniloPereira: without losing quality? flac. With minimal quality loss? opus
[23:33:27 CEST] <DaniloPereira> ok
[23:33:50 CEST] <kepstin> supported by an xbox 360? probably aac.
[23:33:56 CEST] <DaniloPereira> nono
[23:33:59 CEST] <DaniloPereira> just for me
[23:34:14 CEST] <DaniloPereira> :) for my friends i'm just converting the movies
[23:34:47 CEST] <DaniloPereira> also some days ago i learned to use the comand "for"
[23:34:47 CEST] <DaniloPereira> so now i can convert many files very fast
[23:36:54 CEST] <DaniloPereira> example
[23:36:54 CEST] <DaniloPereira> for i in *.mp3; ffmpeg -i $i $i.ogg
[23:37:03 CEST] <kepstin> well, don't actually do that
[23:37:22 CEST] <kepstin> converting from one lossy format to a different lossy format is just lossy²
[23:37:42 CEST] <kepstin> if you have audio already in a lossy codec like mp3, the best you can do is just leave it as-is.
[23:37:58 CEST] <DaniloPereira> XD it was just an example dude
[23:38:07 CEST] <cehoyos> SixEcho: I am not saying you are wrong (and not that there definitely no bug with yuvj420p), I just cannot repeat all tests now, sorry!
[23:38:31 CEST] <DaniloPereira> i have many acc and flac music in like 70 mb each
[23:38:44 CEST] <DaniloPereira> i want to reduce
[23:38:52 CEST] <kepstin> alac and flac you mean?
[23:39:09 CEST] <pink_mist> maybe he means aac
[23:39:20 CEST] <DaniloPereira> aac*
[23:39:41 CEST] <pink_mist> which is also lossy
[23:39:44 CEST] <pink_mist> afaik
[23:39:45 CEST] <kepstin> leave aac as-is, it's already lossy
[23:40:18 CEST] <kepstin> the only thing to note about opus is that it's a very new codec, so you should confirm that all the players you care about support it before using it.
[23:40:55 CEST] <DaniloPereira> but i want to reduce the size of the files
[23:40:55 CEST] <DaniloPereira> i don't care much about the final sound quality
[23:40:55 CEST] <DaniloPereira> i don't have a high end profesional sound device
[23:40:55 CEST] <DaniloPereira> XD
[23:42:09 CEST] <kepstin> you wouldn't be able to make something much smaller than aac without reducing the quality
[23:42:24 CEST] <kepstin> (indeed, you might actually need to make it *bigger* in order to preserve the same quality)
[23:43:04 CEST] <kepstin> depends on encoding settings of the original aac, of course.
[23:44:02 CEST] <DaniloPereira> ow i have to go guys
[23:44:02 CEST] <DaniloPereira> i'll come back later to ask more noob questions
[00:00:00 CEST] --- Tue May  7 2019


More information about the Ffmpeg-devel-irc mailing list