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

burek burek021 at gmail.com
Sat Jul 21 03:05:01 EEST 2018


[00:10:15 CEST] <mont3z> I'm using custom avio to parse a HEVC RTP stream. It seems that for very big frames av_read_frame hangs forever.
[00:11:47 CEST] <JEEB> have you tried raising the log level to something really high? although I thought RTP was some funky thing where you have to parse the actual NAL packets from the RTP "container"
[00:13:31 CEST] <mont3z> I get lots of: (ffmpeg) [sdp @ 0000015A87F757C0]  FU type 19 with 1385 bytes. But then it just hangs.
[00:14:19 CEST] <JEEB> umm
[00:14:20 CEST] <JEEB> sdp?
[00:14:21 CEST] <JEEB> :D
[00:14:39 CEST] <JEEB> I hope you're not just feeding RTP data with all hte RTP headers etc into some lavf context?
[00:14:50 CEST] <JEEB> and then hoping it will just parse yer AVC/HEVC NALs from it
[00:16:12 CEST] <mont3z> this is exactly what I'm doing. And sometimes I get a: (ffmpeg) [NULL @ 0000015A87D390C0] nal_unit_type: 0(TRAIL_N), nuh_layer_id: 0, temporal_id: 0
[00:17:32 CEST] <JEEB> yea, depacketize RTP first and at the very effing least force the correct format or otherwise you will have no idea what lavf will probe your input to be
[00:17:39 CEST] <JEEB> but preferably, just depacketize the RTP :P
[00:18:53 CEST] <mont3z> ok, thx a lot :)
[00:22:40 CEST] <Mavrik> hm, just opening an SDP should work with ffmpeg (at lesat it did for me last time I had to support that :) )
[00:22:44 CEST] <Mavrik> very brittle tho
[00:24:58 CEST] <Glyph_> Hello, I was hoping to get another pair of eyes on this ffplay error I'm having.
[00:25:03 CEST] <Glyph_> I'm trying to compare results of a script with and without using the midequalizer filter. The filtergraph goes through totally fine when midequalizer is excluded, but given an 'Open inputs in the filtergraph are unacceptable' error otherwise.
[00:25:17 CEST] <Glyph_> The midequalizer instance works fine with the same inputs as long as it is the end of the filtergraph. Here is the full command and log: https://pastebin.com/1k3txmcd
[00:25:35 CEST] <mont3z> rtpdec_hevc.c seemed to be doing the right thing but then it just hanged. I'll try to see if I can find something else I might be missing.
[00:26:18 CEST] <Glyph_> Sorry, wrong paste. Here is the correct one: https://pastebin.com/v5wjBb4Z
[00:29:44 CEST] <causasui> can I downscale the resolution of an input video and preserve aspect ratio, without knowing the incoming resolution?
[00:31:33 CEST] <Glyph_> If you set one of the dimensions with the "scale" filter to be -1 it preserves the aspect ratio. So if you wanted to force scaling to 1080 width it would be "scale=1080:-1"
[00:32:08 CEST] <causasui> Glyph_: I don't know the aspect ratio because I don't know either dimension
[00:32:19 CEST] <causasui> Glyph_: I'm hoping for something like "-2:-2" being possible or such
[00:32:41 CEST] <Glyph_> So just downscaling by a certain percentage?
[00:33:38 CEST] <causasui> Glyph_: yeah basically. I have a target range in mind but I feel like I can't just say "make this 480p" because I can't guarantee the aspect ratio of the video I might have to work with
[00:34:43 CEST] <Glyph_> Oh yeah, thats no problem. You can do "scale=iw*.5:ih*.5" to scale by half, or any other amount. 'iw' and 'ih' just reference the input width and height so you can operate them as you see fit.l
[00:39:32 CEST] <causasui> Glyph_: nice great. can I enforce a floor or a ceiling? i.e. "cut this in half, unless that makes it smaller than X, in which case X. or if it's bigger than Y, then Y."
[00:40:22 CEST] <Glyph_> Yeah, take a look at ffmpeg expression's (https://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation). There are min/max functions that will let you bound the scaling, or do whatever math you want really.
[00:41:28 CEST] <causasui> Glyph_: nice thanks, I'll read over this
[00:41:41 CEST] <Glyph_> No problem, good luck. \
[00:41:50 CEST] <furq> causasui: i guess you want something like if(gt(a,16/9),854,-2):if(gt(a,16/9),-2,480)
[00:42:23 CEST] <furq> which is basically 854:-2 if the video is 16:9 or wider and -2:480 if it's narrower
[00:50:05 CEST] <causasui> nice, thank you!
[01:01:08 CEST] <causasui> furq: wait, does that guarantee that the aspect ratio is preserved? just want to make sure
[01:01:58 CEST] <furq> yes
[01:02:45 CEST] <causasui> cool
[01:03:30 CEST] <alec500oo> Hello, I am making a simple video player. At the moment I am stuck on displaying the video frames at the right time. Are there any good explanations of PTS out there on the internet that I could follow. I have already tried the dranger tutorial and it doesn't make too much sense to me.
[01:04:17 CEST] <Mavrik> alec500oo, what is unclear about PTS to you?
[01:04:31 CEST] <Mavrik> It's tells you time at which you should display a frame on screen when playing.
[01:05:07 CEST] <DHE> pts is in units of the time_base. if time_base is 1 / 30, and pts goes 1, 2, 3, 4, then it's basically a frame counter for a 30fps video
[01:05:15 CEST] <alec500oo> It seems like there is more than one place to get the pts for each frame. There is a pts in the AVStream and another one in the AVFrame.
[01:05:30 CEST] <DHE> the stream doesn't have a pts, but it has the time_base
[01:05:35 CEST] <Mavrik> The one on decoded AVFrame is what you listen to.
[01:06:02 CEST] <DHE> different containers have different time bases, may be fixed or flexible, etc.
[01:06:29 CEST] <alec500oo> Ok, so when I am displaying a frame I need to get the pts from the frame and the timebase from the stream and not the AVCodecContext?
[01:06:55 CEST] <causasui> I'm trying to find documentation on the -crf switch. is that deprecated?
[01:07:08 CEST] <causasui> nevermind, it's in ffmpeg-all
[01:07:36 CEST] <Mavrik> alec500oo, indeed
[01:07:46 CEST] <Mavrik> you can have several streams with different timebases inside a container
[01:08:01 CEST] <DHE> causasui: the exact effects vary a bit by codec. not all codecs support it and how much a numerical change affects it varies by codec as well
[01:09:14 CEST] <DHE> alec500oo: the time_base is mainly for encoding because the encoder needs to know the timeframe for bitrate estimation (where applicable). the AVStream is the true authority when decoding
[01:10:42 CEST] <DHE> *the time_base in an AVCodecContext
[01:10:51 CEST] <DHE> the decoder doesn't care
[01:11:20 CEST] <alec500oo> Right now I have this piece of code doing my timing https://pastebin.com/bLvtTykR
[01:12:03 CEST] <alec500oo> I see now that the timebase is wrong however I am still confused about how to get the correct delay time between each frame when displaying.
[01:12:37 CEST] <Mavrik> it's the difference of PTS translated to milliseconds :)
[01:12:44 CEST] <Mavrik> or microseconds or what your timer works in
[01:12:58 CEST] <causasui> furq: sorry, I'm realizing I don't know where to pack in that string you gave me to try out, on the command line. that's an argument to what exactly? '-scale=...' isnt a think apparently
[01:12:59 CEST] <alec500oo> In windows the timer works in milliseconds
[01:13:05 CEST] <Mavrik> PTS / time_base = time in seconds
[01:13:15 CEST] <Mavrik> er
[01:13:24 CEST] <Mavrik> pts * timebase
[01:13:29 CEST] <Mavrik> since it's 1/something :)
[01:14:58 CEST] Action: DHE just updated firefox and Oh god who did this to you? I can't even open a pastebin
[01:15:09 CEST] <causasui> furq: nevermind I am reading the page on scaling
[01:18:35 CEST] <causasui> furq: Error initializing filter 'scale' with args 'if(gt(a:flags=bicubic'
[01:18:42 CEST] <furq> you need to escape the ,s
[01:18:54 CEST] <furq> or singlequote the expressions individually
[01:20:11 CEST] <causasui> furq: ok I just did this: `scale="if(gt(a,16/9),854,-2):if(gt(a,16/9),-2,480)" ; ffmpeg -i "$file" -vcodec libx264 -vf scale="$scale" -crf "$crf" "${file}.mkv"` so I guess I have to add escape characters for the commas in scale
[01:21:25 CEST] <furq> right
[01:26:08 CEST] <alec500oo> I think I've got it figured out. Thank you for the help!
[04:14:01 CEST] <greencalx> How can the frame type (Idr,I,P,B) be determined for a Fragmentation Unit?
[04:14:18 CEST] <greencalx> ..in H.265
[05:39:39 CEST] <alec500oo> I am writing a small video player and right now I am struggling with getting the video to play at the right frame rate. Does anyone have a good stratagy for playing getting frames to draw at the right time?
[10:47:18 CEST] <Bombtrack> Hey guys, probably a very silly question:
[10:47:44 CEST] <Bombtrack> what does the flag -f by itself do? I see it quite often, and even use it because it is in examples, but i cant seem to figure out what -f by itself does
[10:49:03 CEST] <Mavrik> Bombtrack: it sets the format (container) of input or output
[10:49:06 CEST] <Mavrik> and overrides autodetection
[10:49:53 CEST] <Mavrik> By default ffmpeg will figure out format out of file extension (e.g. mp4 when file ends with .mp4), but sometimes that's incorrect or not possible.
[10:50:03 CEST] <Mavrik> So you use -f to set it manually
[10:52:00 CEST] <Bombtrack> Thanks for the answer. Thats what I thought, but i see it used a lot without specifying WHICH format is used afterwards...or is that then picked from the ouput extension you specify?
[10:52:16 CEST] <Mavrik> um
[10:52:20 CEST] <Mavrik> No, that's just invalid.
[10:52:26 CEST] <Mavrik> -f needs a parameter.
[10:52:41 CEST] <Bombtrack> that makes me feel less silly :P
[10:52:55 CEST] <Bombtrack> let me give you a working example, but a confusing one (for me):
[10:53:00 CEST] <Bombtrack> ffmpeg -y -f concat -safe 0 -i video_concat_file.txt -vn -c copy temp1.aiff
[10:53:17 CEST] <Mavrik> yeah, "concat" is the parameter
[10:53:23 CEST] <Bombtrack> the -f in the beginning doesnt have a parameter, right? So its useless there?
[10:53:30 CEST] <Bombtrack> ooooh
[10:53:35 CEST] <Bombtrack> that makes sense
[10:53:44 CEST] <Mavrik> it chooses (forces) the input to be demuxed with "concat" demuxer
[10:54:01 CEST] <Mavrik> because ffmpeg won't know what to do with .txt otherwise :)
[10:54:19 CEST] <Bombtrack> that actually makes a lot of sense :P
[10:54:37 CEST] <Bombtrack> Thanks so much for the explenation
[16:25:28 CEST] <locsmif> Hi. Any tips for .mp4 stream optimisation according to: https://nadavrub.wordpress.com/2013/10/18/patching-mp4-files-to-be-compatible-for-streaming/ ?
[16:25:39 CEST] <locsmif> How do I move the index to the front, etc?
[16:31:02 CEST] <Mavrik> locsmif: -movflags +faststart
[16:31:15 CEST] <Mavrik> this should move the index to the front after muxing / encoding for MP4
[16:31:23 CEST] <locsmif> Great, thanks
[19:49:43 CEST] <mickkie> Hi All, I downloaded a webm file containing opus. How is it recommended to conver it to another container format which my media player can play? I tried .ogg, but the opus audio is converted with Liborvis and I lose bitrate.
[19:50:32 CEST] <mickkie> Can ogg be used as a container only, while retaining the opus audio?
[19:51:59 CEST] <mickkie> Ahh!  '-codec:a copy' done it.  :-)
[19:52:04 CEST] <mickkie> Bye now
[21:51:39 CEST] <^Neo> hello friends, I'm trying to see how many junk frames are at the beginning of a stream... when I ffprobe it though, it will always start on a key frame, is there a way to tell ffprobe to tell the junk frames it's parsed?
[21:53:00 CEST] <durandal_1707> what?
[21:53:59 CEST] <^Neo> like if I do ffprobe -show_entries packet=flags <input> the first frame will always have flags=K_ it looks like
[21:54:20 CEST] <^Neo> but a TS file may have non-keyframes at the beginning of the stream based on where its cut
[21:54:27 CEST] <^Neo> s/its/it's/
[21:55:34 CEST] <^Neo> or is it just that the streams I'm looking at are always cut on a keyframe?
[21:55:45 CEST] <durandal_1707> you could use -c:v copy and hope that it will mark packets properly as keyframes
[21:56:29 CEST] <durandal_1707> if you cut with ffmpeg, it will always cut at keyframe iirc
[21:57:25 CEST] <^Neo> i'm just trying to automate comparison between two videos and it looks like on some sequences there's repeated frames at the beginning (I'm presuming because they were cut on an open GOP)
[21:57:48 CEST] <^Neo> so I was using ffprobe to try to tell me when I reach an I frame
[22:00:43 CEST] <durandal_1707> use ffmpeg instead
[22:05:16 CEST] <^Neo> solid
[00:00:00 CEST] --- Sat Jul 21 2018


More information about the Ffmpeg-devel-irc mailing list