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

burek burek021 at gmail.com
Wed May 9 03:05:01 EEST 2018


[00:00:04 CEST] <Durandal> I just want to do -af "volumedetect" on a file. On linux I would try just forwarding stdout >/dev/null, but I don't know what to do on windows
[00:00:06 CEST] <Derisar> kepstin, I've changed the comand, thx
[00:00:36 CEST] <kepstin> Durandal: you should be able to redirect output to the special file 'NUL', i think. Also note that if you use "-f null" then you can put anything as the output filename and it'll be ignored.
[00:02:01 CEST] <Durandal> so, "ffmpeg -i input.m4a -af "volumedetect" -f null null" ?
[00:02:19 CEST] <kepstin> Durandal: I ususally end up doing "-f null -" since it's less typing :)
[00:03:00 CEST] <Durandal> awesome, that seems to work
[00:03:46 CEST] <Durandal> It also helps to throw in -map 0:a:0 if there's video, otherwise it will try and decode the video stream
[00:03:48 CEST] <Durandal> thanks
[00:44:29 CEST] <TheRock> hi
[00:44:39 CEST] <TheRock> got stuck in the configuration
[00:44:42 CEST] <TheRock> https://nopaste.linux-dev.org/?1181246
[00:45:06 CEST] <TheRock> That file contains a png    Stream #0:1: Video: png, rgba(pc), 200x200 [SAR 3780:3780 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
[00:45:12 CEST] <TheRock> but my ffmpeg is configured to serve png
[00:45:21 CEST] <TheRock> I assume a parser/demuxer is missing, which?
[00:46:07 CEST] <JEEB> that really looks like it got decoded
[00:46:10 CEST] <TheRock> other than that most of the audios contain an image can be viewed
[00:46:33 CEST] <TheRock> but this mp3 doesn't report an error, it just doesn't show the image
[00:46:42 CEST] <TheRock> before i had not png in the configuration, there was an error at least
[00:47:02 CEST] <TheRock> now i just hear the music
[00:47:04 CEST] <TheRock> but no image
[00:47:15 CEST] <JEEB> I'm pretty sure that's just because it's set as not a real video track but rather an attachment image kind of thing
[00:47:20 CEST] <JEEB> there was a flag for that :P
[00:48:44 CEST] <TheRock> VLC does show the image for exdample
[00:49:09 CEST] <drathir> TheRock: how mediainfo see it ?
[00:49:41 CEST] <JEEB> TheRock: the track is there and you can decode it. pretty sure it's just the flag if you're using ffmpeg.c :P
[00:49:53 CEST] <TheRock> i'm actually using QtAv
[00:50:24 CEST] <JEEB> anyways, it's pretty simple to open an lavf context and try decoding the track. you should be able
[00:50:53 CEST] <TheRock> so, from my configuration the image is decoded and it's rather programatically thing?
[00:50:54 CEST] <JEEB> I think it's like 15-20 lines
[00:51:04 CEST] <JEEB> most likely yes, looking at that output
[00:51:12 CEST] <JEEB> you're clearly having the png decoder
[00:51:15 CEST] <TheRock> the output is from ffprobe
[00:51:21 CEST] <JEEB> from your own build?
[00:51:33 CEST] <TheRock> no from my own build, from apt-get ffmpeg
[00:51:36 CEST] <TheRock> not*
[00:51:57 CEST] <JEEB> anyways, look at the doc/examples dir, and try opening the mp3 in a lavf context, then checking for best v/a tracks
[00:52:01 CEST] <JEEB> and/or iterating through the tracks
[00:52:36 CEST] <JEEB> and then if you have the png decoder (however it's called), you get it decoded just fine :P
[00:52:48 CEST] <TheRock> sounds like a shitload of work
[00:52:51 CEST] <TheRock> just to show an image
[00:52:51 CEST] <JEEB> eh
[00:53:12 CEST] <JEEB> a 15-20 lines of code to check that your thing has it since you haven't built the cli tools to quickly check?
[00:53:23 CEST] <JEEB> why yes, that's a fuckload of work thank you very much
[00:53:23 CEST] <TheRock> I don't knwo if qtav has the bindings, it's just a wrapper around ffmpeg
[00:53:29 CEST] <JEEB> jesus
[00:53:41 CEST] <JEEB> let me link you the example
[00:53:59 CEST] <JEEB> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/demuxing_decoding.c;h=69a31a893519cdb91bd1f39cad6b7df02b160e59;hb=HEAD
[00:54:02 CEST] <JEEB> there
[00:54:06 CEST] <JEEB> and that's got a crapload extra
[00:54:08 CEST] <JEEB> which you don't need
[00:54:27 CEST] <JEEB> (also it uses the old API for decoding, which is bad)
[00:55:42 CEST] <JEEB> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/transcoding.c;h=a83fa3a185817ad9d2125ec6a10a1f0c48ed4b20;hb=HEAD#l53 there, you are interested of up until line 85
[00:55:59 CEST] <JEEB> you open input, finde the decoder for the image stream
[00:56:11 CEST] <JEEB> allocate a decoder and if it doesn't fail - congratulations
[00:56:21 CEST] <JEEB> you have the decoder and it's somewhere in what you're using
[00:56:32 CEST] <TheRock> Good, I'll have a look
[00:57:20 CEST] <JEEB> also the transcoding example was updated to the new push/pull decoding API which is nice
[00:58:12 CEST] <JEEB> also just enabling ffprobe is another way :P
[00:58:31 CEST] <JEEB> although it's good to know that the FFmpeg APIs are not exactly too complex
[00:59:03 CEST] <JEEB> (details are details, but getting the basic loop going for demuxing or decoding is not)
[01:00:00 CEST] <TheRock> yeah
[01:00:13 CEST] <TheRock> i just run a quick full configured ffmpeg test
[01:00:22 CEST] <TheRock> like i said, mjpeg is rendered as expected
[01:00:34 CEST] <TheRock> but png aren't
[01:00:56 CEST] <JEEB> whatever that means
[01:01:06 CEST] <TheRock> just want to be sure there isn't a decoder/whatever missing
[01:01:10 CEST] <TheRock> before i go programatically
[01:01:27 CEST] <JEEB> stop being a lazy bum and enable ffprobe if you care that much!
[01:01:34 CEST] <JEEB> then you will see if it will see it
[01:02:21 CEST] <TheRock> yep
[01:02:31 CEST] <JEEB> that way your own ffprobe will use your libraries and you will see if anything is amiss
[01:02:54 CEST] <TheRock> that's a good plan
[01:03:54 CEST] <TheRock> I already took extra work to get zlib integrated which was needed for png.
[01:11:43 CEST] <JEEB> TheRock: I think it's only needed for the png encoder?
[01:11:47 CEST] <JEEB> although I might misremember
[01:17:49 CEST] <TheRock> not sure
[01:18:18 CEST] <TheRock> probably requires zlib, since png is compressed with that
[01:19:28 CEST] <JEEB> ok, both need zlib
[01:19:41 CEST] <JEEB> png_decoder_deps="zlib"
[01:19:41 CEST] <JEEB> png_encoder_deps="zlib"
[01:21:14 CEST] <JEEB> also apng and png decoders are separate :P
[01:21:24 CEST] <JEEB> so if you enabled one but not the other
[01:23:26 CEST] <TheRock> i'm just looking into zlib now
[01:23:33 CEST] <TheRock> i got some warnings during compliation
[01:24:18 CEST] <TheRock> but i don't think that isn't the problem at all
[01:26:14 CEST] <JEEB> most likely not if the library loads and you have zlib in :P I saw the "apng" decoder in your configuration but I'm not sure if I saw png
[01:26:26 CEST] <JEEB> also do enable ffprobe in your FFmpeg configuration for debugging
[01:28:49 CEST] <drathir> there is known any security issue with --enable-libzvbi ?
[01:29:42 CEST] <TheRock> I just opened a raw .PNG in my player which used this configuration i posted
[01:29:46 CEST] <TheRock> renders perfectly
[01:30:05 CEST] <TheRock> so zlib and png deocder both are working
[01:31:12 CEST] <TheRock> now i opened another .png *doesn't render*
[01:34:50 CEST] <drathir> TheRock: file and check differencies between them, maybe some options of this files differ ?
[01:35:40 CEST] <TheRock> yeah, i hope to find it out
[10:46:27 CEST] <JC_Yang> when av_read_frame() encountered error when reading a stream from network, do I need to abandoned the AVFormatContext and use a new one to retry?
[10:52:16 CEST] <JEEB> JC_Yang: I think it might set itself EOF
[10:53:28 CEST] <JEEB> so you might have to clear and re-init one
[10:53:47 CEST] <JC_Yang> okay, get it.
[11:30:41 CEST] <JC_Yang> suppose I ctx = avformat_alloc_context and the avformat_open_input(&ctx...) when failed, should I call avformat_free_context or avformat_close_input() to cleanup? and how about when success?
[11:36:08 CEST] <JC_Yang> I suppose the api the named properly so I'll free_context when open_input failed but close_input when success, hope this is correct usage
[12:37:29 CEST] <Mavrik> jcjordyn120: don't be afraid to look at the source of those functions to answer your questions
[12:37:32 CEST] <Mavrik> er.
[12:37:40 CEST] <Mavrik> JC_Yang who left. :(
[13:13:34 CEST] <drathir> Guys any idea if that --enable-libzvbi still working with ffmpeg build ?
[13:13:39 CEST] <JEEB> yes
[13:14:14 CEST] <JEEB> as in, I just built 0736f32a4facddbd953977ca614a3ee6d8a6e1d7 yesterday
[13:15:08 CEST] <JEEB> and yea, there have been no zvbi-related changes since
[13:15:13 CEST] <JEEB> (in master)
[13:19:21 CEST] <drathir> hmmm... wonder if there extra configuration or something needed, bc builded from source started its listed but looks like still gets problems with corectly detect dvb_teletext basing at https://trac.ffmpeg.org/wiki/ExtractSubtitles
[15:19:01 CEST] <BobOki> Hey guys, just got a Quadro P2000 and it is absolutely rocking so for for video... however I have a question. Does FFMPEG support HW transcode for audio?
[15:19:13 CEST] <JEEB> no
[15:19:24 CEST] <JEEB> also audio transcoding generally is so simple that you don't need hw encoding for it
[15:19:35 CEST] <JEEB> unless you're on a first gen rpi
[15:19:40 CEST] <JEEB> in that case you're hosed
[15:20:14 CEST] <BobOki> I figured the same... however on my plex box I was able to EASILY handle 5 4k streams, but the audio transcoding (ac3 7.1/dts/truehd) utterly trashed my older i7-2600k cpu.
[15:20:44 CEST] <BobOki> (the P2000 sat at about 6% GPU usage on those 4k streams ;P )
[15:22:16 CEST] <durandal_1707> BobOki: i only know about flac encoder that utilizes GPU
[15:22:19 CEST] <BtbN> That's because the GPU is not involved
[15:22:39 CEST] <BtbN> It's an extra chip doing the de/encoding
[15:23:39 CEST] <BobOki> Does FFMPEG have any plans to support audio de/encoding via GPU? So far the video xcoding is working quite well, I can't think of any technical limitations that it could not support audio too.
[15:24:52 CEST] <BtbN> no
[15:25:06 CEST] <iive> there is one crucial, no dsp in the sound card chips.
[15:25:21 CEST] <BtbN> GPUs are bad for video already, which is why there are dedicated chips on them.
[15:25:39 CEST] <BtbN> Audio can be processed with a few % of CPU load even on ancient hardware
[15:26:13 CEST] <BobOki> Then there has to be something else wrong... my i7-2600k was utterly crushed by only 5 audio streams.
[15:26:58 CEST] <iive> i think i7 should have more cores than that
[15:27:57 CEST] <BobOki> 4 core 8 threads...
[15:28:11 CEST] <BobOki> Mines running at 4ghz base
[15:29:49 CEST] <durandal_1707> BobOki: what codec for encoding?
[15:30:17 CEST] <BobOki> At the time, it was encoding 5 different streams.. they were AC3 7.1, DTS, and TrueHD
[15:30:41 CEST] <BobOki> And it looked like they were all being converted to either AAC or ac3
[15:31:15 CEST] <durandal_1707> transcoding lossy to lossy?
[15:31:28 CEST] <BobOki> I beleive so, yes.
[15:42:00 CEST] <furq> yeah that shouldn't trouble an i7-2600k
[15:42:32 CEST] <furq> unless decoding truehd is spectacularly slow
[15:43:57 CEST] <BobOki> hmmm guess I will go run some tests... try to see what's going on then. It did not make sense to me that audio would kill it.. but yeah ;P
[15:43:58 CEST] <BobOki> thanks all
[15:48:07 CEST] <furq> even my old core 2 at stock clocks gets 20x transcoding from dts to fdk-aac
[15:48:20 CEST] <furq> and that's singlethreaded
[16:02:28 CEST] Action: kepstin would guess they were also transcoding video by mistake using a software encoder.
[18:06:01 CEST] <th3_v0ice> Hi guys, I have been using FFmpeg C API for some time and I just noticed that after every encode (encoder opened and closed includes filters) number of threads is rising by 3. If the input sequence is long machine locks up after it creates too many threads. I am closing my encoder and filtering contexts as shown in the transcoding.c example. Am I missing some resource deallocation that should
[18:06:01 CEST] <th3_v0ice> close the threads? Thanks!
[18:19:30 CEST] <akk> Is there a way to make videos with ffmpeg that will play in firefox?
[18:19:54 CEST] <akk> I made one with ffmpeg -i img%2d.png -filter:v "setpts=6.0*PTS" video.mp4
[18:20:25 CEST] <akk> and firefox says "Video can't be played because the file is corrupt", and in the console,
[18:20:29 CEST] <akk> "Details: mozilla::SupportChecker::AddMediaFormatChecker(const mozilla::TrackInfo&)::<lambda()>: Decoder may not have the capability to handle the requested video format with YUV444 chroma subsampling.
[18:24:10 CEST] <kepstin> akk: that errors says exactly what's wrong - and ffmpeg would have printed a warning when you ran the encode telling you how to avoid the problem
[18:24:32 CEST] <kepstin> akk: anyways, add "-pix_fmt yuv420p" to the encode command and it'll work.
[18:28:48 CEST] <akk> I've tried that too -- let me try it again and verify the error message.
[18:31:35 CEST] <akk> Hmm, no -- I was getting "height not divisible by 2" (even though it was divisible by 2), but now with a different set of images it's working.
[18:32:18 CEST] <akk> And it works in firefox! I must have had some other args interfering. Thanks, kepstin.
[18:43:55 CEST] <Cracki> would anyone know why "video_track_timescale" is so hard to find documentation for?
[18:57:05 CEST] <JEEB> Cracki: timescales are specific to mov-style containers. everything else IIRC uses time base, not scale
[18:57:26 CEST] <JEEB> and I don't think we export time scales, only time bases?
[18:57:33 CEST] <Cracki> settb with -c copy complains, so this is what I used instead
[18:57:47 CEST] <Cracki> had some input with a 90k or something time base
[18:57:55 CEST] <JEEB> mpeg-ts I guess
[18:58:13 CEST] <Cracki> this exists, it needs documentation
[18:58:24 CEST] <Cracki> and all google finds is mailing lists
[18:58:31 CEST] <tuna> I am back with the hardware encoding questions....my setup seems to be calling image_copy_plane...which seems in correct, given I am using hardware input (CudaDevicePtr)
[18:58:32 CEST] <JEEB> right, it warns because by default it overrides time base in movenc.c, and then of course someone wanted an exact time base, so someone made up an option
[18:58:45 CEST] <Cracki> no...
[18:58:55 CEST] <Cracki> my input has an insane time base. -c copy copies that
[18:58:55 CEST] <JEEB> yes, movenc.c overrides the video time base by default
[18:59:05 CEST] <Cracki> such that the output mov container can't handle it anymore
[18:59:05 CEST] <JEEB> and 1/90000 isn't insane
[18:59:15 CEST] <Cracki> -filter:v settb is incompatible with -c copy
[18:59:18 CEST] <JEEB> also how on earth does mov not handle it?
[18:59:24 CEST] <JEEB> and yes, yes it is
[18:59:33 CEST] <Cracki> the mov container doesn't like this timebase
[18:59:37 CEST] <Cracki> for the duration of my material
[18:59:49 CEST] <JEEB> I know there's a warning about it, but I'm not 100% sure that's correct
[19:00:16 CEST] <JEEB> welcome to the area of things where "I wish I hadn't seen this" is the second thought I have about it
[19:00:44 CEST] <Cracki> warning? it aborted
[19:00:54 CEST] <JEEB> I didn't remember if it was an error or warning
[19:01:10 CEST] <JEEB> also IIRC there was a setting to set time base that is not specific to movenc.c
[19:01:15 CEST] <Cracki> anyway, source file is a little more "broken" than this, so I should reencode anyway
[19:01:57 CEST] <Cracki> thanks for the response in any case
[19:04:22 CEST] <JEEB> anyways, I'm pretty sure there's a way to set the time base if you don't want the input (say, MPEG-TS) time base
[19:04:47 CEST] <JEEB> also I've been meaning to check if the code for saying nope to random time bases for MOV is even correct
[19:04:52 CEST] <JEEB> but it's not like I have a lack of things to do
[19:04:57 CEST] <JEEB> unfortunately
[19:04:58 CEST] <Cracki> ;)
[19:05:50 CEST] <JEEB> there's -enc_time_base which is a per-stream option, but it's in a function that starts up encoders, so -c copy probably isn't going work with that
[19:07:29 CEST] <JEEB> { "time_base", HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(time_bases) },
[19:07:43 CEST] <JEEB> so there's a per-stream time_base option
[19:17:54 CEST] <dimi_> Hello! I am considering linking to static builds of ffmpeg without zlib and bzlib. How would that limit the formats/codecs i would be able to process? I work mostly with audio.
[19:19:44 CEST] <Cracki> are you asking legally or practically?
[19:24:38 CEST] <dimi_> practically
[19:28:05 CEST] <tuna> I am back with the hardware encoding questions....my avcodec_send_frame seems to be calling image_copy_plane...which seems incorrect, given I am using hardware input (CudaDevicePtr)..the function fails with an assertion "av_assert0(abs(src_linesize) >= bytewidth);" ......................any idea why this might be happening? I am trying to trace the source but am having little luck
[19:33:53 CEST] <tuna> it seems nvenc_copy_frame is being called, when it should not be
[19:38:18 CEST] <tuna> avcodec_send_frame calls ff_nvenc_send_frame calls nvenc_upload_frame should call nvenc_register_frame but rather it calls nvenc_copy_frame....this happens based on a switch statement: "    if (avctx->pix_fmt == AV_PIX_FMT_CUDA || avctx->pix_fmt == AV_PIX_FMT_D3D11)" when checking my avctx's pix_fmt it, in fact, is AV_PIX_FMT_CUDA...maybe this was a bug or something and this source doesnt match my download of ffmpeg??? I am on version
[19:38:23 CEST] <tuna> on the github page
[19:38:48 CEST] <tuna> if not switch ***
[19:43:25 CEST] <tuna> It appears this module underwent much change from 3.X to 4.X version
[21:17:51 CEST] <Cracki> I could puke... at uni we have these wolfvision document cameras that go to video projectors. these things are UVC devices too. the companion software can record too, but it "drifts" up and down like crazy, compared to a known good time reference
[22:03:24 CEST] <tuna_> my hardware input avcodec_send_frame calls image_copy_plane...and fails the first assertion...even though I have a AV_PIX_FMT_CUDA ...any help????
[22:52:36 CEST] <tuna_> Any nvenc hardware input h264 encoder people in here that can help??
[22:59:55 CEST] <BtbN> fix what the assertion is complaining about?
[23:25:10 CEST] <tuna_> Obviously, but the assertion makes no sense...
[23:25:50 CEST] <tuna_> I dont have a build environment for ffmpeg setup, but based on my code tracing...it seems it shouldnt assert false
[23:29:15 CEST] <tuna_> Actually...
[23:29:50 CEST] <tuna_> seems like it is iterating over my data, whern really it should only be looking at my first entry
[23:30:16 CEST] <tuna_> I hit line 363 or imgutils when really I should be hitting line 357
[23:30:18 CEST] <tuna_> I believe
[23:30:30 CEST] <tuna_> Thats the only thing that makes sense
[23:33:12 CEST] <tuna_> WEll, maybe its not a big deal...becuase although it iterates it only goes up to index 0
[23:40:06 CEST] <tuna_> BtbN: can you tell me why this is even calling image_copy_plane when its herdware input?
[23:40:41 CEST] <BtbN> Because you're doing something wrong. And there are copy functions for hw frames, so it's not entirely incorrect.
[23:41:42 CEST] <tuna_> Yea, but this eventaully gets to a memcpy
[23:42:10 CEST] <BtbN> your pix_fmt must be wrong then.
[23:42:13 CEST] <tuna_> It happens in the         res = av_frame_ref(nvenc_frame->in_ref, frame); call it seams
[23:42:17 CEST] <tuna_> seems*
[23:42:46 CEST] <tuna_> AV_PIX_FMT_CUDA is my context's fmt and AV_PIX_FMT_0BGR32 is my AvFrame's format
[23:42:49 CEST] <BtbN> that should never cause a copy
[23:43:00 CEST] <BtbN> your frames format is CUDA
[23:43:11 CEST] <BtbN> if it's a CUDA frame, the pix_fmt is CUDA.
[23:44:07 CEST] <tuna_> Yes, my AVCodecContext's pix_format is CUDA
[23:44:19 CEST] <BtbN> you just said your frame ones isn't...
[23:45:20 CEST] <tuna_> Correct, my AvFrame (input frame) is AV_PIX_FMT_0BGR32
[23:45:31 CEST] <BtbN> well, there you have your problem.
[23:45:40 CEST] <tuna_> So they both should be CUDA?
[23:45:52 CEST] <BtbN> If you're inputting a CUDA hardware frame, yes of course
[23:46:07 CEST] <BtbN> it also needs to be owned by the same context, and the sw_pix_fmt needs to be valid.
[23:47:33 CEST] <tuna_> A couple weeks back you said it had to be AV_PIX_FMT_0BGR32 for the frame though....
[23:47:48 CEST] <tuna_> when its cuda for the frame i get invalid argument error...
[23:51:47 CEST] <tuna_> What does " it also needs to be owned by the same context" mean?
[23:52:40 CEST] <BtbN> you cannot have more than one CUDA context and share data
[23:52:44 CEST] <BtbN> and yes, 0BGR32
[23:52:57 CEST] <BtbN>  is one of the two supported rgb pixel formats for nvenc
[23:53:26 CEST] <BtbN> But if you are giving it hardware frames, the primary pix_fmt is still CUDA.
[23:56:53 CEST] <bencc1> I'm trying to convert mp3 with cover image to hls:
[23:56:55 CEST] <bencc1> ffmpeg -i test.mp3 -c:a aac -b:a 128k -hls_time 2 -hls_playlist_type vod -hls_flags single_file playlist.m3u8
[23:57:05 CEST] <bencc1> ffmpeg produce non-valid hls
[23:57:14 CEST] <bencc1> mp4 works and mp3 with only audio channel works
[23:57:34 CEST] <bencc1> I'm using version 3.4.2
[23:57:39 CEST] <bencc1> can someone reproduce?
[23:58:07 CEST] <BtbN> iirc single file playlists are kinda broken
[23:58:11 CEST] <BtbN> try master
[23:58:32 CEST] <kepstin> if the cover art is the problem, try -vn
[23:58:36 CEST] <bencc1> BtbN: did something relevant changed in master?
[23:58:46 CEST] <bencc1> 3.4.2 is almost master
[23:58:51 CEST] <BtbN> no, not at all
[23:58:56 CEST] <BtbN> 3.4 was branches quite a while ago
[23:59:07 CEST] <bencc1> do you have master installed?
[23:59:13 CEST] <bencc1> any chance you can reproduce it?
[23:59:39 CEST] <BtbN> I have no idea what to possibly reproduce
[23:59:44 CEST] <BtbN> just grab a binary and test
[00:00:00 CEST] --- Wed May  9 2018


More information about the Ffmpeg-devel-irc mailing list