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

burek burek021 at gmail.com
Wed Jul 24 03:05:05 EEST 2019


[00:18:34 CEST] <CCFL_Man> i encoded a ripped dvd vobs to a .mov with the video codec copied and the audio codec from 5.1 ac3 to 5.1 aac for playback on quiicktime on a mac and the video seems to jump back and forth frames. what do you think might be wrong?
[00:19:19 CEST] <CCFL_Man> [mov @ 0x102040200] pts has no value <-- this would continually come up during encoding
[00:21:10 CEST] <CCFL_Man> does quicktime not like mpeg2 video?
[00:22:32 CEST] <kepstin> dvd vobs, especially ntsc, have some really strange methods for dealing with telecine patterns. I wouldn't be surprised if you see some jittering on certain videos.
[00:23:20 CEST] <kepstin> especially if you're using deinterlacing and it detected the first field incorrectly :/
[00:30:27 CEST] <CCFL_Man> oh
[00:30:39 CEST] <CCFL_Man> that makes sense
[00:31:02 CEST] <CCFL_Man> but NTSC dvd video is interlaced?
[00:31:15 CEST] <kepstin> yes -- and also no
[00:31:51 CEST] <kepstin> all ntsc dvd is designed to be played back as interlaced (60 fields per second) via the normal analog tv connector
[00:32:35 CEST] <kepstin> however, some ntsc dvd content is actually encoded as progressive 24 frames per second video, with special flags set to indicate how to transform it to 60 fields per second interlaced during decoding.
[00:32:58 CEST] <kepstin> and these options can be mixed together - both types of content can appear in a single video!
[00:33:40 CEST] <CCFL_Man> i thought the mpeg stream was not interlaced but the analog encoder produces the interlacing
[00:34:42 CEST] <kepstin> it could be either - it can be encoded as interlaced, or it can be encoded as progressive with interlacing (telecine pattern) applied during decoding.
[00:34:55 CEST] <kepstin> or both mixed together.
[00:35:52 CEST] <kepstin> animated tv shows from the mid-2000s are the worst for that. very hard to turn back into a nice progressive video stream for display on a monitor :(
[00:36:12 CEST] <BtbN> just transcode to h264, with a fairly high bitrate it'll still be very good quality, while smaller than mpeg2
[00:37:07 CEST] <kepstin> depending on content, I'd recommend detelecining (there's a few filter options depending on how video was encoded previously) or deinterlacing then re-encoding, yeah
[00:37:47 CEST] <CCFL_Man> Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, max. 9800 kb/s, 28.17 fps, 59.94 tbr, 90k tbn, 59.94 tbc
[00:38:27 CEST] <kepstin> is this a movie? tv show? live action? animated? from what time period? I can make some general filter recommendations based on that :)
[00:39:52 CEST] <CCFL_Man> it's a movie, starv trek first contact, actually
[00:40:28 CEST] <CCFL_Man> can ffmpeg tell me if it's interlaced?
[00:41:02 CEST] <CCFL_Man> because it plays fine in mplayer and no interlacing lines noticable
[00:41:41 CEST] <kepstin> huh, weird. movies are, nowadays at least, encoded as straight progressive and are easy to deal with. I guess first contact was an early enough dvd to have some strange stuff
[00:42:40 CEST] <kepstin> the ffmpeg output there: "28.17 fps" indicates that you've got mixed 24p and 30i stuff in ffmpeg's probe range (just near the start of the file)
[00:43:02 CEST] <kepstin> mplayer normally outputs some text on the console when switching framerates on files like this
[00:43:38 CEST] <CCFL_Man> i used
[00:43:46 CEST] <CCFL_Man> i used ffmpeg -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB\|VTS_01_4.VOB\|VTS_01_5.VOB
[00:45:22 CEST] <CCFL_Man> [lavf] stream 1: audio (aac), -aid 0, -alang eng
[00:45:24 CEST] <CCFL_Man> VIDEO:  [MPG2]  720x480  24bpp  59.940 fps  4400.0 kbps (537.1 kbyte/s)
[00:47:07 CEST] <kepstin> should be able to repair a proper 24p progressive video by using "-vf repeatfields,fieldmatch,decimate,setsar=40/33" on this (that'll also fix the aspect ratio). If this is in a cinematic aspect ratio - black bars on top/bottom - you might also want to crop it while re-encoding.
[00:48:06 CEST] <CCFL_Man> that's the .mov. i encoded it that way so i can use mpeg2 hardware decoding on my video card
[00:48:10 CEST] <CCFL_Man> MPEG-PS file format detected.
[00:48:12 CEST] <CCFL_Man> VIDEO:  MPEG2  720x480  (aspect 3)  29.970 fps  9800.0 kbps (1225.0 kbyte/s)
[00:48:23 CEST] <CCFL_Man> that is what mplayer detects the vob as
[00:48:33 CEST] <kepstin> most video cards have hardware h264 decoding.. it's probably less buggy than mpeg2 even.
[00:49:22 CEST] <CCFL_Man> mine does, but only in quicktime
[00:49:35 CEST] <kepstin> mpeg2 is simple enough to decode that you don't get a big benefit from hardware decoders anyways :)
[00:50:20 CEST] <kepstin> used to be a big deal in the mid-90s when you had <200mhz processors, an mpeg2-decoder addin board was very useful then.
[00:50:35 CEST] <CCFL_Man> but mplayer reports the vob as 29.970fps, which mean it should be progressive, right?
[00:50:59 CEST] <kepstin> 29.97 (actually 30/1.001) is the frame rate for 30i (interlaced) video
[00:51:26 CEST] <CCFL_Man> oh
[00:51:27 CEST] <kepstin> movies are 24fps, usually slowed down a tiny bit to 24/1.001 for dvd.
[00:51:40 CEST] <CCFL_Man> oh, but it says: demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.
[00:53:03 CEST] <kepstin> CCFL_Man: yep. that indicates that some of the video content near the start was encoded as interlaced, then some later was encoded as progressive. I've seen that output quite a bit on mid-2000s and earlier dvds. I think the encoders got better later :/
[00:53:49 CEST] <CCFL_Man> ahh
[00:53:55 CEST] <kepstin> the filter chain I suggested above ^^ will do a brute-force conversion to proper 24fps progressive for the whole movie.
[00:54:34 CEST] <CCFL_Man> now, in quicktime, if i mux the video and ac3 audio to an mpeg2 ps, it plays perfectly fine in quicktime
[00:54:51 CEST] <CCFL_Man> except no audio
[00:55:13 CEST] <kepstin> vob files are mpeg2 ps with some extra stuff added, fwiw.
[00:55:29 CEST] <CCFL_Man> but if i mux the video and reencode the audio to aac to .mov, i get jumpy video
[00:55:59 CEST] <CCFL_Man> i know, i just remuxed the video and the 5.1 ac3 track
[00:56:08 CEST] <kepstin> i guess it might be losing some of the extra metadata for the video fields when muxing to mov :/
[00:56:15 CEST] <CCFL_Man> ahh
[00:56:28 CEST] <kepstin> i suggest using ffmpeg with the filters I suggested, re-encode to h264
[00:56:38 CEST] <kepstin> smaller file, still hardware decodable, better player compatibility
[00:57:12 CEST] <CCFL_Man> plays kind of funny in mplayer too, but not as bad
[00:57:58 CEST] <CCFL_Man> ahh, ok. I wanted to keep the video stream intact but maybe it's a bug in ffmpeg qt muxing?
[00:58:16 CEST] <BtbN> It's just impossible to mux some of the stuff vob does to mp4
[00:59:46 CEST] <CCFL_Man> BtbN: maybe mux to .mp4 instead of .mov?
[01:00:03 CEST] <BtbN> mp4 and mov are pretty much the same thing
[01:01:01 CEST] <CCFL_Man> for mpeg4 video and ac3 audio ts streams i mux the video and reencode the audio to aac
[01:02:51 CEST] <CCFL_Man> and mux everything in mp4. i'm going to try that
[01:03:01 CEST] <CCFL_Man> the .mov container m ight be old
[01:03:27 CEST] <CCFL_Man> mplayer's mpeg2 decoding sometimes slows down
[01:03:45 CEST] <CCFL_Man> then i'll try the filter you suggested
[01:04:34 CEST] <BtbN> mov got standardized and is called mp4 now
[01:05:03 CEST] <CCFL_Man> that might be it
[01:05:24 CEST] <CCFL_Man> the mp4 container should play nice with mpeg2 video
[01:06:13 CEST] <CCFL_Man> because .mov says "mov", and .mp4 says "mp4", so ffmpeg might treat them as different containers
[01:07:32 CEST] <kepstin> there's no difference in how mpeg2 video is stored in mov vs. mp4 as far as I know.
[01:07:35 CEST] <MoziM> stupid question, but lets say i have a video thats 30 minutes long but nothing changes on the screen for that amount of time (cctv footage) what codec is best to use in this situation to minimize the file size?
[01:07:51 CEST] <kepstin> MoziM: doesn't matter, just use a large gop size
[01:07:57 CEST] <MoziM> gop?
[01:08:15 CEST] <kepstin> group of pictures, the distance between keyframes. Set with the "-g" option to ffmpeg
[01:09:06 CEST] <MoziM> that would minimize the size?
[01:09:41 CEST] <MoziM> would this have to be post capture or can ffmpeg do this during capture?
[01:09:57 CEST] <kepstin> can be set during capture.
[01:10:11 CEST] <kepstin> what's the framerate of the source?
[01:10:49 CEST] <MoziM> 20 fps
[01:10:53 CEST] <MoziM> but... that matters?
[01:11:01 CEST] <kepstin> iirc x264's default is something like "240", which is 10 seconds at 24fps. You might consider increasing that to the point where you get a keyframe every minute or two instead.
[01:11:19 CEST] <kepstin> other than that, just use the slowest encoder preset which your computer can manage realtime capture at
[01:11:32 CEST] <MoziM> that sounds weird to me
[01:11:37 CEST] <MoziM> 'the slowest encoder preset'
[01:11:45 CEST] <MoziM> encoders can be slow/fast?
[01:12:05 CEST] <kepstin> I recommend using the x264 encoder, which has an option "preset" which lets you configure the tradeoff between cpu usage of the encoder and compression efficiency
[01:12:36 CEST] <kepstin> "slow" settings take more time per frame, but compress more - "fast" settings take less time per frame, but the compression isn't as good
[01:13:47 CEST] <kepstin> so what you do is test a few different settings for -preset (the default is "medium") until you find one that can still capture in realtime, but compresses as much as possible.
[01:17:35 CEST] <kepstin> also make sure you're not using mp4 files :)
[01:18:29 CEST] <kepstin> (mp4 gets corrupted if the encoder breaks/crashes/has a power outage while encoding the video, and it's hard to recover)
[01:19:28 CEST] <MoziM> one thing i've been wondering about flv and mp4... does converting between 2 video formats result in information loss?
[01:30:33 CEST] <CCFL_Man> kepstin: the version of quicktime i have won't play mpeg2 video in .mp4, but it.s a bummer because it won't play ac3 audio in anything, though
[01:30:53 CEST] <CCFL_Man> i'll have to use your filter and mpeg4 encoding
[01:33:59 CEST] <kepstin> MoziM: in many cases you can copy encoded video from one container to another, but there are some cases where something in one container can't be represented in another.
[01:36:12 CEST] <kepstin> MoziM: if you transcode instead of copy, and the codecs are "lossy", then there is generational information loss.
[01:37:25 CEST] <kepstin> Note that ffmpeg transcodes by default, you can ask it to copy instead with an option.
[01:39:02 CEST] <CCFL_Man> the quicktime player just sucks. the problem is with my version of mac os, it's the only player that can use hardware decoding
[01:41:11 CEST] <furq> are you on some ancient osx or something
[01:41:26 CEST] <furq> mpv supports vda and videotoolbox which should cover 10.6 and up
[01:41:35 CEST] <furq> and i assume vlc or whatever does as well
[01:43:19 CEST] <CCFL_Man> mplayer can't use it on 10.6.8
[01:46:16 CEST] <MoziM> kepstin: aren't you copying when you're transcoding?
[01:48:16 CEST] <kepstin> MoziM stream copying means taking the existing encoded video bits and copying them unmodified to a new file, possibly with a different container.
[01:50:45 CEST] <kepstin> Transcoding means decoding to raw video, then encoding again, usually with a different codec or settings.
[02:25:42 CEST] <nine_milli> blb
[03:01:57 CEST] <MoziM> kepstin: raw video = original encoded video?
[03:02:55 CEST] <kepstin> if you encode video using a lossy codec then decode it again, the raw video you get will not be the same as what you originally gave to the encoder.
[03:05:13 CEST] <MoziM> what does it even mean to 'decode' as in get the raw frames? or...
[03:05:56 CEST] <MoziM> ive read the verbatim on it but i still do not understand what it really means
[03:06:05 CEST] <MoziM> is it 'decoding' when you watch a video with a media player?
[03:06:19 CEST] <furq> yes
[03:06:42 CEST] <furq> unless the video you're watching is already rawvideo
[03:07:17 CEST] <MoziM> how can a video be 'raw'?
[03:07:24 CEST] <furq> if it's not been encoded
[03:07:25 CEST] <MoziM> i thought they have to have an encoder...
[03:07:58 CEST] <furq> rawvideo in ffmpeg terminology is just untouched rgb/yuv/whatever data
[03:08:30 CEST] <furq> so e.g. for rgb24 it's three bytes (r, g and b) per pixel per frame
[03:09:01 CEST] <furq> if you were to then compress that somehow you'd need to decompress it back to that state to be able to display it
[03:09:21 CEST] <furq> or to that format, at least, since it won't be the exact same data if you use lossy compression
[03:22:28 CEST] <MoziM> which x264 is not correct?
[03:25:09 CEST] <DHE> x264 encodes it, but there is a mode where you're guaranteed a perfectly identical video back out
[03:25:36 CEST] <DHE> that said, it still requires CPU power to encode and using the codec puts a risk of choosing a bad colourspace that results in image quality loss (eg: yuv420) independent of the actual codec
[03:30:56 CEST] <CCFL_Man> how can one rip closed captions from a dvd and convert them to srt using a command line program?
[03:34:31 CEST] <CCFL_Man> looks like ccextractor
[03:40:40 CEST] <nine_milli> blb
[04:33:39 CEST] <CCFL_Man> can't compile ccextractor on mac os
[04:36:27 CEST] <CCFL_Man> i wish i knew c
[04:36:52 CEST] <CCFL_Man> i can't finnd the problem
[06:32:17 CEST] <nine_milli> blb
[08:11:00 CEST] Last message repeated 1 time(s).
[08:57:53 CEST] <pkunk> I'm trying to transcode HEVC 4K stream to 1080p HEVC after using scale_vaapi
[08:58:26 CEST] <pkunk> hw_accel is vaapi
[08:59:11 CEST] <pkunk> Using Intel 8th gen CPU.. However I can't get scale_vaapi to work with the frame decoded on GPU with the intel media-driver iHD
[08:59:30 CEST] <pkunk> Is it a defect within ffmpeg , or with the intel media-driver package ?
[10:14:42 CEST] <nine_milli> blb
[12:10:01 CEST] <tomb^> Hi, I'm trying to "channelsplit" a 4.0 audio stream and remap only the first 2 channels from it, but get the error "Filter channelsplit:BC has an unconnected output", should that be possible?
[12:17:09 CEST] <durandal_1707> tomb^: use channelmap filter?
[12:18:04 CEST] <durandal_1707> if you have recent ffmpeg, if you wish to extract FL+FR from 4.0 it would be really easy
[12:19:16 CEST] <durandal_1707> -af "channelsplit=4.0:FL+FR"
[12:20:27 CEST] <durandal_1707> err, -af "channelsplit=4.0:FL+FR,amerge" if you  need stereo as output
[12:26:16 CEST] <tomb^> @durandal_1707 thanks! I don't need to make a stereo out of it, just remap it as a channel, will try it! thanks!
[14:49:13 CEST] <Freneticks> is it possible in hls protocole (m3u8) to say start at 00:10:10 min ?
[14:50:29 CEST] <DHE> as in, you have an hour-long video but want viewers to start about 17% into the video? pretty sure the answer is no
[15:01:42 CEST] <Freneticks> So I need to remux the video on the fly
[15:03:28 CEST] <DHE> clients will either start from the beginning if they think it's an event or video on demand type thing, or from the end if they think it's a live broadcast
[17:05:48 CEST] <nine_milli> blb
[18:46:02 CEST] <dastan> hello people
[18:46:35 CEST] <dastan> i find the clue about the QSV.....my processor is not supported....lol
[18:46:46 CEST] <dastan> now i am getting problems with vaapi
[18:46:52 CEST] <dastan> https://pastebin.com/7hUAtrHH
[18:47:09 CEST] <dastan> in this pastebin is my command and the error i am getting
[18:48:00 CEST] <dastan> basically is a problem converting formats or something like this
[18:48:22 CEST] <dastan> i have the compiled version with vaapi driver installed
[18:48:24 CEST] <JEEB> you have cut some stuff unfortunately. seems like you are missing a hwupload or whatever? see the vaapi related documentation
[18:49:08 CEST] <JEEB> https://trac.ffmpeg.org/wiki/Hardware/VAAPI
[18:49:19 CEST] <JEEB> see the first Encoding example
[18:50:09 CEST] <dastan> in this article they make an hardware init
[18:50:15 CEST] <dastan> that create a file
[18:51:17 CEST] <JEEB> please look at the first encoding example, if you haven't cut your command line you should notice that you do not have any hardware upload
[18:51:37 CEST] <JEEB> I have no idea how much you cut from the terminal logs, of course
[18:51:51 CEST] <JEEB> because they clearly miss parts :P
[18:51:56 CEST] <JEEB> (command parameter parsing etc)
[18:52:06 CEST] <JEEB> you can hide the URL, I don't give a fat ass about it
[18:52:15 CEST] <dastan> https://pastebin.com/XNQAygEa
[18:52:17 CEST] <JEEB> but please do not randomly cut out things :)
[18:52:51 CEST] <JEEB> do I have to once again point towards the first encoding example in that page?
[18:52:55 CEST] <JEEB> like, the sub-part "Encoding"
[18:53:01 CEST] <dastan> VAAPI driver: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.0.pre1 (2.3.0-19-g205e103).
[18:53:01 CEST] <dastan> [AVHWDeviceContext @ 0x55d5269443c0] Driver not found in known nonstandard list, using standard behaviour.
[18:53:13 CEST] <JEEB> see the first example, see what is not in your command line
[18:53:21 CEST] <dastan> Driver not found?
[18:53:24 CEST] <JEEB> no
[18:53:37 CEST] <JEEB> that just says that your driver is not on the list of ones that need hacks
[18:53:44 CEST] <JEEB> "using standard behavior"
[18:54:04 CEST] <JEEB> since your error in your original pastebin looked like a filter chain error, see the FIRST EXAMPLE in the ENCODING part of the thing I linked
[18:54:09 CEST] <JEEB> I don't think this is hard to grasp
[18:54:41 CEST] <JEEB> > The encoders only accept input as VAAPI surfaces. If the input is in normal memory, it will need to be uploaded before giving the frames to the encoder - in the ffmpeg utility, the hwupload filter can be used for this. It will upload to a surface with the same layout as the software frame, so it may be necessary to add a format filter immediately before to get the input into the right format (hardware
[18:54:47 CEST] <JEEB> generally wants the nv12 layout, but most software functions use the yuv420p layout).
[18:54:50 CEST] <JEEB> it says literally this before it too
[18:54:56 CEST] <JEEB> can you please at least attempt to read what I write
[18:56:19 CEST] <dastan> sory, i am trying to understand
[18:56:37 CEST] <dastan> but i was thinking tha i have a problem in my compilation too
[18:57:00 CEST] <JEEB> well now with VAAPI that seems to at least be enabled :P
[18:57:37 CEST] <JEEB> so pretty please just look at the article. scroll down until the part that says "Encoding" and then look at the first example. See what you are missing from your command line
[19:01:44 CEST] <nine_milli> blb
[19:12:17 CEST] <dastan> just printed the article to read in the bus to my work
[19:13:12 CEST] <dastan> thanks JEEB, i use the filter and worked, right now is time to understand why
[19:14:46 CEST] <dastan> how many resources are "reused" when you use ffmpeg with VAAPI?
[19:15:54 CEST] <JEEB> dastan: you decode with software and the vaapi encoder takes in VAAPI surfaces that are on the "GPU"
[19:16:26 CEST] <JEEB> currently the way to push (upload) the images taht are decoded to the "GPU" is to use that filter
[19:18:19 CEST] <dastan> using hardware to help ffmpeg is a new world for me
[19:18:32 CEST] <dastan> and is a little hard to understand for me
[19:20:22 CEST] <dastan> i will read and when i have more specific questions i come back
[19:20:58 CEST] <dastan> because right now, i am not understanding anyting, only that with vaapi ffmpeg is lighter to the system
[21:26:51 CEST] <nine_milli> blb
[22:50:00 CEST] Last message repeated 1 time(s).
[23:40:02 CEST] <Spring> tried finding how I'd encode to VC-1 since I was looking to replicate a video encoding done using WMV3 however this was the only lead I found, http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2007-June/031326.html
[23:40:52 CEST] <Spring> frankly I'm not sure how I'd encode to it since apparently it was encoded using Windows Media Video 9 Professional which I don't have.
[23:43:11 CEST] <JEEB> yea, I don't think there's a vc1 or wmv3 encoder in FFmpeg itself
[23:43:20 CEST] <JEEB> and I'm not sure if vaapi and such let you encode VC-1
[23:44:17 CEST] <JEEB> I used to have a copy of MS's expression encoder
[23:44:39 CEST] <JEEB> v3 or v4 I think
[23:44:55 CEST] <JEEB> I used to test it because it seemed like I think with v3 they made their own H.264 encoder
[23:44:58 CEST] <JEEB> (which sucked)
[23:45:11 CEST] <JEEB> in v4 they switched to mainconcept's encoder and it got dull :<
[23:45:42 CEST] <JEEB> seems like https://www.microsoft.com/en-us/download/details.aspx?id=27870
[23:45:45 CEST] <JEEB> is available
[23:45:52 CEST] <JEEB> and VC-1 encoding should be available?
[23:46:00 CEST] <JEEB> I recommend testing it in a VM or something
[23:46:41 CEST] <JEEB> I think there also was some reference software for VC-1
[23:46:47 CEST] <JEEB> which I don't remember if it contained an encoder
[23:46:52 CEST] <JEEB> but it was open source I think?
[23:47:41 CEST] <Spring> thanks I'll take a look
[23:48:00 CEST] <JEEB> but it seems like expression encoder is what became of the WMV9 professional encoder
[23:58:51 CEST] <JEEB> Spring: I hope you're just looking into this out of interest since thankfully for most use cases you don't really need WMV3/VC-1 :)
[23:59:37 CEST] <Spring> yeah it's just a very niche use not anything normal.
[00:00:00 CEST] --- Wed Jul 24 2019


More information about the Ffmpeg-devel-irc mailing list