[Ffmpeg-devel-irc] ffmpeg.log.20190913
burek
burek at teamnet.rs
Sat Sep 14 03:05:07 EEST 2019
[00:00:17 CEST] <KodiakIT[m]> kepstin: I'm fine with using ffmpeg, I was just using handbrake to get it off the dvdbackup dumps
[00:04:12 CEST] <KodiakIT[m]> And used CQ0 to make sure they were as close to the originals as I could get so I could then transcode those when I got around to it/if I needed to free up disk space
[00:04:32 CEST] <kepstin> KodiakIT[m]: if you're doing multipass - and you should always do multipass with libvpx vp8/vp9 to work around the encoder not being greate - theyn consider using -speed 4 for the first pass
[00:05:05 CEST] <kepstin> KodiakIT[m]: note that the cq scale doesn't match between vp8 and vp9, but either way cq 0 is probably a waste of space. You might as well just copy the original video without re-encoding :/
[00:05:37 CEST] Action: KodiakIT[m] shrugs
[00:06:10 CEST] <KodiakIT[m]> A ~2GB VP8 encoded mkv is an improvement on an ~8GB disc image
[00:07:21 CEST] <kepstin> KodiakIT[m]: anyways, x264 encoder is faster and easier to configure and better quality than vp8 (probably close to vp9 in this sort of circumstance), so I recommend it for this type of use case normally
[00:07:30 CEST] <kepstin> KodiakIT[m]: unless you really want to avoid h264 for some reason
[00:10:51 CEST] <KodiakIT[m]> kepstin: I'll keep that in mind, I guess I just kinda felt like it was the FLOSSier option of the two and ran with it for that (that and I'd thought they were both designed to be more efficient than 264 anyway)
[00:11:17 CEST] <kepstin> vp9 in theory can compress more efficiently than h264
[00:11:30 CEST] <kepstin> x264 in practise is a better encoder than libvpx
[00:11:32 CEST] <cehoyos> VP8 cannot be more efficient than x264
[00:11:33 CEST] <kepstin> so ... :/
[00:12:40 CEST] <kepstin> KodiakIT[m]: anyways, x264 for this purpose will get you a result almost as good as what libvpx-vp9 can do, but will be much faster at doing so.
[00:13:12 CEST] <kepstin> (a lot of vp9's enhancements focus on higher resolution video, so it doesn't help as much on SD stuff like DVD sources)
[00:14:21 CEST] <KodiakIT[m]> kepstin: Good points
[00:39:54 CEST] <DHE> yeah, as a codec vp8 is kinda in the same "weight class" (whatever you want to call it) as h264 but x264 is just such a good encoder...
[00:46:23 CEST] <BtbN> And libvpx is a particularily BAD one
[02:29:19 CEST] <analogical_> I need an ffmpeg ninja who can extract the debate video stream from https://abcnews.go.com/
[03:21:08 CEST] <klaxa> analogical: if you open it in a browser and use the web-console, you can find something with the type: vnd.apple.mpegurl, that's hls afaik and can be fed to ffmpeg or mpv
[03:22:08 CEST] <analogical> klaxa, web-console?
[03:22:45 CEST] <klaxa> in firefox ctrl+shift+i
[03:22:55 CEST] <klaxa> in chrome i think the same?
[03:23:05 CEST] <klaxa> or maybe f12
[03:28:27 CEST] <klaxa> of course i meant the web-developer tools
[03:28:38 CEST] <klaxa> i'm really tired right now, sorry
[03:33:21 CEST] <furq> it's f12 in firefox
[03:33:28 CEST] <furq> search for m3u8 in the network panel
[03:33:51 CEST] <furq> also it probably won't work because anyone halfway competent will prevent you from watching it without the right cookies or something
[03:34:28 CEST] <furq> youtube-dl doesn't support it and it's a usa broadcast network so i assume there's no simple way around it
[03:35:00 CEST] <furq> just vote for bernie, it'll be fine
[03:40:58 CEST] <klaxa> well it worked for me just right-click copy-url and paste the really long url to mpv
[03:41:20 CEST] <klaxa> and from my home connection as well from europe
[03:43:26 CEST] <furq> i would have tried it but then i'd have had to actually watch it
[03:43:43 CEST] <klaxa> i also accidentally watched for a few minutes
[03:43:52 CEST] <klaxa> but now i will go to bed, good night
[05:21:34 CEST] <intrac> could someone suggest the best way to take the audio from a source file, then split into two copies in a complex_filter chain
[05:21:50 CEST] <furq> https://ffmpeg.org/ffmpeg-filters.html#split_002c-asplit
[05:21:52 CEST] <intrac> apply audio filter(s) to one copy and pass through the other.
[05:22:01 CEST] <intrac> https://i.imgur.com/TVbAVBU.png
[05:22:34 CEST] <intrac> a moment, checking
[05:22:58 CEST] <furq> -lavfi "[0:a]split=2[out1][tmp];[tmp]...[out2]" -map "[out1]" -map "[out2]"
[05:23:17 CEST] <furq> asplit=2 rather
[05:24:56 CEST] <intrac> furq: thanks. will give that a go. I was overthinking it
[05:38:37 CEST] <intrac> furq: thanks, that got it!
[08:07:57 CEST] <bneff> I'm trying to open an RTSP stream with avformat_open_input and passing an options dictionary with "allowed_media_types" set to "video". However, I'm still receiving the audio stream. Any suggestions? I'm using ffmpeg 4.2.
[08:48:22 CEST] <voldial> can I get ffmpeg to exit on the first error? I dont want to parse the entire file, I just want to know if there's any errors, so I am doing this: http://dpaste.com/3NN64VB but ffmpeg spawns more than one process, so there's still more children of $! to kill: http://dpaste.com/3P9T67P
[11:30:23 CEST] <solrize> is there a decent way to extract closed captions from an mp4, where there doesn't seem to be an srt stream? the stuff i've been able to find assumes srt format
[11:31:03 CEST] <Radiator> Hi all, I was browsing avutil and the pixfmt.h file to be precise. I haven't found any function or tools that can give the specification of a format. Do you know if there such a thing ? Like from a AVPixelFormat get a bpp and linesize or so ?
[11:32:24 CEST] <BtbN> You haven't searched very well then, there is a whole massive structure with that data.
[11:32:51 CEST] <BtbN> linesize is unrelated to the pix_fmt though, so you won't get that from the format.
[11:34:15 CEST] <Radiator> BtbN: There's comments only, I'm looking for something in the runtime like a function
[11:34:25 CEST] <BtbN> Yes, that exists.
[11:35:00 CEST] <Radiator> For real ? I must have missed it
[11:35:05 CEST] <Radiator> Which file ?
[11:35:21 CEST] <BtbN> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavutil/pixdesc.c
[11:35:56 CEST] <Radiator> Oh wow
[11:36:03 CEST] <Radiator> Thanks a lot
[11:36:19 CEST] <Radiator> I feel dumb passing by such evident information
[11:38:34 CEST] <Mavrik> ;3C
[11:43:06 CEST] <Radiator> BtbN: What do you mean by "linesize is unrelated to the pix_fmt though, so you won't get that from the format." ? I though the line size depended entirely on the format. RGB24 is bpp*width for example
[11:43:36 CEST] <BtbN> The linesize depends on hardware alignment constraints
[11:44:07 CEST] <BtbN> So like AVX-512 might need a larger align than AVX2
[11:45:29 CEST] <Radiator> Ooooh ok !
[13:57:11 CEST] <Radiator> Is it possible to scale a frame though a device ? Like it is possible for decoding ?
[13:57:19 CEST] <Radiator> *through
[14:37:28 CEST] <DHE> there is a cuda rescaler listed in the filter list...
[14:38:01 CEST] <Radiator> Thanks
[14:54:47 CEST] <nilshi> Hello, I am looking for a way to generate a video that just shows a time code or clock. minutes:seconds. Is this possible with ffmpeg?
[15:02:52 CEST] <DHE> yes, you can build a video entirely out of filters including drawtext
[15:04:45 CEST] <nilshi> Thanks, I will investigate this further
[15:35:58 CEST] <DHE> you'll probably want the color filter to generate just a blank rectangle to start with, then drawtext to put some text onto it.
[15:37:01 CEST] <DHE> you can experiment with: ffplay -f lavfi -i color=c=black,drawtext=[...] # I believe this works
[17:43:32 CEST] <bneff> I'm trying to set options when calling avformat_open_input() to only pull the RTSP video streams, and not audio. This is how I'm doing it based on looking at examples: https://pastebin.com/vPn2unvX This method isn't working and the audio stream is still being requested. Does anyone know how to accomplish this?
[17:58:30 CEST] <Radiator> Anyone knows why av_frame_copy doesn't really works ? I had a bit of a struggle and found this : https://stackoverflow.com/questions/38808946/copying-a-decoded-ffmpeg-avframe but I still have an issue to make it work. The dest buffer is empty once I free the source frame
[17:59:42 CEST] <Radiator> I'm using the dest frame on sws_scale a bit later that manipulation and sws_scale break
[18:01:54 CEST] <kepstin> Radiator: you probably shouldn't be calling av_frame_copy
[18:02:23 CEST] <kepstin> Radiator: frames buffers are reference counted, you need to make sure that if you're accessing the data in a frame, then you have a reference
[18:02:35 CEST] <Radiator> Ok
[18:02:48 CEST] <Radiator> av_frame_move_ref would do the trick then ?
[18:02:53 CEST] <kepstin> and if you're writing to a frame, then you call av_frame_make_writable and it copies it automatically only if needed
[18:03:16 CEST] <Radiator> Good to know but I'm only reading
[18:04:09 CEST] <kepstin> dunno why you'd call move_ref when unless you have something weird like a stack-allocated avframe
[18:05:44 CEST] <kepstin> normally you'd use av_frame_ref and av_frame_unref only
[18:06:04 CEST] <kepstin> somewhere that wants to keep a frame to use later for some purpose should use av_frame_ref
[18:06:36 CEST] <kepstin> and when you're done with the frame, you use av_frame_unref (or _free)
[18:15:47 CEST] <Radiator> I'm in C++ and I have a temporary frame in my class to then allow conversion and so on with it. av_frame_move_ref did worked. THe problem is that I don't want any memory leak, and to do so I must ree the frame that are decoded etc... I'm doing some hardware acceleration at the same time so I have two frames to do it. But it works now. Thanks a lot
[18:15:47 CEST] <Radiator> :)
[18:16:10 CEST] <Radiator> *i must free
[20:47:45 CEST] <Heart_And_Chops> hi guys
[20:48:27 CEST] <Heart_And_Chops> On my tiny little go pro knock off there is a setting "Lens Distortion Correction" which makes the 150 degree wide angle fish eye lens video into NOT fish eye.
[20:48:33 CEST] <Heart_And_Chops> im assuming this is done with software.
[20:48:43 CEST] <Heart_And_Chops> is it possible to do such a transformation with ffmpeg?
[20:49:35 CEST] <Heart_And_Chops> oh: http://www.stjhimy.com/posts/2016-10-27-ffmpeg-lens-correction/
[20:49:36 CEST] <Heart_And_Chops> neat
[20:49:37 CEST] <Heart_And_Chops> nevermind then
[20:56:01 CEST] <LaserEyess> using vf/filter_complex is it possible to use the output of one filter as the input to the next? the usecase I'm trying to think of is autocrop + scaling, while keeping aspect ratio, but depending on if the video is letter/pillarboxed I have no idea whether to fix the height or width on resize
[20:56:32 CEST] <LaserEyess> ideally what I'd like to do is get the crop values form cropdetect and use them to inform what my scale should be
[20:58:29 CEST] <LaserEyess> right now my idea is to parse the output of a separate ffmpeg command where I just do cropdetect and output to null, then compare that with the size of the video and adjust accordingly, but that's hard to automate and kinda prone to error if I pick a scene that's dark enough for cropdetect to have trouble
[21:20:24 CEST] <solrize> anyone know what it means when a video stream has closed captioning? the file doesn't seem to have an srt stream
[21:21:08 CEST] <DHE> there's a standard for the video stream to carry embedded auxiliary data including closed captions
[21:21:46 CEST] <DHE> many of the h264 encoders (including libx264) have an option -a53cc which will copy captions from source to destination so they are at least preserved
[21:28:03 CEST] <solrize> DHE thanks, i'm trying to find a way to extract the captions to a text file and not having any luck. any suggestions would be welcome
[21:30:46 CEST] <DHE> while ffmpeg includes some code to help do that, it's not built into ffmpeg afaik. the data comes out as AVSideData from the video stream and needs to be processed into a new subtitle stream
[21:31:30 CEST] <DHE> I know mpv is capable of doing this and will export such a closed caption stream as one of its subtitle options for playback
[21:34:20 CEST] <cehoyos> solrize: ffmpeg -f lavfi -i "movie=yourinputfile[out+subcc]" -map s out.srt
[21:49:35 CEST] <solrize> cehoyos, thanks, will try
[21:55:16 CEST] <solrize> seems to be decoding through the file and making occasional warning messages but has not written any output. maybe being buffered? it's a big file so it will be a while before decoding finishes
[21:55:54 CEST] <solrize> anyway will wait for it to finish. thanks! it's doing much more already than anything else i had tried
[22:04:19 CEST] <kepstin> LaserEyess: in order to pass the result from e.g. cropdetect to crop, you have to run the video through the filter chain twice. Which basically means decoding+filtering the whole video, throwing out the result, then going back to the start and decoding+filtering the video again.
[22:04:44 CEST] <kepstin> LaserEyess: the ffmpeg cli tool doesn't support this. It's theoretically possible if all the inputs are files, but it can't work if any of the inputs are live streams, so... :/
[22:05:08 CEST] <solrize> cehoyos, thanks, it is working!!!
[23:13:26 CEST] <LaserEyess> kepstin: that's what I figured, for now that's what I do, just run 10ish seconds of the video through cropdetect, then parse out the crop and run it again with the correct crop= and scale= and then encode
[23:13:28 CEST] <LaserEyess> it's a bit hacky but it works
[23:13:32 CEST] <LaserEyess> thank you
[00:00:00 CEST] --- Sat Sep 14 2019
More information about the Ffmpeg-devel-irc
mailing list