burek021 at gmail.com
Fri Nov 9 03:05:02 EET 2018
[11:31:04 CET] <Akien> Hi there! I'm trying to debug a video playback issue in the emulator PPSSPP when built against FFmpeg 3.1+ (upstream uses 3.0.2 for official builds). I have no experience with FFmpeg and I'm not the PPSSPP dev who wrote the video playback code either, but I've done some bisecting and thought maybe some of you know what the current code misses. The
[11:31:04 CET] <Akien> issue: https://github.com/hrydgard/ppsspp/issues/11490
[11:31:24 CET] <Akien> TL;DR: Issue triggered by an API change in FFmpeg 3.1 for AVStream: https://github.com/hrydgard/ppsspp/issues/11490#issuecomment-436589320
[11:32:18 CET] <Akien> And this is the code that works well with 3.0.x but produces stuttering in 3.1+: https://github.com/hrydgard/ppsspp/blob/master/Core/HW/MediaEngine.cpp#L245-L277
[11:33:06 CET] <Akien> From what I understand of https://github.com/FFmpeg/FFmpeg/commit/9200514ad8717c63f82101dc394f4378854325bf I guess the AVStream needs some more configuration now?
[11:35:28 CET] <Akien> (This was done in part here, fixing the garbled output, but not the choppiness: https://github.com/hrydgard/ppsspp/commit/7a7c655615a4f607ea2e6bc58dc8ca3e4b535eca )
[11:40:38 CET] <RandomUser8787> hello all. im new to developing with libav libs and im currently having some issues with memory leaks which i dont quite understand. im getting UYVY422 pixel data from a capture device which i copy to a frame. this frame i then run through a filtergraph and then the filtered frame i transfer to the gpu for encoding (nv12). after each frame is encoded i free all frames but im seeing leaks from the filter graph, avcodec_send_frame
[11:42:30 CET] <RandomUser8787> i have looked at the ffmpeg filter and vaapi encode code examples but obviously im missing something...
[12:58:24 CET] <RandomUser8787> hmm looks like i should have done unref instead of free
[13:44:34 CET] <RandomUser8787> or no that didnt really change anything
[14:41:10 CET] <zanijwa> Does the precompiled versions of ffmpeg not have https support enabled by default? I'm using youtube-dl and it gave an error 'https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled'
[14:41:21 CET] <zanijwa> SO did say to recompile ffmpeg
[14:41:59 CET] <zanijwa> So if I do this by myself, should I pass the entire path to my compiled ffmpeg whenever I need to call it?
[14:42:34 CET] <zanijwa> Because I prefer automatic updates provided by the Ubuntu package maintainers
[14:54:28 CET] <^Neo> good morning friends, is the idea with 4.X now that av_frame_get_best_effort_timestamp / av_frame_get_pkt_duration / av_frame_get_pkt_size is to access the data members directly?
[14:56:24 CET] <kepstin> ^Neo: yeah, just access the data members directly.
[14:59:14 CET] <ariyasu> zanijwa it does just add it to the whitelist
[15:22:10 CET] <santamarta> I am trying to make a long presentation to record in a bluray under linux. It has 21 images and 18 long audios (~1 hr each, but different length each), mostly voice, with some music here and there. The whole audio encoded to .m2ts is ~200M long. The unencoded .jpg images are ~25M. I tried to encode the images to h264, each image is static and most of the audios show only one image, but some of them have two. The result was a 3.7G file.
[15:23:07 CET] <santamarta> my question is... There is a way to encode the images in a lower size file that is compatible to dvd or bluray format ?
[15:23:25 CET] <durandal_1707> there are some options for still picture
[15:23:38 CET] <furq> -tune stillimage
[15:23:48 CET] <santamarta> yes, I am using that
[15:23:53 CET] <furq> pastebin the full command
[15:24:03 CET] <kepstin> the requirements for bluray video specify a fairly short keyframe interval, so the video's gonna be big
[15:24:06 CET] <kepstin> no way around that
[15:24:09 CET] <furq> how short
[15:24:35 CET] <santamarta> it is small: ffmpeg -f concat -safe 0 -i Covers.txt -vf "scale=1920:1080,format=yuv420p" -c:v h264 -tune stillimage portadas2.mp4
[15:25:00 CET] <furq> that's not actually bluray compatible so i'm surprised it turned out that big
[15:25:03 CET] <kepstin> I think 1 second gop length
[15:25:15 CET] <kepstin> i.e. 30 frames for 30fps
[15:26:05 CET] <kepstin> (although many players apparently accept longer values, particularly the ps3 and software players that also do arbitrary h264 high stuff)
[15:27:02 CET] <furq> well yeah you need -x264-params bluray-compat=1
[15:27:10 CET] <furq> and maybe also -g 30 but i guess bluray-compat might set that
[15:27:13 CET] <furq> or -g 25 rather
[15:27:53 CET] <santamarta> thanks, furq
[15:27:58 CET] <furq> bear in mind bluray also supports 720p
[15:28:06 CET] <furq> so i guess if you care about size then 720p24 is good
[15:28:48 CET] <santamarta> I will try... 1080p is important because the images are text, but maybe coud go with more images
[15:46:24 CET] <santamarta> could this be solved using a lower framerate ?. Time resolution is not critical at all, a 5 seconds difference causes no problem
[15:46:41 CET] <kepstin> I think 24fps is the minimum
[15:47:01 CET] <kepstin> but given that the keyframe interval is set based on realtime, that's not likely to make a noticable difference
[15:49:30 CET] <kepstin> hmm, it sounds like you can use longer gop when the bitrate is lower. up to 2 seconds if you're under 15mbit/s, which should be true of a video made from mostly still images
[15:50:53 CET] <kepstin> if you want the video to fit within a particular size, i'd suggest using a 2-pass bitrate encode with bluray compatible options, and just see if the quality is acceptable
[15:51:45 CET] <kepstin> and if you don't actually need blu-ray compatibility, the video can be made a lot smaller :/
[17:01:28 CET] <gh0st3d> Hey everyone... I'm trying to take a video file and create a gif from 1s to 11s that also includes an overlay... I previously got it to include the overlay while creating the gif, but the colors on the overlay were messed up because of the palette thing. For now, I'm making it add the overlay to the video, then creating the palette and the gif
[17:01:47 CET] <gh0st3d> However, it definitely was much faster the other way... Is there anyway to generate the palette from 2 files separately? Here's my commands: https://pastebin.com/eRcRY89E
[17:02:31 CET] <TheAMM> You'll have to overlay when creating the palette
[17:02:50 CET] <TheAMM> You don't have to render the overlay on the video and encode that to a file, you can add the overlay filter before the palettegen
[17:03:05 CET] <gh0st3d> Ok, let me try rearranging that and see if I can get it figured out
[17:03:05 CET] <TheAMM> The paste isn't loading for me right now so I can't comment on the commands
[17:03:43 CET] <TheAMM> but ffmpeg -i in.mkv -vf "overlay=<...>, palettegen" palette.png
[17:12:13 CET] <gh0st3d> Oh sweet, got it this time. I thought I tried something similar before but just got a bunch of errors. Is there anyway to compress the gif output with FFMPEG or do you need other software installed to do that?
[17:21:27 CET] <kepstin> not sure what you mean by "compress", ffmpeg can generate gif animations directly, but depending on the original content it may be possible to optimize them better manually or with other tools.
[19:12:03 CET] <mooniac> is it possible to use two videos of the same length, and make one a smaller inset in one of the corners of the other video? I think that's sometimes called a "mashup"?
[19:14:03 CET] <pink_mist> https://www.daniel-mitchell.com/blog/video-in-a-video-ffmpeg/
[19:14:58 CET] <mooniac> woohoo, thanks.
[19:15:50 CET] <pink_mist> never tried doing that myself though, so I can't speak to the effectiveness of that blogpost
[19:16:14 CET] <mooniac> but it's a good start for me. If it doesn't work, I'll be back here :)
[19:22:07 CET] <ChocolateArmpits> mooniac, actually it's called picture in picture "PiP"
[19:22:20 CET] <mooniac> thx
[19:32:14 CET] <Aerroon> i have a bunch of audio files
[19:32:46 CET] <Aerroon> and i'd like to put a static image and stretch it across the entire file to basically make a "video" wher eit plays the audio and shows that one specific image
[19:33:04 CET] <Aerroon> what should i do to have the "fastest render time"?
[19:33:20 CET] <Aerroon> the normal way of doing it that i figured out i'm basically just rendering out a new video
[19:41:29 CET] <pink_mist> no idea, something like: ffmpeg -i pic.png -i audio.mp3 -c:a copy -c:v libx264 -tune stillimage out.mkv perhaps?
[19:48:14 CET] <atomnuker> keep in mind that'll make a video
[19:48:37 CET] <atomnuker> if you want a single frame you have to encode to a temporary file
[19:48:53 CET] <atomnuker> and then use stream copy on that single frame stream along with your audio stream
[19:49:28 CET] <atomnuker> some players like vlc won't display it correctly though, but most will, including browsers
[19:50:03 CET] <atomnuker> it'll save you a lot of bits though so its worth it
[19:50:43 CET] <atomnuker> but if the container supports it you can add the cover art disposition which will make it work with pretty much anything
[19:54:27 CET] <Aerroon> i see
[19:54:28 CET] <Aerroon> thanks
[19:54:45 CET] <Aerroon> the bits bit isn't important for me, i'm more interested in it not taking a long time to encode
[19:54:50 CET] <Aerroon> but your solution likely does both
[20:37:44 CET] <Aerroon> from tests it seems i'm gonna go with
[20:37:47 CET] <Aerroon> ffmpeg -loop 1 -i image.png -i audio.wav -shortest -c:v libx264 -tune stillimage -c:a copy result.mkv
[20:38:06 CET] <Aerroon> but this means it'll have to encode it as though it's just a normal video
[20:38:20 CET] <Aerroon> any recommendations for a faster video codec?
[20:38:38 CET] <Aerroon> ohh, ig uess i could try gpu encoding
[20:39:10 CET] <pink_mist> mjpeg?
[20:39:56 CET] <Aerroon> that doesn't seem faster
[20:42:03 CET] <Aerroon> hmm, it seems the encoding speed isn't even limited by that
[20:42:14 CET] <Aerroon> i think it might be the loop 1 argument
[20:43:40 CET] <durandal_1707> -loop 1 -- will decode image all over again
[20:43:57 CET] <Aerroon> yep, that would be consistent with what i'm getting
[20:44:11 CET] <Aerroon> i guess that was the point of the earlier stream copy comment
[20:45:06 CET] <mmu_man> plop
[20:45:11 CET] <mmu_man> anyone seen my metadata patch?
[20:45:34 CET] <durandal_1707> wrong channel for patch talk
[20:49:21 CET] <mmu_man> eh
[20:59:56 CET] <analogical> I just encoded a sound file to FLAC but the the resulting file become 24-bit although the source file is 16-bit. How do I force FFmpeg to encode to 16-bit FLAC ??
[21:02:34 CET] <dreamseeker> run an ffmpeg -i input_file.flac command and pastebin the output for us
[21:02:49 CET] <dreamseeker> er
[21:02:57 CET] <dreamseeker> ffmpeg -i input_file.foo I mean
[21:03:04 CET] <dreamseeker> whatever extension the input file is
[21:09:30 CET] <Aerroon> oof
[21:11:07 CET] <Aerroon> speed=1.14e+03x
[21:32:10 CET] <Aerroon> >Too many packets buffered for output stream 0:1.
[21:32:21 CET] <Aerroon> it's an audio stream copy
[21:32:32 CET] <Aerroon> thats 2.5 hours long
[21:32:50 CET] <Aerroon> -max_muxing_queue_size 4000 fixes it but i have no idea what that means
[21:34:30 CET] <JEEB> Aerroon: ffmpeg.c wasn't for one reason or another capable of initializing the muxer until then
[21:35:00 CET] <JEEB> so it makes a queue and sticks the AVPacket there
[21:35:38 CET] <JEEB> and the option you set controls the size of that queue
[21:35:54 CET] <Aerroon> i see
[21:36:21 CET] <JEEB> the better question is why it decides it cannot initialize the muxer (the thing that writes them packets into a container and into a file/stream)
[21:49:25 CET] <Aerroon> i don't know either
[21:49:43 CET] <Aerroon> because i did demux this audio stream with -c:a copy from another file
[21:50:38 CET] <Aerroon> i get the too many packets buffered for output stream 0:1 (which is audio
[21:50:42 CET] <Aerroon> from a file i made with
[21:50:44 CET] <Aerroon> ffmpeg -stream_loop -1 -i image.mp4 -i audio.m4a -shortest -c:v copy -c:a copy out.mkv
[21:51:07 CET] <Aerroon> image.mp4 is a video that consists of one frame
[21:51:39 CET] <Aerroon> but the problem appears on the audio stream which demuxed just fine before i put it together with the image
[23:04:41 CET] <SneakySnake> Do I really have to do wizardry like this to mix an audio stream with a video while also lowering the original video's volume? https://superuser.com/a/769195
[23:04:55 CET] <SneakySnake> Is there a simpler way?
[23:05:11 CET] <SneakySnake> I can't even comprehend what is going on here
[23:23:26 CET] <SneakySnake> Okay, I think I figured it out.
[00:00:00 CET] --- Fri Nov 9 2018
More information about the Ffmpeg-devel-irc