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

burek burek021 at gmail.com
Fri Feb 1 03:05:02 EET 2019


[00:02:06 CET] <mfwitten> mfolivas: I suspect that using a single pass or 2 pass will be better for you: https://trac.ffmpeg.org/wiki/Encode/H.264#twopass
[00:04:46 CET] <mfolivas> mfwitten: yes, we'll never scale up, we'll either keep in the same scale or lower
[00:04:49 CET] <mfolivas> I guess . that's ok
[00:05:22 CET] <mfolivas> I was thinking in testing with different encoders
[00:05:27 CET] <mfolivas> see if that helps
[00:05:44 CET] <mfwitten> mfolivas: Well, hardware accleration would probably make a big difference in the time it takes
[00:05:57 CET] <mfolivas> mfwitten: yes, all options are on the table
[00:06:21 CET] <mfolivas> and so far, the lowest-hanging fruit will be adding vertically scaling - more CPU
[00:07:06 CET] <mfwitten> mfolivas: Maybe. If you've got GPUs in your machines, make sure ffmpeg is built to use them.
[00:08:32 CET] <mfolivas> JEEB: not sure how I could find the bottleneck
[00:08:49 CET] <mfolivas> I understand that I could use something like this: `ffmpeg -i INPUT -f null -`
[00:09:05 CET] <mfolivas> I have this right now: ffmpeg -i two-minute-video.mp4 -vf scale=1920:1080 -profile:v baseline -level 4.1 -crf 17 -preset fast -bf 0 scaled-some-random-video.mp4
[00:09:22 CET] <mfolivas> and that gives me real 4m18.763s - real time
[00:09:50 CET] <mfolivas> can I get a breakdown on what is taking longer somehow?
[00:17:08 CET] <mfolivas> mfwitten: how would I know which encoder am I using for my tests?
[00:17:17 CET] <mfolivas> would that be in the metadata?
[00:17:51 CET] <mfolivas>     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160, 59879 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
[00:18:05 CET] <mfolivas> would that mean that I'm using the libx264?
[00:18:58 CET] <ocrete> would there be any appetite to implement support to keep closed caption around when encoding/transcoding inside ffmpeg ?
[00:21:53 CET] <mfwitten> mfolivas: Specify it directly in your command line: -c:v libx264
[00:22:11 CET] <mfwitten> mfolivas: You can see it in the "metadata" too: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[00:24:06 CET] <Hello71> ocrete: -c:s copy
[00:24:27 CET] <ossifrage> Does anyone know of a minimal C library that can decode iframe only h.264? I could use ffmpeg, but I was hoping for something with a smaller footprint
[00:25:05 CET] <ocrete> Hello71: it's not a seprate stream, they're generally SEIs inside the h.264/h.265 stream ... or in the case I'm looking at, would have to be extracted from the Ancilliary data given by a decklink card and then encoded into a SEI
[00:25:43 CET] <ocrete> there is code to parse them out of a h264/h265 steam, but I don't see much else
[00:28:23 CET] <mfwitten> ossifrage: If you're familiar with C, maybe you could just rip out of ffmpeg the code paths you need.
[00:29:39 CET] <BtbN> build ffmpeg with nothing but ffh264
[00:30:19 CET] <ossifrage> BtbN, that was my next step, turn off as much as possible and see how big it is
[00:30:35 CET] <BtbN> There is a switch called literally --disable-everything
[00:31:32 CET] <ossifrage> I remember seeing a fairly clean still decoder that would do what I want, but my googlefoo is letting me down
[00:33:03 CET] <ossifrage> It was something that predated the BPG stuff
[00:34:49 CET] <mfolivas> mfwitten:     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160, 59879 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
[00:35:02 CET] <mfolivas> does that means that the encoder is a h264?
[00:36:06 CET] <ossifrage> mfolivas, high profile h.264
[00:36:39 CET] <mfwitten> mfolivas: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[00:36:42 CET] <mfwitten> mfolivas: Look for that
[00:37:09 CET] <mfwitten> mfolivas: Something like that
[00:37:39 CET] <mfolivas> ah ok...
[00:37:50 CET] <mfolivas> `Stream mapping: `
[00:37:57 CET] <mfolivas> `  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))`
[00:38:38 CET] <mfwitten> mfolivas: Specify it directly in your command line: -c:v libx264
[00:38:42 CET] <mfwitten> mfolivas: or some other encoder
[00:39:35 CET] <mfwitten> mfolivas: `-c:v h264_nvenc' for example, if you've got the hardware support
[01:10:49 CET] <mfolivas> mfwitten: want to try the QuickSync
[01:11:25 CET] <mfolivas> any tips/thoughts if it will make any difference in my performance?
[01:11:51 CET] <mfwitten> mfolivas: Unfortunately, I don't.
[01:12:00 CET] <mfolivas> thanks!
[01:12:20 CET] <mfwitten> mfolivas: Glad to help
[01:13:14 CET] <mfwitten> mfolivas: With GPU support, you'd be able to encode more videos simultaneously; you could do some with GPUs and some with CPU
[01:13:26 CET] <mfwitten> mfolivas: Maybe
[01:13:30 CET] <mfolivas> I could, and we're thinking about that
[01:13:44 CET] <mfolivas> but, I'm afraid that there will be some changes in the code as well
[01:15:02 CET] <mfwitten> mfolivas: Yeah. It kind of makes you want to throw the computers out of the airplanes, eh?
[01:15:11 CET] <mfolivas> LOL!!
[01:15:17 CET] <mfolivas> yes
[02:18:27 CET] <mfolivas> trying to use QuickSync but got an error
[02:18:42 CET] <mfolivas> I have only installed the ffmpeg
[02:18:53 CET] <mfolivas> when trying to do this:
[02:18:54 CET] <mfolivas> ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -vf hwdownload,format=nv12 -pix_fmt yuv420p -f sdl -
[02:19:06 CET] <mfolivas> I get: `Unknown decoder 'h264_qsv'`
[02:21:39 CET] <DHE> that's a decoder position, not an encoder position...
[02:21:48 CET] <DHE> also did you check wit "ffmpeg -encoders" to make sure a qsv option is available?
[02:26:28 CET] <mfolivas> DHE: thanks, will check
[02:29:20 CET] <mfolivas> DHE: doesn't seem like it
[02:31:30 CET] <mfolivas> does that means that I need to do this? https://trac.ffmpeg.org/wiki/Hardware/QuickSync#InstallingtheMediaSDKonLinux
[03:56:19 CET] <mfolivas> how can I find the type of decoder/encoder that I use by default using ffmpeg?
[03:56:37 CET] <mfolivas> I was under the misconception that h264 and libx264 meant the same thing
[06:09:15 CET] <pink_mist> libx264 is an encoder, not a decoder
[06:09:24 CET] <pink_mist> for h264 the decoder is part of ffmpeg
[06:42:34 CET] <mfolivas> thanks pink_mist
[13:48:12 CET] <mfolivas> trying to do some test with h264_vaapi: ffmpeg -vaapi_device /dev/dri/renderD128 -i two-minute-video.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi vvapi_two-minute-video.mp4
[13:48:27 CET] <mfolivas> so far, none of the videos that I've tried is working/showing.
[16:44:53 CET] <mfolivas> doing some search regarding VAAPI but I don't see any video
[16:45:15 CET] <mfolivas> I'm getting a 4K video and then tried to do a simple encoding
[16:45:17 CET] <mfolivas> ffmpeg -vaapi_device /dev/dri/renderD128 -i two-minute-video.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi vvapi_two-minute-video.mp4
[16:45:54 CET] <mfolivas> but as I mentioned before, I cannot see the video
[16:50:03 CET] <mfolivas> also, has anyone done some test with qsv?
[16:50:13 CET] <mfolivas> I haven't been able to install it.
[16:50:26 CET] <mfolivas> I'm running Linux Debian
[16:52:44 CET] <mfolivas> oh, shoot, is it because I'm running Intel? The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs.
[16:54:05 CET] <mfolivas> >initially developed by Intel but can be used in combination with other devices.
[17:10:58 CET] <jkqxz> mfolivas:  What hardware do you have, and what error are you getting?
[17:11:25 CET] <mfolivas> I have NUC and running an Intel chip
[17:11:54 CET] <mfolivas> jkqxz Intel® NUC Mini PCs.
[17:12:24 CET] <mfolivas> I just want to get some different encodes running
[17:12:43 CET] <mfolivas> I just having a hard time installint QuickSync or use VAAPI to access it
[17:13:05 CET] <BtbN> You do not want to be using QSV on Linux, really
[17:13:12 CET] <jkqxz> What error did you get when you ran the command above?
[17:13:24 CET] <BtbN> VAAPI is almost always the better choice
[17:15:12 CET] <mfolivas> jkqxz command above?  You mean this: ```ffmpeg -vaapi_device /dev/dri/renderD128 -i two-minute-video.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi vvapi_two-minute-video.mp4```
[17:15:18 CET] <mfolivas> if so, there were no errors
[17:15:33 CET] <mfolivas> but I don't think this is for Intel (which is what I am running)
[17:16:56 CET] <jkqxz> That should work.  What's wrong with the output, then?
[17:17:07 CET] <mfolivas> the video doesn't show
[17:17:17 CET] <mfolivas> it's just black with audio
[17:18:44 CET] <jkqxz> Did you install from the default Debian package?  Encode support uses proprietary blobs on recent chips, and the default package doesn't include those so it doesn't work.
[17:19:04 CET] <jkqxz> There is a separate package in non-free containing those blobs.
[17:19:13 CET] <mfolivas> I did the following:
[17:19:17 CET] <mfolivas> apt-get install -y vainfo i965-va-driver vainfo
[17:19:21 CET] <mfolivas> then reboot
[17:20:13 CET] <jkqxz> Then you probably lack the proprietary encode blobs.  Install i965-va-driver-shaders as well.
[17:21:31 CET] <mfolivas> jkqxz ok, let me try that!
[17:21:38 CET] <mfwitten> mfolivas: I wonder whether `dmesg --follow' will show you messages from the kernel if the kernel driver is upset about something.
[17:22:16 CET] <mfolivas> yeah, I follow this pdf from the Intell's media server
[17:22:28 CET] <mfolivas> and it deleted something
[17:22:36 CET] <mfolivas> now I get this error: ffmpeg: error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory
[17:42:14 CET] <ecrist> Hey folks.  I've run into this issue where a single ffmpeg instance to an rtp stream results in all other instances to be just that one stream
[17:42:48 CET] <ecrist> anyone else see that?
[19:25:08 CET] <mfolivas> jkqxz sorry, had to rebuild the server. That i965-va-driver-shaders doesn't exists
[19:25:23 CET] <mfolivas> i did an `apt-cache search i965-va-driver-shaders` nothing came back
[19:26:16 CET] <mfolivas> I'm just not sure how I can get access to either the VAAPI to access quicksync
[20:24:59 CET] <mfolivas> hmm...
[20:25:10 CET] <mfolivas> so, I think i have the vaapi installed
[20:25:23 CET] <mfolivas> I am using it an intel server
[20:25:46 CET] <mfolivas> however, this `ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128` game me this error:
[20:25:51 CET] <mfolivas> Unrecognized option 'init_hw_device'.
[20:28:13 CET] <DHE> you need to specify an input or output "file"
[20:43:48 CET] <mfwitten> I'm trying to use `amix' to mix 2 audio streams together into 1; I've tried to offset one of the audio streams relative to the other by using `asetpts' on it, but amix seems to completely ignore PTS (i.e., `asetpts' does nothing. Ever.). Am I using PTS incorrectly for this purpose?
[20:47:23 CET] <BtbN> I don't think it particularily cares about input pts
[20:47:45 CET] <BtbN> try adelay
[20:48:33 CET] <mfwitten> BtbN: Yes, adelay works. However, `asetpts' still seems like a much more philosophically correct way to think about it.
[20:49:02 CET] <mfwitten> BtbN: For one thing, adelay is a channel-based; I had to go look to see whether this audio is stereo or mono
[21:10:40 CET] <mfolivas> can someone explain me the when to use format=nv12 vs format=nv12,hwupload on VAAPI?
[00:00:00 CET] --- Fri Feb  1 2019


More information about the Ffmpeg-devel-irc mailing list