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

burek burek021 at gmail.com
Tue Jan 16 03:05:01 EET 2018


[00:01:08 CET] <durandal_1707> bobe: open trac bug  report and you will be notified when its fixed
[00:15:09 CET] <bobe> durandal_1707: I tried master, just instantly hits 5-6GB usage and then buffer queue overflows. Do you mean this bug? https://trac.ffmpeg.org/ticket/6798
[00:19:38 CET] <durandal_1707> bobe: yes
[00:21:08 CET] <bobe> durandal_1707: Thanks!
[05:59:47 CET] <MatejMecka> Hi there!
[06:00:08 CET] <MatejMecka> I'm getting Unrecognized option 'segment_listtype'
[06:00:31 CET] <MatejMecka> when using this command ffmpeg -i 01-BBC1.EastEnders.ts -deinterlace -filter_complex "[0:v]scale=416:-2:flags=lanczos[resized];[resized]split=2[in1][in2];[in1]fps=12[out1];[in2]fps=1/10[out2]" -map [out1] -codec:v libx264 -x264opts keyint=120:min-keyint=120:no-scenecut -f segment -segment_time 10 -segment_start_number 1 -reset_timestamps 1 -segment_listtype m3u8 videos%06d.mp4 -map [out2]
[06:00:37 CET] <MatejMecka> images_%06d.jpg
[06:00:50 CET] <MatejMecka> I'm using version 3.4.1
[06:01:30 CET] <furq> it's -segment_list_type
[06:03:43 CET] <MatejMecka> Thanks. Guess my mentor did a mistake while copying the command
[06:03:56 CET] <furq> !muxer segment @MatejMecka
[06:03:56 CET] <nfobot> MatejMecka: http://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment
[11:23:17 CET] <user3> Hi. Is it possible to draw a file metadata with 'drawtext' filter? Say, I have an mp3 and an image and I want to combine them and draw "Artist - Title" above the image.
[11:24:23 CET] <user3> I've tried using 'metadata' option of 'drawtext' filter with no success :(
[11:25:19 CET] <user3> Seems its purpose is not drawing file metadata but some 'frame metadata'.
[11:28:04 CET] <ayum> @user3, If you check libavfilter/vf_drawtext.c, you will find this line "s->metadata = av_frame_get_metadata(frame);", it call av_frame_get_metadata(), perhaps you can replace this function
[11:30:20 CET] <user3> ayum: Thank you for the reply. I'm kinda newbie to programming :) All I want is some ffmpeg cli parameterf if there's any.
[11:36:57 CET] <user3> What if I output metadata to some text file and then use 'textfile' parameter as 'drawtext' input? Could it be done in one command? And what if file or stream metadata changes during it's playback? Will the text file be changed synchonously?
[11:37:11 CET] <user3> Sorry for stupid questions.
[11:50:03 CET] <ayum> @user3, you can write a shell script to do that. but it the drawtext filter won't changed synchonously
[11:54:02 CET] <user3> ayum: Is it possible to constantly output 'Artist - Title' metadata from a stream? If so, then I can use two separate processes: one for metadata output to a text file, and second for combining audio and image with 'reload=1' option of 'drawtext' filter.
[11:55:32 CET] <user3> Oh, how do I do processes synchronization, though?
[11:56:14 CET] <ayum> @user3, yes, I think it should works, one process detect the stream metadata and output to a specified txt file, then in the drawtext filter, you need specify the "textfile" option
[11:57:03 CET] <ayum> "drawtext=textfile=metadata.txt:reload=1:fontfile=..."
[11:57:31 CET] <ayum> then, other process write the metadata to the "metadata.txt"
[12:12:29 CET] <user3> ayum: Thank you so much! Can gather 'Artist - Title' metadata using ffprobe or I should parse ffmpeg '-f ffmetadata' format output?
[12:24:35 CET] <ayum> @user3, ffprobe's output is more clear, should more easy to parse
[12:35:14 CET] <kiranbsravi> I am using libavformat to mux one audio and one video stream into a webm file. The video stream is already VP8 encoded and audio stream is already opus encoded. when I created an new AVPacket and set its AVBuffer and pts, dts from RTPTimeStamps, and passed this AVPacket to av_write_interleaved_frame(), I get an empty file in the end after closing the file. Am I doing something wrong ? Is there something more that needs to be set 
[12:56:25 CET] <bdi[m]> hi
[12:58:07 CET] <DHE> kiranbsravi: did you write the trailer on the AVFormatContext ?
[12:58:35 CET] <kiranbsravi> yes i have written.
[12:59:28 CET] <kiranbsravi> i have one naive doubt, Do I have to decode the audio and video streams, pass the raw data again to encoder to get AVPacketized data ? Or simply I can create new AVPacket and set it's AVBuffer ?
[12:59:53 CET] <kiranbsravi> right now i am doing the later.
[13:01:18 CET] <DHE> unless you have a specific need for the AVPacket otherwise, I don't see any reason why you can't just make whatever modifications to the AVPacket and use it straight into the output
[14:15:55 CET] <Nacht> Anyone noticed that Youtube suddenly has weird 360 video when you download them ? It's not stereoscopic, but it looks like it. They use some Horizontal/Vertical type
[14:28:30 CET] <durandal_1707> Nacht: its 360 version
[14:29:56 CET] <bencoh> .
[15:29:06 CET] <mort> hey
[15:29:57 CET] <mort> I'm trying to implement my own video decoder for ffmpeg (i.e adding a global AVCodec instance which is a part of libavcodec's list of codecs)
[15:30:26 CET] <mort> I'm a bit confused about how exactly I should give ffmpeg back my decoded buffer
[15:40:34 CET] <atomnuker> you can't do that
[15:41:32 CET] <atomnuker> the api simply doesn't allow you to, unless your code is inside libavcodec
[15:43:06 CET] <mort> atomnuker: my code is inside libavcodec
[15:43:16 CET] <mort> I have registered it as a codec, my decode function is called, all that is taken care of
[15:44:36 CET] <mort> I also have a buffer of decoded image data, the only remaining step is to send that back to ffmpeg
[15:44:52 CET] <atomnuker> well, its the other way around
[15:45:05 CET] <atomnuker> you cast your *data pointer to an avframe in your decode function
[15:45:26 CET] <atomnuker> you call get_buffer on that avframe after filling in the image size and pixel format
[15:45:37 CET] <atomnuker> and then you decode to that avframe
[15:46:05 CET] <mort> ah, I see. Thanks
[16:15:43 CET] <atomnuker> mort: what decoder are you writing?
[16:16:53 CET] <mort> atomnuker: some hardware stuff; I'm currently making a decoder using MMAL (I want to do things a bit differently than the one in mmaldec.c), and will make an MMAL encoder too
[16:17:17 CET] <mort> then probably make a decoder/encoder which uses the qualcomm venus video encoder and decoder
[16:21:05 CET] <atomnuker> how horrible, isn't there a hwaccel which works on the raspberry pi?
[16:21:54 CET] <atomnuker> also the qualcomm thing supports v4l2 for decoding/encoding already through v4l2
[16:24:59 CET] <mort> there is a hardware decoder for mmal, but not an encoder
[16:27:04 CET] <mort> does ffmpeg have built-in support for all video encoders and decoders which support v4l2?
[16:28:01 CET] <atomnuker> yep, v4l2 support got recently merged because many SoCs started to use that (and the api is horrible but its less horrible than some vendor's first closed source encoding/decoding api)
[16:28:09 CET] <mort> that's awesome
[16:28:39 CET] <mort> I made an encoder which used that qualcomm venus encoder through v4l; I can confirm the API is kinda horrible
[16:30:07 CET] <mort> when I did that, I encountered the problem that the hardware encodes stuff in 16x16 blocks, so the driver aligns the video width and height to fit whole chunks; that meant trying to encode 1080p video actually resulted in a 1920x1088 video stream
[16:31:04 CET] <mort> and since the hardware was told to encode 1920x1088, it didn't include any cropping information, and the driver didn't add that to the picture parameter set
[16:31:16 CET] <mort> does ffmpeg do anything to fix that do you think?
[16:32:47 CET] <JEEB> no, it expects the stream to be OK
[16:32:57 CET] <JEEB> there's a bit stream filter that could in theory fix it up
[16:33:19 CET] <JEEB> you'd have to use the API to stick that after the encoding, though :P
[16:33:26 CET] <JEEB> and it becomes rather non-pretty
[16:35:34 CET] <mort> my current solution was to just use memset and memmove to turn the 8 extra lines from 8 green lines on the bottom, into 4 black lines above and below the video
[16:35:52 CET] <mort> which isn't perfect, but seemed easier than trying to manually fix up the PPS :P
[16:39:50 CET] <atomnuker> there's an api to modify such things, not sure if its possible to use from inside an encoder, jkqxz would know
[16:42:38 CET] <JEEB> yea, that's the BSF I mentionde
[16:44:17 CET] <atomnuker> it wasn't implemented as a bsf, was it?
[16:44:44 CET] <JEEB> orly?
[16:44:51 CET] <JEEB> then I might be misremembering
[16:45:05 CET] <atomnuker> pretty sure it wasn't
[18:16:54 CET] <atomnuker> mort: does the rpi still need license keys to encode/decode?
[18:17:03 CET] <atomnuker> (or was it just to encode?)
[18:25:41 CET] <furq> it's for both but only for m2v and vc-1
[18:25:46 CET] <furq> the h264 license is included
[18:26:28 CET] <atomnuker> huh, interesting
[18:26:41 CET] <atomnuker> also I think all mpeg2 licenses expired
[18:26:51 CET] <atomnuker> *patents
[18:26:59 CET] <furq> yeah idk what the situation of that is on the pi now
[18:50:04 CET] <mort> atomnuker: I just deal with the technical stuff, and let others in the company deal with the legal stuff
[18:50:25 CET] <mort> they know a lot more about how you license h264 stuff than I do
[18:57:04 CET] <kikobyte> Greetings. I have a process which spawns ffmpeg child running GPU decoding / resizing / encoding of a certain media stream. The thing is, when I run my process from tty, everything works as expected, but if I run my process as systemd daemon, it won't go past NPP parameters setup - simply hangs until I kill it. Using CPU resize option ("-s") instead of scale_npp filter works in both cases. Can anyone drop a hint what all this can be
[18:58:45 CET] <BtbN> systemd probably does some isolation that shuts it off from the hardware
[19:01:07 CET] <kikobyte> BtbN, that should be an inconveniently selective isolation, because h264_cuvid and h264_nvenc both work regardless of systemd/tty conditions, everything comes down to scale_npp
[19:01:35 CET] <BtbN> Use scale_cuda or the builtin scaling in cuvid instead?
[19:01:53 CET] <BtbN> scale_npp is basically obsolete anyway, and candidate for deprecation
[19:04:27 CET] <kikobyte> BtbN, Wow, didn't know that, thanks. Which version of ffmpeg has got the scale_cuda filter? I might have missed something, but I don't see it in my custom 3.3.5-1 build (I need to work with pretty old kernel / drivers / cuda)
[19:05:00 CET] <BtbN> no idea, either 3.4 or latest master has it
[19:05:25 CET] <BtbN> latest master has it in either case
[19:06:04 CET] <kikobyte> BtbN, thanks! Will try what I can do with it
[19:10:32 CET] <jkqxz> Is scale_cuda actually any good?  From the code it looks like it's bilinear only, where scale_npp has more sensible choices.
[19:25:51 CET] <BtbN> 90% of the choices in libnpp are broken though
[19:40:49 CET] <kikobyte> Unfortunately, scale_cuda is available only since ffmpeg-3.4, which requires CUDA 8.0, which is not what debian oldstable has. Gotta think what we can do... Regardless, any chance scale_cuda will be any different from scale_npp in terms of actually doing something when executed from within a systemd daemon?..
[19:49:59 CET] <alexpigment> hey guys, i've got a question. i've got a small app that calls the libvo-aacenc encoder. i was going to update ffmpeg to support a few extra formats, but I know that that encoder isn't included by default anymore
[19:50:36 CET] <alexpigment> a) can the encoder still be included during compile? or b) is it possible to re-route it to use the native aac encoder when libvo-aacenc is called?
[19:55:02 CET] <durandal_1707> libvo encoder is pos
[19:56:08 CET] <alexpigment> agreed entirely
[19:56:15 CET] <alexpigment> but those are the two options i have at the moment
[19:56:33 CET] <alexpigment> so is either a or b possible? or if both are possible, which is easier to do?
[19:56:42 CET] <durandal_1707> use native aac
[19:57:08 CET] <durandal_1707> other is more work to do
[19:58:48 CET] <alexpigment> durandal_1707: so you're saying that i can take a command that calls libvo-aacenc and make ffmpeg use the native encoder instead?
[19:59:00 CET] <alexpigment> if so, is there somewhere in the source where you can change how something is parsed?
[19:59:50 CET] <durandal_1707> yes, encoder name
[20:01:28 CET] <furq> can you not just make it not call vo
[20:01:42 CET] <alexpigment> furq: in this case, i can't easily recreate that app
[20:02:12 CET] <furq> if it's shelling out to ffmpeg then you can probably just find the string and change it in a hex editor
[20:02:37 CET] <alexpigment> hmmm
[20:02:59 CET] <alexpigment> is it possible to hex edit something without preserving the string length?
[20:03:11 CET] <furq> padding it with spaces might work
[20:03:18 CET] <furq> depending on the language
[20:03:34 CET] <atomnuker> if its c, just pad it with nulls
[20:04:38 CET] <furq> if it's just popen(3) then extra spaces will be fine
[20:04:49 CET] <furq> if it's one of those dumb things that takes a vector of arguments then maybe not
[20:05:04 CET] <alexpigment> yeah, hex isn't coming up with something where i can find the string
[20:05:45 CET] <alexpigment> anyway, does anyone know exactly where to change the encoder name as durandal_1707?
[20:05:50 CET] <alexpigment> not sure what file(s) to look at
[20:06:51 CET] <furq> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/aacenc.c#L1148
[20:06:52 CET] <durandal_1707> not enough info provided for correct answer
[20:06:54 CET] <furq> presumably that
[20:07:25 CET] <durandal_1707> yes, that could also work
[20:07:31 CET] <alexpigment> awesome, thanks furq
[20:07:42 CET] <alexpigment> durandal_1707: sorry, i thought i was being perfectly clear above
[20:09:51 CET] <jafa> swr... I am using swr_set_matrix to configure the channel conversion. If the properties of the input stream change mid-stream I call swr_alloc_set_opts again to reconfigure but then swr_set_matrix fails with invalid argument
[20:14:04 CET] <jafa> do I need to completely free the swr context each time the input stream changes mid stream?
[20:20:44 CET] <feliwir> hey everyone. I am currently working on an opensource project reimplementing a couple of EA games. Related to this: the EA muxer and Vp6 encoder missing in FFMPEG. If i were to add those at somepoint would sth like this be accepted into upstream?
[20:20:54 CET] <feliwir> I am not sure because vp6 is a fairly old format
[20:24:25 CET] <durandal_1707> feliwir: this is user help channel and not for developement, #ffmpeg-devel is better place
[20:25:29 CET] <durandal_1707> feliwir: you could always write separate lib for encoding vp6
[20:25:47 CET] <atomnuker> hey wasn't someone writing a vp6 decoder in c# a year ago?
[20:25:55 CET] <feliwir> atomnuker, me
[20:26:09 CET] <feliwir> but FFMPEG already has a decoder for vp6
[20:26:13 CET] <feliwir> it's missing an encoder
[20:54:14 CET] <rrva> any trusted ffmpeg images which are continously updated ?
[20:54:26 CET] <rrva> sorry, forgot to add "docker images"
[21:06:49 CET] <pgorley> rrva: this repo seems to be updated https://github.com/jrottenberg/ffmpeg
[22:19:21 CET] <alexpigment> furq: apparently that didn't work. i'm still getting "Unknown encoder 'libvo_aacenc'"
[22:23:49 CET] <alexpigment> furq: do you think i need to edit codec_desc.c as well?
[22:29:58 CET] <durandal_1707> alexpigment: show diff
[22:30:55 CET] <alexpigment> durandal_1707: i'm not sure what you're saying
[22:31:54 CET] <durandal_1707> diff of your changes to ffmpeg
[22:31:58 CET] <BtbN> you really do not want to use libvo_aacenc though
[22:32:01 CET] <BtbN> it's really, really bad
[22:33:20 CET] <alexpigment> BtbN: not at all. i want a command that's specifying libvo_aacenc from several years ago to be able to talk to an updated copy of ffmpeg and instead use the built-in encoder
[22:33:25 CET] <alexpigment> durandal_1707: one sec
[22:33:58 CET] <BtbN> update the command?
[22:34:34 CET] <alexpigment> BtbN: it's not that easy to do
[22:34:46 CET] <alexpigment> anyway, I actually managed to get this to work by editing codec_desc.c
[22:34:58 CET] <alexpigment> so i guess no need to show that diff
[22:35:02 CET] <alexpigment> thanks guys
[22:35:04 CET] <BtbN> I'd edit ffmpeg_opt.c to replace the string if it finds it
[22:35:13 CET] <BtbN> if you are hack-fixing already
[22:35:14 CET] <alexpigment> BtbN: where were you earlier? ;)
[22:35:21 CET] <alexpigment> yeah, definitely in that mode
[22:35:34 CET] <alexpigment> i was really hoping to find some way to fix it at the parsing level
[22:35:56 CET] <alexpigment> but i just now got this to work by editing aacenc.c and codec_desc.c
[22:36:05 CET] <BtbN> can always edit main() and just overwrite it
[00:00:00 CET] --- Tue Jan 16 2018


More information about the Ffmpeg-devel-irc mailing list