[Ffmpeg-devel-irc] ffmpeg.log.20190905
burek
burek at teamnet.rs
Fri Sep 6 03:05:06 EEST 2019
[01:15:45 CEST] <a90c> is there any GUI tool that uses ffmpeg?
[01:16:12 CEST] <pink_mist> "GUI tool"? you mean like handbrake?
[01:16:15 CEST] <pink_mist> cause handbrake does
[01:16:34 CEST] <a90c> Yeah like handbrake
[01:16:50 CEST] <pink_mist> there you go then
[01:17:37 CEST] <a90c> Can it add subtitle?
[01:17:46 CEST] <FooNess> Yes; if you have say an SRT file, you can put it in.
[01:17:53 CEST] <FooNess> Either as default, burned in, etc.
[01:18:03 CEST] <a90c> Ok good thanks
[01:18:05 CEST] <FooNess> (With Handbrake, I mean, since you asked.)
[01:18:26 CEST] <pink_mist> I'm nearly certain handbrake has its own channel too
[01:18:31 CEST] <pink_mist> which would be a better place to discuss it
[01:18:38 CEST] <a90c> Right
[01:28:44 CEST] <bray90820> How would I update FFMPG on MacOS
[01:31:08 CEST] <FooNess> bray90820, https://trac.ffmpeg.org/wiki/CompilationGuide/macOS#Updatingffmpeg
[01:32:21 CEST] <bray90820> Thanks
[01:47:46 CEST] <markfilipak> I have the output of 'ffprobe -show_streams' & 'ffprobe -show_frames' for a DVD that both HandBrake & MPV believe is soft telecined. JEEB@#mpv told me that 'ffprobe' would be definitive but I don't see anything soft-telecine-ish. What should I look for?
[03:04:26 CEST] <kepstin> markfilipak: if in the video frames in the -show_frames output, all frames have `interlaced_frame=0` and some frames have `repeat_pict=1` then it's soft telecine.
[03:05:25 CEST] <kepstin> for a 2:3 pulldown, every second video frame will have repeat_pict=1
[03:06:25 CEST] <kepstin> (you'll also see the top_field_first= alternating between 0 and 1)
[03:07:34 CEST] <kepstin> note that it's possible for a dvd video to have mixed interlaced (or hard telecine) content and soft telecine content.
[03:08:33 CEST] <kepstin> if you have that, I normally recommend processing it using ffmpeg by using the "repeatfields" filter to turn it into cfr hard telecine, then redoing the detelecine.
[03:24:44 CEST] <markfilipak> kepstin, may doG bless you!
[03:54:00 CEST] <FishPencil> This probably gets asked a lot, but is there a way to capture from a desktop and retain the correct colors? The output colors look "washed out"
[03:54:13 CEST] <FishPencil> My guess it's something with the RGB->YUV conversion
[03:54:48 CEST] <another> it's probably due to chroma subsampling
[03:59:49 CEST] <FishPencil> Hm, is there a way to force/test gdigrab to use 4:4:4?
[04:01:50 CEST] <Henry151> hi
[04:02:54 CEST] <Henry151> i had a movie, in .mkv format; I wanted it to be able to stream easily, so i converted it to mp4 with this command: https://termbin.com/m4rt which was supposed to also burn in the subtitles to the outputted mp4... this was because i was trying to use nextcloud to play my movies so i could stream them from wherever
[04:03:00 CEST] <Henry151> then, i discovered other better apps
[04:03:32 CEST] <Henry151> and so now, I was trying to stream it from plex or from jellyfin (both of which are working really well for this in general; i can watch any of my movies or tv shows from anywhere)
[04:04:10 CEST] <Henry151> however, both plex and jellyfin seem to be trying to re-transcode it when they try to serve it, and so it's winding up being all choppy and screwy...they're each able to serve regular mkv videos just fine, transcoding on the fly
[04:04:22 CEST] <Henry151> i'm here just to get some insight about this
[04:04:52 CEST] <Henry151> i had figured that if it was in mp4, there would be no need for the player to transcode it for live streaming
[04:05:14 CEST] <Henry151> so i'm #1 confused about why plex and jellyfin both try to transcode the mp4 instead of just streaming it in current format
[04:05:29 CEST] <Henry151> and #2 confused about why this results in choppy/interrupted video
[04:06:08 CEST] <Henry151> meanwhile i'm re-downloading it in mkv and will just put it in place in original format and let the built-in transcoding plex and jellyfin do handle it themselves..
[04:07:08 CEST] <Henry151> jellyfin appears to use ffmpeg to transcode, though plex seems to have its own transcoder or be using some modified version of ffmpeg
[04:12:36 CEST] <Ultima> Plex also uses Ffmpeg unless they recently changed this.
[04:14:32 CEST] <Ultima> there are a lot of variables at play that have not been explained that can cause the issues that you are seeing, though I also am not sure what your definition of choppy/interrupted video is. My guess is waiting for the content to be downloaded from the server.
[04:16:11 CEST] <Ultima> how powerful is the system that is hosting the content?
[04:32:47 CEST] <kepstin> FishPencil: gdigrab does do non-subsampled rgb by default. you can save to an rgb codec like libx264rgb to save the colors as-is
[04:33:02 CEST] <kepstin> (although player compatibility is lower)
[04:55:21 CEST] <Henry151> hi Ultima ! thanks for the response.. the server is not super powerful, it's a dell poweredge 2900, but it is able to smoothly serve every other video i've tried so far, so i think the strength is not the issue..
[04:57:45 CEST] <Henry151> yes, by "choppy/interrupted video" i meant that it was "waiting for the content to be downloaded from the server"
[04:58:45 CEST] <Henry151> but, I think we were really waiting for the server to transcode it, not waiting for the network transfer or similar.. because, as part of the attempts to get it working, i tried streaming other things that were of equivalent "movie-quality" and they were all able to stream smoothly
[04:59:38 CEST] <Henry151> i'm thinking that perhaps my manual transcoding into mp4 was done in such a way as to create a problematic file, or, that it's something like with audio, how if you transcode from lossless to lossy, and then to lossy again, you lose quality? except for video
[05:01:13 CEST] <Ultima> Check the load on the server while you are playing the video, also verify the quality that it is set to. Also, is the content on local storage? What kind of physical media is being used to store it? an ssd or hdd? What is the load of the disks while the media is transcoding? How large is the file that is to be transcoded? Have you tried turning on debug logging and seeing the command being used to transcode the video? Try doing this manually with a
[05:01:13 CEST] <Ultima> different output and see how fast it is able to transcode.
[05:01:52 CEST] <TheRock> any1 has sony a7s cam
[05:03:11 CEST] <Henry151> without really knowing, a glance at htop while it is trying to transcode, it looks like it's really using max cpu.. file is about 4.8G... stored on spinning disks, but it's the main raid array of hot-plug drives that is hosting the rest of the videos on the server
[05:07:58 CEST] <Ultima> if the cpu is maxed, the last bit I mentioned would be the most helpful, do the transcode manually and see how fast the server is able to transcode it. It is likely not powerful enough to support it by the sound of it though.
[05:09:10 CEST] <Ultima> If some other media seems to be fine, check the encoding for each file and compare the differences. I'm not a media expert but someone here would probably know which encoding require more cpu cycles.
[05:23:59 CEST] <Henry151> https://imgur.com/vQt4WKk I'm about to upload the mkv version to the server, since all the other media that was playing fine is in .mkv format and this was the only one that I had converted to mp4 and it's the only one giving me trouble. That's what made me think maybe i screwed up my initial conversion command somehow.
[05:48:10 CEST] <TheRock> ffmpeg -i input.mp4 -vcodec libx264 -crf 24 -preset slow -filter:v hqdn3d=4.0:3.0:6.0:4.5 -acodec aac -strict experimental -ab 192k output.mp4
[05:48:18 CEST] <TheRock> i found this command online to reduce wind noise from a video
[05:48:25 CEST] <TheRock> can anyone confirm this ?
[06:07:51 CEST] <pk08> can any one help me to find solution of my problem?
[06:07:52 CEST] <pk08> i want to add a global variable which can access in libavformat/mpegts.c and libavfilter/vf_drawtext.c
[06:07:52 CEST] <pk08> so for that, i created a header file called "test.h" and defined a variable with extern int anyError; and then included test.h file in both above .c files
[06:07:52 CEST] <pk08> and i redefined that variable in mpegts.c like int anyError = 0;
[06:07:52 CEST] <pk08> now when i try to compile ffmpeg i am getting libavfilter/libavfilter.so: undefined reference to `anyError'
[06:09:48 CEST] <pk08> i tried to build static build but getting same error there too!
[07:36:42 CEST] <lain98> is it assured that every packet from av_read_frame corresponds to a single frame in the stream ? i know that this is not true for atleast one case, packed b frames for divx but theres a filter for that.
[08:01:52 CEST] <Taniey> anybody used amix filter?, I have a question, when the amix mix the audios, how it deal the discontinuous audio frame?
[08:05:53 CEST] <Taniey> for instance, A audio whith: FFFFF-----FFFFF, B audio: FFFFFFFFFFFFFFF, A have two segment audio frames, and B have continuous audio frames. how it mix use amix filter?
[10:11:58 CEST] <norbert> hi folks; I'm trying to transcode WMV3 (Microsoft ASF) to MP4, and the dimensions are off; it appears the input is actually 1440x1080 (instead of 1920x) which mplayer and vlc prescale during playback
[10:12:34 CEST] <norbert> mplayer says "VO: [vdpau] 1440x1080 => 1920x1080 Planar YV12" and that the "Movie-Aspect is 1.78:1 - prescaling to correct movie aspect."
[10:13:23 CEST] <furq> so what's the issue
[10:14:15 CEST] <JEEB> that's your standard anamorphic content (aspect ratio for pixels is not 1:1)
[10:14:27 CEST] <JEEB> FFmpeg will keep it as such unless you specify that you want to scale
[10:14:45 CEST] <JEEB> but I'm not fully sure *why* you would do that
[10:14:54 CEST] <norbert> ok; is there any way I can tell ffmpeg to scale it as vlc and mplayer do?
[10:15:04 CEST] <furq> it will do that automatically unless you're resizing it
[10:15:13 CEST] <norbert> I am resizing it :)
[10:15:13 CEST] <furq> in which case just resize it to -2:720 or whatever and it'll do the right thing
[10:15:43 CEST] <norbert> hm, but the resizing is automatic, so I check the input x/y sizes and then pick half
[10:16:05 CEST] <JEEB> furq: I'm not sure if -2 etc will keep the PAR...
[10:16:08 CEST] <JEEB> *SAR
[10:16:09 CEST] <norbert> I'd like it to go to half of 1920x1080 (960x540)
[10:16:20 CEST] <JEEB> norbert: then you have to calculate based on applying the SAR :P
[10:16:25 CEST] <JEEB> and not only resolution
[10:16:25 CEST] <norbert> instead of half of what it detects (1440x...)
[10:16:40 CEST] <norbert> SAR, ok
[10:16:48 CEST] <JEEB> SAR = sample aspect ratio, because samples are a more generic term
[10:16:58 CEST] <JEEB> (than pixels)
[10:17:15 CEST] <norbert> and ffprobe can detect the SAR for setsar?
[10:17:43 CEST] <JEEB> decode a single frame and -show_frames
[10:17:59 CEST] <JEEB> it has all the data on the decoded picture
[10:19:15 CEST] <JEEB> -select_streams v:0 -show_frames -read_intervals "%+#1"
[10:19:28 CEST] <JEEB> that should decode one frmae for you from the 1st (0th) video track
[10:19:47 CEST] <norbert> thx
[10:20:13 CEST] <JEEB> and you have sample_aspect_ratio=1:1 or something like that in there :P
[10:20:14 CEST] <JEEB> for the frame
[10:20:52 CEST] <furq> scale=-2:ih/2 should work if you don't mind keeping it anamorphic
[10:21:19 CEST] <furq> i just doublechecked and it works with non-square pixels
[10:21:54 CEST] <JEEB> yes. I think he specifically wants to not keep it anamorphic?
[10:22:01 CEST] <JEEB> norbert: or do you?
[10:22:17 CEST] <JEEB> (I think if you go under the resolution you originally had, you might as well do it 1:1 SAR)
[10:22:25 CEST] <furq> yeah
[10:22:36 CEST] <furq> you can probably do all that within the scale filter and not have to ffprobe
[10:22:42 CEST] <JEEB> yes
[10:23:53 CEST] <norbert> I'll just be honest, I don't know what anamorphic is
[10:23:57 CEST] <norbert> I'll Google it
[10:24:12 CEST] <furq> https://en.wikipedia.org/wiki/Pixel_aspect_ratio
[10:24:25 CEST] <JEEB> norbert: content where SAR/PAR (whichever wording you like) is not 1:1
[10:24:43 CEST] <JEEB> like 1440x1080 with a SAR of 4:3 is 1920x1080
[10:24:44 CEST] <JEEB> :P
[10:25:07 CEST] <norbert> ah
[10:25:16 CEST] <furq> and 4/3 * 4/3 = 16/9
[10:26:44 CEST] <norbert> furq: I cannot use -2:etc because the input may actually be 4:3 or any random thing
[10:26:53 CEST] <norbert> I'm extracting thumbnails from random videos
[10:27:06 CEST] <norbert> with scale=1280:720:flags=lanczos:force_original_aspect_ratio=decrease
[10:27:13 CEST] <norbert> to get to '720p'
[10:27:51 CEST] <norbert> and these 1440x videos have height 720 but the width is off because of the PAR
[10:28:49 CEST] <norbert> ffprobe stream=width also fails because of the PAR
[10:29:20 CEST] <furq> scale=w=if(gt(dar\,16/9)\,1280\,-2):h=if(gt(dar\,16/9)\,-2\,720)
[10:29:22 CEST] <furq> something like that
[10:29:54 CEST] <furq> that'll get you an output with either 1280 width and <=720 height or <=1280 width and 720 height
[10:30:03 CEST] <furq> which i guess is what you mean by '720p'
[10:30:19 CEST] <norbert> okay, when I see "scale=w=if(gt(dar\,16/9)\,1280\,-2):h=if(gt(dar\,16/9)\,-2\,720)" I think "The simplest solution is most likely the right one" https://en.wikipedia.org/wiki/Occam%27s_razor ;)
[10:30:33 CEST] <norbert> furq: it is what I mean, yes
[10:30:47 CEST] <furq> it might be even more complicated than that, i just pulled that out of my logs from a conversation where i wasn't thinking about anamorphic
[10:31:04 CEST] <furq> it is less complicated than it looks though
[10:31:17 CEST] <lain98> does anyone know why i might get "Operation not permitted". I'm calling avformat_seek_file with AVSEEK_FLAG_BYTE and pos that i know exists in the stream
[10:31:39 CEST] <furq> it's just if aspect ratio > 16/9 then 1280:-2 else -2:720
[10:31:41 CEST] <lain98> i also get the same with av_seek_frame
[10:40:04 CEST] <furq> norbert: -vf "scale=w=if(gt(dar\,16/9)\,1280\,trunc(720*dar)):h=if(gt(dar\,16/9)\,trunc(1280*dar)\,720),setsar=1"
[10:40:10 CEST] <furq> somewhat tested
[10:40:37 CEST] <norbert> damn, that's complicated
[10:43:03 CEST] <furq> whoops
[10:43:07 CEST] <furq> norbert: -vf "scale=w=if(gt(dar\,16/9)\,1280\,trunc(720*dar)):h=if(gt(dar\,16/9)\,trunc(1280/dar)\,720),setsar=1"
[11:09:06 CEST] <norbert> furq: thx; how likely is that to work with a barrage of random videos? :P
[11:09:37 CEST] <norbert> oh, actually, it still won't fix my ffprobe problem
[11:10:32 CEST] <norbert> ffprobe -v error -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 test.wmv
[11:10:35 CEST] <norbert> still says 1440
[11:11:20 CEST] <norbert> perhaps width should be an alias of non-par-corrected-width (or something, you get what I mean)
[11:12:08 CEST] <norbert> other video platforms that use ffmpeg must also run into this, but perhaps they don't have an eye for details
[11:20:14 CEST] <furq> you shouldn't need to use ffprobe with that
[11:21:58 CEST] <furq> if the thumbnails are jpeg then you might want to use trunc(360*dar)*2 and trunc(640/dar)*2 to make sure the output is mod2
[11:22:02 CEST] <furq> if it's png then it doesn't matter
[11:39:12 CEST] <lain98> uhh i indexed all keyframes in a video and saved AVPacket.pos for keyframes, however when i call av_seek_frame/avformat_seek_file with the indexed pos i get EPERM or operation not permitted. any hints or how can i build ffmpeg with debug symbols ?
[12:17:06 CEST] <DHE> ffmpeg already has debug symbols in the build directory in the form of the ffmpeg_g binary
[12:19:36 CEST] <lain98> DHE: cant find anything named *ffmpeg_g*
[12:30:25 CEST] <DHE> this is linux?
[12:30:29 CEST] <lain98> yeah
[12:30:44 CEST] <lain98> i built ffmpeg from source
[12:30:53 CEST] <lain98> and only use libav*.so not ffmpeg
[12:31:13 CEST] <lain98> ffmpeg- the command line utility
[12:31:22 CEST] <DHE> oh..
[12:31:42 CEST] <lain98> i only build the libraries
[12:50:04 CEST] <lain98> still ffprobe -show_frames shows that the first frame has pos=48. when i call avformat_seek_file(ctx, video_index, INT64_MIN, 48, INT64_MAX, AVSEEK_FLAG_BYTE). i cannot seek
[13:01:13 CEST] <lain98> okay i guess AVSEEK_FLAG_BYTE might not be universally supported however i'm demuxing mp4 and i imagined it would be supported
[13:39:44 CEST] <norbert> furq, JEEB; thanks again for the feedback
[14:19:26 CEST] <kepstin> lain98: for most formats you want to seek by timestamp, not byte index.
[14:20:11 CEST] <kepstin> lain98: why are you making an index? is this so you can seek by frame number?
[14:20:31 CEST] <kepstin> lain98: if so, you should store (frame number, pts) in your index.
[15:36:08 CEST] <kepstin> a byte index would only be useful for formats where seeking to a timestamp is unreliable and the format can resync at arbitrary points, like mpegts
[17:39:54 CEST] <saml> sample_aspect_ratio=1:1 is this bad?
[17:41:42 CEST] <durandal_1707> no
[19:01:47 CEST] <DHE> saml: means the video ratio/resolution and the screen ratio match exactly
[19:04:57 CEST] <saml> DHE, ah thanks
[19:05:45 CEST] <DHE> or alternatively, what it's really meant to convey, the pixels in the image are perfectly square
[00:00:00 CEST] --- Fri Sep 6 2019
More information about the Ffmpeg-devel-irc
mailing list