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

burek burek021 at gmail.com
Sun Jan 6 03:05:01 EET 2019


[02:46:47 CET] <cluelessperson> hey, I want to convert a lossless h264 video to a lossless compressed format?
[02:46:49 CET] <cluelessperson> or is that possible?
[02:46:52 CET] <cluelessperson> what do you suggest?
[03:28:26 CET] <furq_> cluelessperson: lossless h264 is already compressed pretty well
[03:39:49 CET] <kepstin> you can of course convert from any lossless compressed codec to any other lossless compressed codec without loss.
[03:40:09 CET] <kepstin> if you'd prefer it to be in ffv1 or something instead. It might be bigger or smaller depending on content.
[03:40:49 CET] <kepstin> (if you have a *lossy* h264 video, don't do that - it'll just become huge for no reason)
[04:15:17 CET] <cluelessperson> furq_: well this it's probably lossy to begin with
[04:15:26 CET] <cluelessperson> I like to convert small clips to share into webm
[11:57:28 CET] <strk> how can I create a video from an audio file and a set of images ? Ideally with transition for images
[12:05:01 CET] <ariyasu> https://trac.ffmpeg.org/wiki/Slideshow#Addingaudio
[12:13:09 CET] <strk> and, how to reduce quality of audio ? I have a .flac but it is too big to publish
[12:13:43 CET] <durandal_1707> strk: transcode to lossy codec
[12:17:11 CET] <strk> ok, doing that part, now back to the slideshow
[12:18:49 CET] <strk> ffmpeg -framerate 1/5 -i Img/pic%04d.jpg -i in.mp3 out.avi # generates a file that VLC considers broken
[12:19:09 CET] <strk> maybe this is related: [swscaler @ 0x55654ee8bda0] deprecated pixel format used, make sure you did set range correctly
[12:19:16 CET] <durandal_1707> nope
[12:19:25 CET] <strk> vlc says: Because this file index is broken or missing, seeking will not work correctly.
[12:19:46 CET] <strk> pSelecting "Play as is" still complains: [00007fe838c178a0] avi demux error: no key frame set for track 0
[12:31:44 CET] <strk> I don't understand that wiki page, it mentions "adding audio" but it doesn't add the audio to the slideshow animation, only to a still image ?
[12:31:52 CET] <strk> ie the "poster" image
[12:40:08 CET] <strk> I'm copying some instructions elsewhere, they mention using -b 4M, but ffmpeg says: Please use -b:a or -b:v, -b is ambiguous
[12:45:06 CET] <strk> odd, mplayer plays it "fine"
[12:48:15 CET] <strk>     Stream #1:1: Video: png, rgb24(pc), 700x700 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
[12:48:24 CET] <strk> but the input is made of .jpg, can that be the problem with vlc ?
[13:08:38 CET] <strk> can I ask ffmpeg to "fill" input images that are not in the output size ?
[13:09:00 CET] <strk> or do I have to do this before putting them togheter ?
[14:55:12 CET] <strk> how do I add an audio stream to an mp4 ?
[14:56:27 CET] <furq_> strk: -i foo.mp4 -i bar.m4a -map 0 -map 1:a -c copy baz.mp4
[14:57:33 CET] <strk> does that work with mp3 input ?
[15:05:05 CET] <furq_> sure
[15:08:59 CET] <strk> cool, I'm almost there, complex generator script but very close
[15:09:21 CET] <strk> what's the switch to force already exists. Overwrite ?
[15:11:49 CET] <furq> -y
[15:13:51 CET] <strk> thanks
[15:17:57 CET] <strk> how to deal with [swscaler @ 0x5578173a8560] deprecated pixel format used, make sure you did set range correctly
[15:50:18 CET] <th3_v0ice> Guys, what does this error returned from decoder mean: "Error number -16976906 occurred"?
[15:57:40 CET] <strk> alright, I'm all set now
[16:23:38 CET] <strk> (how) can I extract length of an audio file via ffmpeg ?
[16:23:40 CET] <strk> in seconds
[16:26:24 CET] <strk> ffmpeg -i thing.mp3 2>&1 | grep Duration # gets me close
[16:47:18 CET] <Mavrik> strk, use ffprobe and one of its structured outputs
[16:47:28 CET] <Mavrik> never parse user-facing / debut output of tools, c'mon :)
[16:48:28 CET] <Peetz0r> Hey! I'm trying to mix some different inputs (x11grap, mjpeg stream, v4l2 device, and alsa audio) into one stream and stream that to twitch. All this on a Raspberry Pi 3A+ using h264_omx. This is now 50% working.
[16:49:28 CET] <Peetz0r> But I'm having some issues with performance and audio. I think that one of the problems might be that my mjpeg source has a very irregular framerate. I have tried using the fps filter to fix it at 30fps, but that has only reduced performance even further
[16:49:53 CET] <BtbN> Decoding the mjpeg stream might be too much for the CPU
[16:50:08 CET] <BtbN> Specially paired with all the other stuff you make it do
[16:50:57 CET] <Peetz0r> When I make it only transcode the mjpeg thing into h264 and stream that to twitch, performance is finw
[16:51:10 CET] <Peetz0r> When it's running all the things, only 1 cpu core is loaded, the other 3 are mostly idle. So I guess there's only 1 thread in ffmpeg doing muhc work
[16:51:18 CET] <Peetz0r> Is there a way to find out what that would be?
[16:51:31 CET] <BtbN> Yes, ffmpeg.c is entirely single-threaded.
[16:51:46 CET] <BtbN> And the task isn't something that could be easily multithreaded
[16:52:09 CET] <BtbN> So it's very unlikely a Pi is ever going to be able to do all that
[16:52:37 CET] <Peetz0r> aahw
[16:52:43 CET] <Peetz0r> but it's coming pretty close actually
[16:53:42 CET] <Peetz0r> But if fmpeg is singlethreaded, what does the -threads option do?
[16:54:56 CET] <Peetz0r> brb putting all my stuff in a git repo to make my life easier
[16:55:15 CET] <BtbN> ffmpeg.c is single threaded
[16:55:27 CET] <BtbN> individual codecs/filters aren't.
[16:56:30 CET] <strk> Mavrik: the dirty way is working fine for now. I just gave ffprobe a go but it outputs the non-structured output by default (same as ffmpeg -i ?)
[16:57:25 CET] <Mavrik> Yes, there's a parameter to give you a structured output.
[16:57:47 CET] <Mavrik> "just fire for now" means it'll just break if you feed it a slightly different file that will produce a slightly different output
[16:57:51 CET] <Mavrik> not to mention if you update ffmpeg
[16:58:42 CET] <Peetz0r> Good, because I use a few filters
[16:59:08 CET] <BtbN> Not much of what you said you use uses more than one thread
[16:59:23 CET] <BtbN> Specially x11grab is dirt slow
[16:59:35 CET] <Peetz0r> Oh, maybe I should try disabling that
[16:59:47 CET] <Peetz0r> I was expecting x11grab to be the least of my problems
[17:00:05 CET] <BtbN> It's struggling to hit 30 fps on a proper PC
[17:00:13 CET] <BtbN> Oh higher resoltuions at least
[17:00:46 CET] <Peetz0r> would there be another way to have a webbrowser screen capture in ffmpeg without x11?
[17:01:18 CET] <Peetz0r> Lemme first try this whole thing with x11grab turned off then
[17:06:28 CET] <Peetz0r> it looks like an improvement so far
[17:07:20 CET] <Peetz0r> I still get output like this: [mpjpeg @ 0xa75e30] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[17:07:37 CET] <Peetz0r> would increasing that actually help (it didn't before, but I don't really know what I'm doing)
[17:08:40 CET] <Peetz0r> yeah, it's still maxing out 1 cpu core
[17:09:18 CET] <Peetz0r> This is my current commandline: https://paste.sigio.nl/view/d625ddda
[17:10:30 CET] <Peetz0r> but if the mjpeg stream is holding me back, does anyone have a better way to capture an android phone screen?
[17:17:16 CET] <Peetz0r> I am currently using https://play.google.com/store/apps/details?id=info.dvkr.screenstream, which does mjpeg and sends one frame whenever something happens on screen
[17:17:42 CET] <Peetz0r> Which probably means it's trying to do 60fps
[17:18:27 CET] <BtbN> Those 3 overlay filters alone will max out a CPU core.
[17:19:11 CET] <BtbN> plus crop, plus transpose, plus decoding mjpeg
[17:20:07 CET] <Peetz0r> But those filters do have their own threads, right?
[17:20:34 CET] <BtbN> no
[17:20:48 CET] <BtbN> They are executed on the main thread sequentially
[17:20:53 CET] <Peetz0r> oh, that sucks :\
[17:21:07 CET] <BtbN> Each depends on the results of the previous, how would you multi-thread that?
[17:21:09 CET] <DHE> (it's a feature I've wanted to develop..)
[17:21:21 CET] <DHE> you can pipeline, having each filter work on a frame at a time and pass them along
[17:21:48 CET] <Peetz0r> DHE: anything I can do to help?
[17:21:48 CET] <BtbN> With such a complex setup with 3 parallel chains that get merged again, that seems extremely hard to get right
[17:22:09 CET] <Peetz0r> (I'm not really a developer)
[17:22:12 CET] <BtbN> And even with multithreading I have high doubts a Pi could do that
[17:22:31 CET] <BtbN> It's just really really slow
[17:22:49 CET] <BtbN> The slowest x86 will beat it by magnitudes
[17:23:04 CET] <Peetz0r> the latest Pi's are quite powerful, and so far I haven't used nearly all of the performance that's available
[17:23:19 CET] <Peetz0r> but heah, threading is hard, and I have maxed out it's singlecore performance I guess
[17:23:37 CET] <BtbN> It's 1.4GHz 32bit ARM still
[17:23:59 CET] <BtbN> x86_64 will trash it
[17:25:28 CET] <Peetz0r> isn't the A53 a 64 bit arm?
[17:25:33 CET] <BtbN> The CPU is 64 bit capable, the OS and firmware usually isn't.
[17:25:52 CET] <Peetz0r> that's lame :p
[17:26:12 CET] <BtbN> I think there is no 64bit driver for the GPU, so no omx or anything on 64bit
[17:26:38 CET] <Peetz0r> but the omx part seems to perform fine as it is right now
[17:28:09 CET] <strk> how can I specify mp4 title ? What I can do with VLC
[17:28:22 CET] <strk> Mavrik: I switched to ffmprobe meanwhile :)
[17:32:49 CET] <Peetz0r> meh, raspbian is 32 bit only for now indeed
[17:34:26 CET] <Peetz0r> brb trying https://raspberrypi.stackexchange.com/a/77707
[17:34:47 CET] <Peetz0r> I guess that will only give me the 64 bit kernel and I'll have to build a 64bit ffmpeg myself?
[17:35:05 CET] <BtbN> You won't have omx if you forcefully use a 64bit userland
[17:35:13 CET] <Peetz0r> that would be bad
[17:35:26 CET] <BtbN> The driver is closed source and 32bit only
[17:36:00 CET] <Peetz0r> h264 without omx sounds like a terrible thing to even try
[17:36:21 CET] <Mavrik> 64-bit on RPi is just a headache and nothing more
[17:36:25 CET] <Mavrik> Why do you need it? :)
[17:36:53 CET] <Peetz0r> trying to squeeze more singlecore performance out of it
[17:37:00 CET] <Peetz0r> but it probably won't help me at all
[17:37:08 CET] <Peetz0r> losing h264_omx support would kill me
[17:37:42 CET] <Peetz0r> I still believe that the Pi 3A+ should be capable of what I am doing... somehow
[17:38:10 CET] <Peetz0r> but if it isn't, is there any other sub-¬50 singleboard device that you guys would recommend?
[17:39:00 CET] <Peetz0r> (needs to be somewhat power efficient as I'm going to run it from a powerbank - but it's not too critical, it's a 100 Wh multivoltage powerbank)
[17:39:04 CET] <BtbN> I usually use Intel NUCs for everything that has to be small scale
[17:39:24 CET] <BtbN> Experience with Cheap Boards has been to horrible every single time, so I gave up on cheap.
[17:39:25 CET] <Peetz0r> Yeah, but those are somewhat above my budget for this project :(
[17:39:47 CET] <BtbN> Get a used Xeon Server from ebay
[17:40:08 CET] <Peetz0r> yeah and carry that in my backpack together with a nuclear reactor from a submarine or somthing?
[17:40:14 CET] <Peetz0r> sorry :p
[17:40:24 CET] <BtbN> You never mentioned anything about mobile.
[17:40:28 CET] <BtbN> In that case use a phone?
[17:40:30 CET] <Peetz0r> I actually have a used 2008-era dual-xeon thing at home :D
[17:41:09 CET] <Peetz0r> could I run vanilla ffmpeg on a non-rooted android phone? and connect a usb wemcam to it?
[17:41:17 CET] <Peetz0r> because if I can, that would work
[17:41:45 CET] <BtbN> no idea about USB Webcam, but a lot of apps use ffmpeg
[17:41:49 CET] <Peetz0r> (my endgoal is a portable Twitch mobile gaming setup based on 2 phones, 1 webcam, the Pi, a huge powerbank and an unlimited 4G plan)
[17:42:47 CET] <BtbN> That's most likely not going to happen for cheap
[17:43:03 CET] <BtbN> The few people I know that do that have a fully powered PC on their back
[17:43:38 CET] <BtbN> And there's a commercial product for that very purpose. They sell a backpack that does it, for 6k $
[17:43:53 CET] <Peetz0r> ew
[17:44:21 CET] <Peetz0r> I could try rigging my laptop to not overheat while in my laptop somehow
[17:44:27 CET] <BtbN> A more cheapish setup usually involved streaming to your home PC from the phone, and doing all the heavy work there
[17:44:30 CET] <Peetz0r> eh, backpack*
[17:44:41 CET] <Peetz0r> I don't really have a home pc :p
[17:45:02 CET] <BtbN> Well, you will need something powerful to do the heavy lifting, somewhere
[17:45:10 CET] <Peetz0r> I have the nuc which is the most low power one with a 2014 celeron, and I have my laptop with a i5 7200U
[17:45:33 CET] <BtbN> They will both outperform the Pi
[17:45:35 CET] <Peetz0r> the laptop could do it, but then it wil lneed to survive running in my backpack without thermal issues
[17:45:59 CET] <Peetz0r> so I guess I'll buy a 2nd backback and modify it with usb powered fans and airducts :p
[17:47:01 CET] <BtbN> You usually want something that's on a stable connection, so the stream doesn't die every 5 minutes
[17:49:42 CET] <furq> Peetz0r: if the mjpeg input is from a usb2 camera then you might want to try the offical picam thingy
[17:49:56 CET] <furq> iirc that isn't over usb2 so you can get 720p30 out of it without having to decode mjpeg
[17:50:37 CET] <furq> mmal on a pi does support decoding mjpeg but i don't think ffmpeg supports it yet
[17:50:46 CET] <Peetz0r> no, the mjpeg is from my phone capturing Pokemon Go using this app: https://play.google.com/store/apps/details?id=info.dvkr.screenstream
[17:50:57 CET] <furq> oh fun
[17:51:27 CET] <furq> well yeah if you can get rawvideo or h264 out of that or a similar app then that's worth looking into
[17:51:28 CET] <Peetz0r> THis is what I am trying: https://www.twitch.tv/videos/359206040
[17:51:31 CET] <BtbN> The GPU will be busy encoding h264 anyway, but not of much help decoding
[17:51:42 CET] <furq> i remember other people in here have had terrible issues trying to decode mjpeg in realtime on a pi
[17:51:49 CET] <Peetz0r> but with smooth 30fps, and audio :D
[17:51:57 CET] <BtbN> The Pi only has USB interfaces as well
[17:52:04 CET] <furq> the camera interface isn't usb iirc
[17:52:10 CET] <BtbN> so more than 100Mbit/s isn't going to come in stable via network
[17:52:12 CET] <furq> but yeah everything else is kind of bad
[17:52:19 CET] <furq> you won't even get 100mbps on a 3A
[17:54:32 CET] <Peetz0r> my current camera is a usb webcam. would using the official pi cam give me better performance, or would it be the same?
[17:54:53 CET] <Mavrik> I don't get why you don't use builtin streaming on your phone :(
[17:54:54 CET] <Peetz0r> I also don;t need 720p from the webcam, 1/3rd of that is fine. But I do need it rotated
[17:55:13 CET] <furq> Mavrik: i'm guessing he wants to do some trick overlay stuff
[17:55:14 CET] <Peetz0r> Mavrik: because that won't let me have a layout like that
[17:55:25 CET] <furq> you could maybe try running ffmpeg on your phone
[17:55:27 CET] <furq> if it's rooted
[17:55:35 CET] <Mavrik> That'll eat away all the CPU :)
[17:55:54 CET] <Mavrik> Anyway, still seems like an insane setup when that could be done on some datacenter :P
[17:56:17 CET] <Peetz0r> but I like insane :D
[17:56:20 CET] <furq> i was going to say you could use omx/mediacodec depending on the phone
[17:56:29 CET] <furq> but honestly yeah just rent a cheap vps and send your screen to that
[17:56:38 CET] <furq> then run ffmpeg on there
[17:57:06 CET] <Peetz0r> What method/app would you guys use to send your phone screen to somewhere?
[17:57:43 CET] <Peetz0r> I think the app I am currently using is not the best choice from a performance standpoint, but most alternatives are nonfree or have watermarks or ads or timelimits
[17:57:51 CET] <Peetz0r> (or all of the above)
[17:58:13 CET] <Mavrik> furq, mhm, there's a whole video capture pipeline which is rather efficient, but as soon as you want to pull frames from the compositor and feed them to MediaCodec yourself, you add a lot of CPU use
[17:58:21 CET] <Mavrik> And CPU will be busy chewing through pokemons :P
[17:58:22 CET] <Peetz0r> maybe I should dive in and make my own app specifically for my own purpose
[17:59:25 CET] <Peetz0r> well, my current setup already has 2 phones, 1 for running pokemon go and the other basically just as a glorified 4G modem
[17:59:58 CET] <Peetz0r> one reason to keep those seperate is to never get any personal notifications on my stream
[19:16:31 CET] <strk> how to deal with: Input link in14:v0 parameters (size 3120x4160, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1280x960, SAR 1:1)
[19:16:52 CET] <strk> the size is the size of one of the images passed to ffmpeg for creating the slideshow
[19:18:29 CET] <strk> I'm passing it something like: -filter_complex " [0:v]scale=1280:960:force_original_aspect_ratio=decrease,pad=1280:960:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=out:st=16:d=1[v0];
[19:18:33 CET] <strk> etc.etc.
[19:18:55 CET] <strk> ah, my fault
[19:26:45 CET] <strk> ok, now my fault
[19:29:55 CET] <strk> what's setsar ?
[19:32:02 CET] <strk> passing 3120:4160 to the scale and pad params seems to fix it
[19:35:06 CET] <strk> but produces a huge video
[19:37:55 CET] <iive> sar = sample aspect ratio
[19:38:40 CET] <strk> so "setsar=1" means ?
[19:43:34 CET] <iive> square pixels
[19:45:16 CET] <strk> why does ffmpeg complains of non-matching inputs ? in an earlier run it did not complain
[19:46:18 CET] <strk> and the other run also had a number of disparate sizes
[19:46:19 CET] <iive> DVD 16/9 movies are using 720x576 resolution image, the resolution is 4/3, but since it has non-square pixels.
[19:46:26 CET] <strk> could it be that the very first image rules the error ?
[19:46:40 CET] <strk> like, the very first input in my previous run was JPEG 720x1280 720x1280+0+0 8-bit sRGB 247KB 0.020u 0:00.019
[19:46:58 CET] <strk> while this run is a JPEG 4160x3120 4160x3120+0+0 8-bit sRGB 5.404MB 0.000u 0:00.000
[19:47:20 CET] <iive> not really sure. but you can start with a single filter and add them until you get the error.
[19:47:30 CET] <strk> I was using 1280x720 before
[19:47:35 CET] <iive> filters are separated by ","
[19:48:00 CET] <strk> my goal is to _set_ an output size and either scale larger images or pad smaller ones
[19:48:41 CET] <strk> the slideshow is now completed, but it is a 90MB file, with 3120x4160 resolution
[19:48:48 CET] <strk> anything smaller complained ...
[19:53:34 CET] <strk> is there a quick way now to reduce the resolution of that video stream ?
[20:17:43 CET] <furq> strk: pastebin the entire command somewhere
[20:49:45 CET] <strk> furq: http://strk.kbt.io/tmp/slideshow.cmd
[23:18:44 CET] <fuxxy> Is there a way to scan a folder of movies and show the default audio stream for each?
[23:20:20 CET] <pink_mist> should be easy to script, probably
[23:20:58 CET] <fuxxy> That's what I was thinking, but can't find the option to show the audio stream
[23:45:52 CET] <arejay> fuxxy - could use ffprobe
[23:47:34 CET] <fuxxy> I saw that, I'm playing with that now
[23:48:49 CET] <fuxxy> I'm only looking to display the default audio stream's language
[00:00:00 CET] --- Sun Jan  6 2019


More information about the Ffmpeg-devel-irc mailing list