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

burek burek at teamnet.rs
Wed Jan 8 03:05:02 EET 2020


[01:47:19 CET] <dostoyevsky> Could I use ffmpeg to detect if an mp3 is empty?  Meaning: mostly contains silence?
[01:50:10 CET] <Diag> Just saw intel bragging about svt-av1. thats a good one
[02:09:14 CET] <nicolas17> dostoyevsky: there's a silencedetect filter
[02:29:26 CET] <Mellowlink> hello
[02:30:41 CET] <Mellowlink> I'd like to ask. Normally when I encode video into another format I have to do just the 'ffmpeg -i INPUT OUPUT'
[02:30:53 CET] <Mellowlink> I am currently trying to encode videos into ascii art
[02:31:03 CET] <Mellowlink> with this command: ffmpeg -i input.webm -pix_fmt rgb24 -window_size 160x38 -f caca output.webm
[02:31:46 CET] <Mellowlink> ffmpeg starts playing the video but when it ends the output is same like input so it doesn't get converted into ascii
[02:36:06 CET] <furq> Mellowlink: caca isn't an encoder
[02:38:05 CET] <Mellowlink> furq: so are there any other ways how to convert videos into ascii and same them into file please?
[02:38:33 CET] <Mellowlink> it should be just one line of bash command right? or it's actually more difficult?
[02:38:36 CET] <furq> no good way that i know of
[02:38:51 CET] <furq> the libcaca support in ffmpeg just draws decoded frames to a caca window
[02:38:55 CET] <furq> so you'd have to capture that window separately
[02:39:07 CET] <furq> there's probably a less dumb way but you can't do it directly with ffmpeg
[02:44:30 CET] <DHE> Well what format would you use? a text file with newlines at the end of rows and ^L as the frame boundary ?
[02:45:36 CET] <Mellowlink> DHE: .webm format just with convered frames into ascii
[02:46:37 CET] <Mellowlink> probably best way would be mpv it with caca and then capture the mpv window with ffmpeg tho
[03:02:29 CET] <nicolas17> Mellowlink: for that you'd need text rendering, which would surely need an option for font to use, etc
[03:02:37 CET] <nicolas17> it could be done but ffmpeg doesn't do it yet
[03:05:46 CET] <Mellowlink> I figured it out already by capturing the caca window spawned by mpv in real time.
[03:06:33 CET] <Mellowlink> it's very time and performance consuming, not an optimal solution but at least it works
[05:58:04 CET] <ryzenda> `ffplay -filter:v:crop "crop=1920:1080:0:140" video.webm`    How do I use the crop filter to play a video file?  This command doesn't work
[06:00:20 CET] <ryzenda> Ah, I figured it out! `ffplay -vf crop=1920:1080:0:140 video.webm`
[06:37:15 CET] <grosso> can ffmpeg know the duration of a mpeg-ts file without seeking to the end?
[06:38:12 CET] <nicolas17> I think ts doesn't have such metadata
[06:38:43 CET] <nicolas17> it may be able to approximate it from bitrate in the first part of the file × file size
[06:41:20 CET] <grosso> thank you nicolas
[06:42:17 CET] <grosso> I'm wondering if mpeg-ts support any kind of metadata, and if ffmpeg do look at it to extract duration
[06:45:06 CET] <nicolas17> transport streams are designed to be streamed over digital TV and stuff
[06:45:17 CET] <nicolas17> afaik there isn't even a "file header"
[06:46:17 CET] <nicolas17> you can chop them at any 188-byte-aligned point, which would change the duration
[06:57:01 CET] <grosso> I'm pretty sure that you can put any information other than audio and video on a ts stream. The fact is, if ffmpeg actually look at something to get duration, just like it does with flv, for example, where it looks for a "on_metadata" packet, even if that packet can not exist in practice
[06:59:36 CET] <grosso> I mean, you can have a flv stream without such packet and it's a valid flv file... so you can have a ts without any kind of metadata, but you can actually put metadata on a ts, but it seems that ffmpeg don't care about it
[17:49:45 CET] <Arnob> Hi, when I convert input audio to a video output, representing the audio frequency spectrum using this command: ffmpeg -i 1.wav -filter_complex \
[17:49:47 CET] <Arnob> "[0:a]showspectrum=s=1280x720,format=yuv420p[v]" \
[17:49:49 CET] <Arnob> -map "[v]" -map 0:a output3.mp4
[17:50:30 CET] <Arnob> I obtain a video but the spectrum doesn't fill the whole video length. Am I wrong somewhere? Thank you.
[17:52:48 CET] <Arnob> To better understand I uploaded a short video of a bird recording on my peertube account: https://peertube.co.uk/videos/watch/bc1dda45-cc29-40d8-9b17-b63f8e8c0e0e
[17:58:24 CET] <relaxed> Arnob: You may need to use "-shortest" or a specific time "-t $time"
[18:09:42 CET] <kepstin> Arnob: the way the showspectrum filter works, a larger image size means more samples used in the fft, so the speed going across the video is slower. You should probably generate a smaller video size.
[18:11:53 CET] <kepstin> Arnob: in general, the video height should be a power of 2, and it corresponds to the fft size. The default is 512.
[18:15:43 CET] <lofo> What streaming protocol should i use if i intend my receiver to connect multiple times over time
[18:17:35 CET] <kepstin> one that you have a streamer server for (ffmpeg is not a multi-client streaming server) and that your client supports
[18:18:10 CET] <kepstin> you'll need to be more specific if you want any specific recommendations :)
[18:36:24 CET] <lofo> i just need to stream to a single device, on my local network
[18:45:44 CET] <kepstin> what device/software is receiving?
[18:47:04 CET] <lofo> a phone
[18:47:55 CET] <lofo> i would like to start a stream of my computer screen from my desktop. and connect to it anytime with my phone
[18:48:34 CET] <lofo> i know how to do that with tcp and the `listen` option. but whenever my phone disconnects i have to relaunch the stream from my desktop
[18:49:41 CET] <lofo> i use libVLC running on a custom app to receive the stream
[18:51:18 CET] <unixabg> Greetings, is it possible to send sighup or the like to change params of running ffmpeg process?
[18:56:36 CET] <kepstin> unixabg: certain filter can take "commands" which can be injected e.g. through the zmq filter from an external process
[18:56:38 CET] <DHE> there's some very limited support for stdin to take some commands
[18:56:39 CET] <kepstin> but otherwise, no
[18:56:49 CET] <kepstin> oh, yeah, and the stdin stuff
[18:59:40 CET] <kepstin> the underlying libraries the ffmpeg tool is built on let you make something a lot more flexible or suited to your needs, of course.
[19:10:09 CET] <Phoenix|> I'm getting the warning "Only '-vf scale=-1:720' read, ignoring remaining -vf options: Use ',' to separate filters", but I'm not using any other -vf filters
[19:12:26 CET] <durandal_1707> Phoenix|: ignore it
[19:24:33 CET] <Arnob> kepstin: well, thank you !! It's too difficult for me now, I'll have to read more the ffmpeg docs as I mainly use it to transcode video and the waveforms/spectrum generation is new to me...I managed to get sthg not too bad though, but not perfect. I just changed the video size.
[19:25:21 CET] <Arnob> relaxed: Thank you, I will read more the ffmpef docs as weveform/spectrum generation is new to me...
[19:26:07 CET] <relaxed> Arnob: you're welcome, but kepstin's advice was probably better :)
[19:32:09 CET] <Arnob> relaxed: ok, thanks for the hint, I'll follow kepstin path then :-) ...
[19:35:07 CET] <kepstin> lofo left, so i guess they didn't want to head my follow-up advice on their problem.
[20:57:42 CET] <ladders> is it possible to write a filter chain to selectively deinterlace?  for example, i have a star trek dvd where the live action is progressive but the cgi cut scenes are interlaced.
[20:59:51 CET] <kepstin> many of the interlacing filters in ffmpeg optionally support deinterlacing only frames flagged as interlaced.
[21:00:18 CET] <CoreX> i was gonna say try the bwdif filter
[21:00:20 CET] <CoreX> https://ffmpeg.org/ffmpeg-filters.html#bwdif
[21:01:32 CET] <kepstin> note that on an ntsc format dvd with mixed content, i'd recommend using the "repeatfields" filter to undo the detelecine done by the encoder, followed by a detelecine filter, and then a deinterlacing filter on any remaining interlaced frame
[21:03:15 CET] <kepstin> (probably use fieldmatch as the detelecine filter, it's the easiest to use for this type of thing)
[21:04:48 CET] <kepstin> fieldmatch docs have an example of how to use the yadif deinterlacing filter on remaining interlaced frames; it's similar for other deinterlacing filters that have a deint option including bwdif.
[21:05:57 CET] <ladders> 95% of my input files are progressive, would it be detrimental to blindly always use that process for all input or should i special case it?
[21:06:17 CET] <ladders> i am writing a backup script for my discs and have gotten it to mostly hands-free operation
[21:06:44 CET] <furq> yeah deinterlacing will negatively affect picture quality
[21:06:56 CET] <furq> also bear in mind all frames on dvds are flagged as interlaced
[21:07:03 CET] <kepstin> hmm, if you have inputs that you know are fully progressive (most recent hollywood dvds are) then you might want to skip that, it's possible the detelecine will mismatch, or it'll detect non-interlaced frames as needing deinterlacing
[21:07:12 CET] <furq> if you're not also doing an ivtc you'll want something like the idet filter to try and autodetect
[21:07:24 CET] <ladders> currently i am using idet to count frames and applying yadif if it meets some arbitrary threshold.  this is the first case of mixed progressive/interlaced input.
[21:07:38 CET] <kepstin> fieldmatch filter sets the interlaced flag based on its own combing determination during the detelecine step, fwiw
[21:08:02 CET] <kepstin> it's not perfect, but it's ok for an automated solution
[21:08:16 CET] <furq> ladders: -vf idet,yadif=deint=interlaced will only deinterlace frames idet marks as interlaced
[21:08:22 CET] <furq> autodetection is never perfect though
[21:08:39 CET] <kepstin> note that any autodetection can be tricked by progressive frames with high-frequency vertical detail
[21:08:44 CET] <furq> it's better to go through manually where possible
[21:10:04 CET] <furq> if you have film content then you can pretty safely assume it's always telecined (ntsc) or progressive (pal)
[21:10:26 CET] <furq> film meaning released in theatres, not shot on film
[21:11:14 CET] <kepstin> star trek... voyager, for example, all the live action was done on film (24fps), usually encoded on the dvd as progressive, but cg effects were different.
[21:11:18 CET] <furq> right
[21:11:43 CET] <kepstin> i'd expect the cgi there to be 30fps progressive, but i haven't actually looked at the dvds for that closely :)
[21:12:46 CET] <furq> my expert advice for that sort of content would be cross your fingers that there's a blu-ray and someone else has dealt with it for you
[21:13:06 CET] <kepstin> in the really bad cases tho, they do an interlaced upscale for the blu-ray :)
[21:13:29 CET] <kepstin> since blu-ray still doesn't support in-stream framerate switching :/
[21:13:37 CET] <kepstin> (or if it does, it's unreliable in players)
[21:13:56 CET] <ladders> i have dvds only, i am just attempting to convert to x264 mp4 that doesn't look completely terrible
[21:14:40 CET] <kepstin> ntsc dvds of tv shows are such a pain that it's often easier to see if someone else has already done the work :/
[21:25:52 CET] <ladders> ok, thank you everyone for the advice
[21:46:33 CET] <cehoyos> Note that there is also soft-telecine which is actually progressive and ignored by FFmpeg
[21:46:48 CET] <cehoyos> So you can ignore it as well, only hard-telecined needs de-telecine filters
[22:13:25 CET] <kepstin> my recommendation was to use the 'repeatfields' filter to apply the soft-telecine, so it could be re-detelecined, but then I've been burnt by badly encoded dvds where the "progressive" encoded parts had field mismatches.
[23:20:50 CET] <bray90820> So I am getting an error while trying to convert a WMA file to an mp4
[23:20:52 CET] <bray90820> https://pastebin.com/raw/R9xetjgk
[23:21:06 CET] <bray90820> Anyone know what that is?
[23:24:50 CET] <furq> bray90820: you can't mux wma into mp4
[23:24:58 CET] <furq> either use mkv or reencode the audio to aac
[23:27:20 CET] <bray90820> How would I reencode it?
[23:27:38 CET] <furq> remove -c:a copy
[23:28:03 CET] <bray90820> Thanks
[23:28:15 CET] <bray90820> I feel kinda dumb that it was that easy
[23:35:23 CET] <BtbN> uhm, that does explicitly NOT reencode it
[23:38:51 CET] <cpplearner> Guys, how can I list the predefined(=allowed) entries of FORMAT on ffprobe?
[23:40:42 CET] <pink_mist> ffprobe -formats?
[23:42:34 CET] <cpplearner> Oh, I mean for -show_formats, like -show_formats format=duration.
[23:51:06 CET] <furq> show_format lists all the entries
[23:51:22 CET] <furq> for that particular file, idk how you'd list every possible entry
[00:00:00 CET] --- Wed Jan  8 2020


More information about the Ffmpeg-devel-irc mailing list