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

burek burek at teamnet.rs
Tue Nov 5 03:05:02 EET 2019


[06:37:40 CET] <edenist> hi everyone o/
[06:50:14 CET] <edenist> I wonder if someone would be able to offer some insite into some latency inconsistencies with different values for -crf on libx264 encodings
[06:50:19 CET] <edenist> *insight
[12:08:57 CET] <BeerLover> How to upload ffmpeg directly to AWS S3? https://gist.github.com/abhyuditjain/080449ae91588dae3d38d551a4c5353f
[12:09:31 CET] <BeerLover> I don't want to create files locally and want to save the segment files and index.m3u8 directly in S3 bucket.
[12:12:08 CET] <BtbN> you'll have to write something yourself that does that
[12:13:26 CET] <DHE> I'm no s3 expert, but ffmpeg does support HTTP PUT, so if you can give ffmpeg the necessary authentication headers shouldn't it work?
[12:13:26 CET] <BeerLover> -method PUT ?
[12:14:02 CET] <BtbN> I don't think uploading to S3 is as simple as HTTP PUT
[12:14:17 CET] <BtbN> you need to use their API, with OAuth2 auth flow, and a bunch of other stuff
[12:16:22 CET] <BeerLover> BtbN DHE you can generate Presigned urls
[12:16:32 CET] <BeerLover> with PUT as HTTP Verb
[12:16:46 CET] <BeerLover> how will segment%d.ts work???
[12:17:04 CET] <BtbN> If you can only do that per-file, that won't help you a whole lot.
[12:18:30 CET] <BtbN> https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax looking at this, this won't be a reasonably possible without custom code
[12:21:13 CET] <BeerLover> Okay. Then how can I use piping for it?
[12:21:17 CET] <BeerLover> for one file it'
[12:21:20 CET] <BeerLover> s easy
[12:21:46 CET] <BeerLover> ffmpeg -i <> -f <> - | aws s3 cp - s3://<>
[12:21:52 CET] <BeerLover> but for segments???
[12:22:08 CET] <BtbN> you can't
[12:57:04 CET] <Kadigan> Hey. So I just found out ffmpeg supports LUTs. Sadly, I can't seem to get it to work. No matter what I specify, I get "[Parsed_lut3d_0 @ (address)] 3D LUT is empty". Here's my commandline, output, and version: https://8n1.org/16190/30f8
[12:58:20 CET] <Kadigan> Maybe it's my cube format/value format, I don't know. Not sure how to even -verify- this, as I've no idea if there are different formats, and if so - which one ffmpeg supports.
[12:58:51 CET] <Kadigan> The LUTs I got from AbelCine, url to download package: https://abelcinesalesforce2.s3.amazonaws.com/article/canon-luts-for-the-c100-c300-and-c500/canon-3d-luts_v1.zip
[12:58:58 CET] <Kadigan> Ideas?
[14:03:31 CET] <kepstin> Kadigan: what does "ffprobe ./CxxxLog10toRec709_Legal.cube" say?
[14:06:45 CET] <Kadigan> kepstin: https://8n1.org/16191/a177 this
[14:07:28 CET] <kepstin> hmm. i'm not sure what I expected. I guess that means the file is some sort of raw data with no header.
[14:07:51 CET] <kepstin> the filter says it supports ".cube" files, but i dunno the exact format needed.
[14:09:10 CET] <kepstin> hmm. a camera lut is probably rgb. can you re-run your ffmpeg command with "-v verbose" so i can see if there's any inserted conversions?
[14:10:09 CET] <kepstin> well, video camera lut is probably yuv :)
[14:10:47 CET] <kepstin> how big is the lut file? (#bytes)
[14:14:09 CET] <kepstin> anyways, it looks like your ".cube" file isn't the Iridas format the filter expects, that message is printed if it doesn't find the expected file headers
[14:16:44 CET] <kepstin> it looks like most of the colour cube formats are actually text files, or at least have text headers; if yours is, the actual format can probably be identified by the first line or two.
[15:03:33 CET] <BeerLover> What is the use of -re flag???
[15:04:58 CET] <Kadigan> kepstin: the file is indeed a text file, and it does indeed have a header. Begins with "# Truelight Cube v2.0", if that helps.
[15:05:41 CET] <Kadigan> Size is exactly 884816 bytes
[15:07:09 CET] <Kadigan> Hm... I just realized I have more than one .cube format, in the damn archive. I'm ashamed to say I missed it. Hm... Give me a sec, I'll try to see if I can get any of them to load up.
[15:07:14 CET] <kepstin> Hmm. That doesn't look like one of the formats the filter can read.
[15:07:42 CET] <Kadigan> (actually more than a sec, since I'm kinda at work... and need to be seen working from time to time ;P)
[15:07:44 CET] <kepstin> If you can figure out how the format is laid out, patches welcome I guess.
[15:09:24 CET] <kepstin> BeerLover: when reading a local file, it slows it down to approx real time. Useful to livestream with a file as a source
[15:11:03 CET] <BeerLover> kepstin I have a use case where I want to transcode mp4 audio files to HLS and store them in a bucket. Then files will be served from there. Do I need this flag while transcoding? It slows the speed.
[15:11:22 CET] <BeerLover> And in the man pages it's written that it's for simulation.
[15:11:37 CET] <Mavrik> No, when you're transcoding you shouldn't use it.
[15:11:49 CET] <Mavrik> It's only when you want the transcoding process to be locked to actual playback speed and not be faster.
[15:13:26 CET] <kepstin> An example is if your input is a file and your output is rtmp to twitch
[15:15:16 CET] <Mavrik> Yeah, or playing to a remote player or something
[15:16:34 CET] <kepstin> Or hls that's pretending to be a live capture, encoding while people watch it
[17:28:00 CET] <Chagall> I am trying to build from master, my last build was some time during last month and with the same config and system (just with some packages updated) it fails with libavcodec/qsvenc_vp9.o not found. any idea what broke?
[17:30:18 CET] <Chagall> oh, another git pull brought in qsvenc_vp9.c again.
[17:30:23 CET] <Chagall> guess I pulled at the wrong time
[18:14:34 CET] <nerdnils> https://pastebin.com/JM3PkL9D why does this not work?
[18:15:27 CET] <kepstin> nerdnils: for the reason that the error message you copy/pasted very clearly explained.
[18:16:50 CET] <kepstin> i mean, i could write it out again here in chat, but i'd just be repeating what the error message already said.
[18:18:02 CET] <TheAMM> I don't want to be mean but I am kind of impressed you managed to copy, pastebin and link it here without reading it
[18:18:21 CET] <nerdnils> width not divisable by 2. i can see that but i gave no width. is it the video ffmpeg can not work with?
[18:18:53 CET] <kepstin> nerdnils: "width not divisible by 2" isn't even an error in the pastebin you linked, that's a completely different issue
[18:19:07 CET] <DHE> change -1:100 to -2:100
[18:19:09 CET] <DHE> in your scaler
[18:19:18 CET] <DHE> err, :480
[18:19:36 CET] <nerdnils> i read it already gooogled it first hit told me to change the acodec from aac to copy i chhanged the b:v from 5ß00 to 512 to be a power of two neither changed the message
[18:19:49 CET] <kepstin> nerdnils: neither of those things are width
[18:20:30 CET] <kepstin> width is referring to the number of pixels wide that the image is. when using yuv420p (4:2:0 subsampling), the width of the picture being encoded must be a multiple of two.
[18:20:52 CET] <kepstin> DHE has helpfully explained how to fix that, so do that :)
[18:21:37 CET] <nerdnils> got it, thank you
[18:22:29 CET] <nerdnils> should have read https://trac.ffmpeg.org/wiki/Scaling instead of googling it which proved to be useless. was thinking already what the ac has to do with width&
[18:22:32 CET] <nerdnils> thank you guys
[19:17:09 CET] <AmyMalik> nerdnils: are you german?
[19:56:31 CET] <nerdnils> AmyMalik, yes, why?
[19:56:37 CET] <AmyMalik> ß
[19:56:45 CET] <AmyMalik> i have to make 3 keystrokes to type that
[19:56:53 CET] <AmyMalik> it seems like you only needed to press 1 key
[19:57:05 CET] <nerdnils> right
[19:57:28 CET] <nerdnils> regardless that i never wrote that sign in here :þ
[19:57:46 CET] <AmyMalik> lol
[19:59:54 CET] <nerdnils> AmyMalik, qwertz has more keys than qwerty anyways. for example a key for <> and | left of where z is on your keyboard(where those signs are on your keyboard is öäü)
[20:00:19 CET] <AmyMalik> nerdnils: aoeuidhtns ;-)
[20:00:32 CET] <Diag> its disgusting
[20:01:55 CET] <Diag> The linux image on a board that i have came in the UK locale and i couldnt fuggin find #
[20:02:01 CET] <Diag> like what the beep yall
[20:04:45 CET] <nerdnils> Diag, just reconfigure the locales? nobody needs # for a proper command. but have a qwerty keyboard and german locales and this realy #+?!%& because the key which has | is not even on the keyboard
[20:07:12 CET] <Diag> nerdnils: i did change the locale, but the issue was that id killed X and dropped to tty and needed to comment a line in my apt sources
[20:07:24 CET] <Diag> I didnt want to delete it
[20:07:47 CET] <Diag> So im sitting there hitting all sorts of buttons, couldnt find #, had to stop what i was doing and change the locale
[20:09:31 CET] <nerdnils> does apt.source tkat /* */?
[20:09:41 CET] <nerdnils> i use arch, i don't know
[20:12:07 CET] <Diag> I dont know if it *will*
[20:12:26 CET] <Diag> ive only ever seen /etc/apt/sources.list commented with #
[20:14:51 CET] <nerdnils> if there are other lines commented out yank it?
[20:15:02 CET] <Diag> Nope lol
[20:15:10 CET] <nerdnils> copy and paste ftw
[20:15:18 CET] <Diag> taint my first rodeo
[20:15:25 CET] <Diag> euro keyboard just sucks
[20:18:45 CET] <nerdnils> no
[20:18:49 CET] <nerdnils> this is rodeo: http://bash.org/?795779
[20:19:15 CET] <Diag> alright hunter2
[20:25:13 CET] <nerdnils> yours was: Diagana Jones: Raiders of the lost key
[20:29:27 CET] <Diag> nerdnils: im actually leading the change.org petition to have the rainbow emoji key added to standard keyboards
[20:38:09 CET] <nerdnils> what about the snowman?
[21:10:09 CET] <SpeackerToMeat> Hello all
[21:10:41 CET] <AmyMalik> that's a weird name
[21:11:14 CET] <SpeackerToMeat> Question, say I have these dirs: /jpg-1/vid_######.j2c and /jpg-2/vid_######.j2c  is there any way to open them all as sequences of images to convert intop a single output video?
[21:11:27 CET] <SpeackerToMeat> can I use file template names with file lists for example?
[21:11:38 CET] <SpeackerToMeat> AmyMalik: Huh... a c slipped in somehow...
[21:11:44 CET] <SpeakerToMeat> Better
[21:12:24 CET] <SpeakerToMeat> AmyMalik: thanks
[21:12:45 CET] <AmyMalik> even so
[21:12:52 CET] <SpeakerToMeat> Diag: Maybe you can enlist the help of Tom Scott
[21:12:58 CET] <kepstin> SpeakerToMeat: with most ffmpeg builds, the image demuxer accepts unix shell glob patterns
[21:13:12 CET] <SpeakerToMeat> kepstin: So I could use the file list with that
[21:13:14 CET] <kepstin> (not sure, this might not work on windows)
[21:13:38 CET] <SpeakerToMeat> I'm on linux
[21:14:08 CET] <SpeakerToMeat> So, I should use shell globs rather than vid_%06d.j2c
[21:14:24 CET] <AmyMalik> if 06d will work then use that
[21:14:43 CET] <SpeakerToMeat> With the concat demuxer?
[21:15:03 CET] <kepstin> no, not concat demuxer. You're using the image2 demuxer if you have separate image files
[21:15:25 CET] <SpeakerToMeat> So how do I concat these directories?
[21:16:06 CET] <SpeakerToMeat> With the concat filter?
[21:16:23 CET] <kepstin> you could use a glob file pattern that selects both directories, or do each directory as a separate input and then concatenate those inputs (in theory the latter might be doable with the concat demuxer)
[21:17:04 CET] <SpeakerToMeat> It seems I could use each directory as input (with the image demuxer) and use the concat filter....
[21:17:13 CET] <kepstin> yep, that works too
[21:17:53 CET] <kepstin> (well, as long as you don't want to use -c copy)
[21:19:52 CET] <kepstin> but you probably could just do `ffmpeg -pattern_type glob -i /jpg-*/vid_*.j2c`
[21:20:10 CET] <kepstin> assuming the directories and files sort in the order you want
[21:20:29 CET] <SpeakerToMeat> ok i'll try that
[21:25:39 CET] <SpeakerToMeat> The good thing about that is thatr if I have to apply settings to the input images (set framerate and colorspace) I can do so with a single command
[21:33:36 CET] <SpeakerToMeat> The way to specify what the native rate for discrete image input was... it wasn't -r I think, it had the word fps...
[21:34:53 CET] <kepstin> SpeakerToMeat: the -framerate input option, see "ffmpeg -h demuxer=image2" or the online docs at https://www.ffmpeg.org/ffmpeg-formats.html#image2-1
[21:35:37 CET] <SpeakerToMeat> that was it. thank you kepstin
[21:39:01 CET] <SpeakerToMeat> Do we have....
[21:39:05 CET] <SpeakerToMeat> kepstin++
[21:39:09 CET] <SpeakerToMeat> Nope
[21:39:52 CET] <SpeakerToMeat> It's good anyhow, I suspect some people here would've ovreflown a karma counter by now
[21:40:01 CET] <SpeakerToMeat> overflowed
[21:40:23 CET] <pbox> hi, can anyone help me debug an error? I use this command https://termbin.com/m2rp and ffmpeg gives me an error: Option sample_rate not found. I searched online and couldn't find an answer
[21:42:02 CET] <pbox> *troubleshoot
[21:44:31 CET] <poutine> pbox: what's in $AUDIO_RATE
[21:44:40 CET] <pbox> 44100
[21:44:45 CET] <kepstin> pbox: input options go before the input they apply to. you probably intended to have the -ar option between the -f jack and the -i ffmpeg
[21:44:46 CET] <poutine> post a command after it is run through this
[21:45:22 CET] <kepstin> pbox: alternately if you want -ar as an output option, you have to put it after the last -i option (and before the output filename)
[21:46:32 CET] <pbox> first option gave the same error
[21:46:44 CET] <pbox> will try to move it before the last -i
[21:47:03 CET] <kepstin> well, the position to put it in depends what you want the option to do
[21:47:39 CET] <kepstin> that said, yeah, the jack input device doesn't support setting a sample rate
[21:48:05 CET] <pbox> maybe that was it
[21:48:06 CET] <kepstin> i guess you just get whatever jack gives you :)
[21:48:06 CET] <pbox> let me try
[21:48:44 CET] <kepstin> if you put it as an output option, ffmpeg will resample the audio to the specified sample rate before encoding to your destination file.
[21:49:39 CET] <pbox> now it's playing but I can't see the text
[21:49:51 CET] <kepstin> actually, your command has two outputs, so if you want to use -ar as an output option, you need to put it on both outputs
[21:49:55 CET] <pbox> btw can I just define the parameters once for both outputs?
[21:50:21 CET] <kepstin> no
[21:52:30 CET] <pbox> ok. Any idea why the text doesn't show?
[21:53:25 CET] <kepstin> does the text show on only on the first output and not the second? :) the -vf option is per-output.
[21:53:47 CET] <kepstin> note that if you use -filter_complex, that's a global option which is shared between all inputs and outputs.
[21:54:36 CET] <pbox> no it doesn't show in the first either
[21:55:40 CET] <kepstin> i don't see anything obviously wrong there.
[21:55:46 CET] <pbox> and I think the audio stopped streaming as well
[21:56:26 CET] <kepstin> if you use -filter_complex you will have to manually specify -map options to get the audio stream in, i think.
[21:56:58 CET] <kepstin> other than that... I've never actually used ffmpeg with jack, i dunno how it behaves
[21:57:17 CET] <pbox> and I think the audio stopped streaming as well
[21:57:21 CET] <pbox> I can get it to work
[21:57:30 CET] <pbox> with a different command
[22:03:58 CET] <SpeakerToMeat> kepstin: glob no go: "/usr/bin/ffmpeg: Argument list too long"
[22:04:18 CET] <SpeakerToMeat> I guess having a total of almost 200000 files in 8 directories was not fun for ffmpeg
[22:04:40 CET] <kepstin> you need to quote it so your shell doesn't expand it
[22:04:56 CET] <kepstin> ffmpeg does the glob internally
[22:05:35 CET] <SpeakerToMeat> Ah
[22:05:56 CET] <SpeakerToMeat> Aha
[22:06:37 CET] <pbox> hey thanks for the support, I finally got it to work
[22:06:49 CET] <pbox> one last question - I am using a python script to rewrite the file
[22:07:15 CET] <pbox> and apparently sometimes ffmpeg tries to read the file when its being written and crashes saying:
[22:07:27 CET] <SpeakerToMeat> Ok, ffmpeg glob patterns NEED an extension for file
[22:07:38 CET] <pbox> The text file 'path/to/file' could not be read or is empty
[22:07:59 CET] <kepstin> pbox: in your python script, write to a temp file then rename to the real filename
[22:08:51 CET] <pbox> gotcha :) thanks kepstin you're great
[22:09:22 CET] <SpeakerToMeat> Hmmmmm
[22:10:51 CET] <SpeakerToMeat> I have /jpg-1/movie-####.j2c up to /jpg-8  and I have /wav-1/sound.wav up to /wav-8 ... yet when I try both, the wav one fails: ffmpeg -pattern_type glob -framerate 24 -i "/jpg-*/*.j2c" -i "/wav-*/*.wav"
[22:11:11 CET] <SpeakerToMeat> /wav-*/*.wav: No such file or directory
[22:11:14 CET] <SpeakerToMeat> Yet, they exist
[22:11:37 CET] <SpeakerToMeat> I tried adding a second -pattern_type glob before the second input, no go
[22:11:52 CET] <kepstin> SpeakerToMeat: only the image2 demuxer supports the glob thing
[22:11:58 CET] <SpeakerToMeat> ah hmm
[22:12:00 CET] <kepstin> for the wav files you'll want to use the concat demuxer
[22:12:34 CET] <SpeakerToMeat> so then the image demuxer will see this as a single video, right? so I would need to -i the glob images, and -i each single wav, and then do a concat filter with v=1 and a=8 right?
[22:12:44 CET] <SpeakerToMeat> or, the concat demuxer...right
[22:12:55 CET] <kepstin> no, use the concat demuxer, then you'll have 1 video and 1 audio stream :)
[22:13:09 CET] <SpeakerToMeat> yep
[22:13:41 CET] <kepstin> note that the concat filter doesn't work that way - you'd have to use "concat=a=1:v=0:n=8" to concatentate the audio files without touching the video, since the video is already one stream.
[22:18:19 CET] <SpeakerToMeat> hmmm ok
[22:42:18 CET] <pbox> kepstin: I rename the file and I get the same error
[22:43:21 CET] <kepstin> pbox: the sequence should be "open temp file, write to it, close temp file, rename temp file to real file". Or you could use a helper library like python-atomicwrites
[22:45:03 CET] <pbox> kepstin: i closed the file and use os.rename
[22:47:49 CET] <pbox> if you know python, I do with open("txt1tmp") as file: write - and outside I use os.rename("txt1tmp","txt1")
[23:17:48 CET] <pbox> kepstin: I also tried using a shell call to the mv command which writes atomically and I et the same error
[23:18:29 CET] <pbox> s/et/get/
[23:49:03 CET] <kingsley> May I please have the benefit of your informed thoughts on why ffmpeg used to accept certain options, but now version 7:4.2.1-1 complains?
[23:49:12 CET] <kingsley> The options are
[23:49:29 CET] <kingsley> ffmpeg -i /tmp/test.mp4 -r -filter_complex showspectrum=mode=separate:color=rainbow:slide=1:scale=cbrt:size=400x226 -y -acodec copy -qp 0 /tmp/test.mkv
[23:49:43 CET] <kingsley> Version 7:4.2.1-1 complains with
[23:49:57 CET] <kingsley> [NULL @ 0x8073ae40] Unable to find a suitable output format for 'showspectrum=mode=separate:color=rainbow:slide=1:scale=cbrt:size=400x226'
[23:49:57 CET] <kingsley> showspectrum=mode=separate:color=rainbow:slide=1:scale=cbrt:size=400x226: Invalid argument
[23:53:42 CET] <c_14> kingsley: -r takes an option
[23:53:54 CET] <c_14> so it's consuming the -filter_complex
[23:54:27 CET] <c_14> -r <number>
[23:56:07 CET] <kingsley> c_14: Thank you very much! I agree, and am happy to report that appending "3-" after "-r" fixed it. I'll focus on finding out what -r wasn't passed a number by the script. Thanks again!
[23:56:38 CET] <kingsley> s/"3-"/"30"/
[00:00:00 CET] --- Tue Nov  5 2019


More information about the Ffmpeg-devel-irc mailing list