[Ffmpeg-devel-irc] ffmpeg.log.20190830
burek
burek at teamnet.rs
Sat Aug 31 03:05:04 EEST 2019
[00:01:27 CEST] <kepstin> do you know if the decoder has any h264 profile or level limits?
[00:02:35 CEST] <TheDrode> the Colable 5011 you mean? kepstin?
[00:03:00 CEST] <kepstin> that command will be generating (probably) high profile video with arbitrarily high level, and since you're using crf mode without any vbv controls it'll have large dynamic range in frame sizes too, possibly causing issues with network buffering.
[00:04:03 CEST] <TheDrode> That would cause those colors and shapes that appear and dissapear?
[00:04:15 CEST] <kepstin> oh, that's a dvb encoder/modulator? you're gonna need to do a bunch more work to get a stream correctly encoded for broadcast.
[00:04:54 CEST] <kepstin> huh, looks like it does transcoding on the device tho
[00:05:00 CEST] <kepstin> so i guess not actually
[00:05:15 CEST] <TheDrode> kepstin: yeah, it's really f'ing complicated, spent one week getting it to display video from ffmpeg, really picky thingie
[00:05:25 CEST] <furycd001> HI.. Running ffmpeg version 3.4.6, is there any way I can glitch a .jpg images using ffmpeg ??
[00:06:10 CEST] <TheDrode> Yeah, she has ffmpeg inside i think, at least some h264 encoder for dvb and multicast IP broadcast
[00:07:13 CEST] <kepstin> furycd001: you should get a newer ffmpeg, but https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#noise might be interesting to you. That said, you should probably use some standalone tools rather than ffmpeg to get more control over what's being done to the file.
[00:07:55 CEST] <kepstin> ffmpeg, of course, tries its best to avoid glitches in normal usage :)
[00:09:44 CEST] <furycd001> ffmpeg was recommended to by a friend. Wasn't sure why they recommended it....
[00:10:17 CEST] <furycd001> It's my first time trying to glitch an image so I don't really know what to use....
[00:10:23 CEST] <kepstin> after you glitch a jpeg file, you can try using ffmpeg to decode it if you like, might give different results from other decoders
[00:10:45 CEST] <kepstin> but glitching a file is just modifying bytes of the file before decoding it, in hopes that the decoder will do something interesting looking
[00:11:15 CEST] <furycd001> Hmmm yea I could do that. Oh didn't actually know that. Thanks for the info :)
[00:11:43 CEST] <kepstin> furycd001: anyways, my suggestions would be to reduce the burstiness of packets by e.g. using the zerolatency tune, consider switching from crf mode to bitrate with vbv controls.
[00:12:15 CEST] <furycd001> Ok thanks. I will give that a try....
[00:12:22 CEST] <kepstin> by default x264 will buffer a lot of frames, then output them at a rate unrelated to the input speed, which might mess up stuff expecting a realtime stream
[00:14:37 CEST] <furycd001> That makes sense.
[00:16:20 CEST] <kepstin> er, wait, i got mixed up - TheDrode the comments about burstiness of packets were for you :)
[00:16:57 CEST] <TheDrode> kepstin: yeah, tough so :P
[00:17:18 CEST] <TheDrode> kepstin: so, what codec should i use? What can be the approach? i feel clueless
[00:18:36 CEST] <TheDrode> kepstin: will try both things, thanks so much, and thanks to everyone.
[00:18:42 CEST] <kepstin> TheDrode: oh, hmm, i'm not actually sure which codec you're using right now. i assumed libx264 encoder, but it depends on what the format default is (and I haven't had time to look through your full output)
[00:18:55 CEST] <kepstin> libx264 is what you *want* to be using.
[00:19:13 CEST] <TheDrode> kepstin: i am using libx264, will look into zerylatency and vbv
[00:19:46 CEST] <kepstin> the simplest thing first would be to add -tune zerolatency and see if that fixes it. If you have good network bandwidth (i assume either a direct or switched gigabit link?) then crf mode is probably fine
[00:21:16 CEST] <TheDrode> kepstin: yeah, direct GB Link between the server and the encoder
[00:21:24 CEST] <TheDrode> 62Gib of RAM
[00:21:41 CEST] <TheDrode> and 12 core Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
[00:22:25 CEST] <kepstin> (note that zerolatency mode disables frame threading, so your big fancy multi-core system won't be put to work as much)
[00:22:44 CEST] <kepstin> if that fixes the issue, there might be intermediate things you can do rather than the big "zerolatency" hammer
[00:25:06 CEST] <kepstin> if you end up having to stick with the low-latency mode and are doing HD video, you can enable slices to get slice threading.
[00:26:48 CEST] <TheDrode> kepstin: it got way better but is not yet solved: https://anonymousfiles.io/F4bXvnKz/
[00:26:59 CEST] <TheDrode> daniel at encoder:~$ ffmpeg -report -re -i "http://localhost:5080/LiveApp/streams/132242199223583235253206.m3u8" -vcodec libx264 -preset veryfast -tune zerolatency -acodec mp2 -ac 2 -f rtp_mpegts rtp://10.10.13.3:1001
[00:27:03 CEST] <TheDrode> this the command i used
[00:27:28 CEST] Action: kepstin is off for a bit
[00:41:38 CEST] <TheDrode> This one did the trick:
[00:41:41 CEST] <TheDrode> ffmpeg -report -re -i "http://192.168.201.3:5080/LiveApp/streams/132242199223583235253206.m3u8" -vcodec libx264 -vb 500k -preset veryfast -tune zerolatency -acodec mp2 -ac 2 -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://10.10.13.3:1001?tcp
[00:41:41 CEST] <TheDrode> not sure why to lol
[00:44:19 CEST] <TheDrode> Just one last question, what is the best way to use... 40 concurrent instances of ffmpeg?
[00:50:56 CEST] <TheDrode> Used & at the end simply and its holding, i will hang onto the channel so i can help other people, thanks sir @kepstin
[01:20:23 CEST] <TheDrode> Is there any way to lower cpu consumption?
[01:20:48 CEST] <BtbN> depends
[01:21:08 CEST] <BtbN> You can reduce the amount of threads
[01:21:29 CEST] <BtbN> But if you're transcoding a file, it will pretty much always fully utilize all threads it is allowed to.
[01:21:54 CEST] <TheDrode> i am restreaming an hls source, if i limit the threads, wouldn't it run sloooow?
[01:22:10 CEST] <nicolas17> oh so you're dealing with live stuff
[01:22:10 CEST] <BtbN> Real Time stuff is different
[01:22:29 CEST] <BtbN> pick a faster preset if you're using x264
[01:22:35 CEST] <BtbN> the default of medium is quite CPU intensive
[01:23:13 CEST] <nicolas17> amazingly my CPU manages almost realtime for x265 720p -preset slow
[01:23:23 CEST] <BtbN> 720p is small
[01:23:30 CEST] <BtbN> Also, if you're restreaming as in not even need to transcode, just use -c copy?
[01:24:44 CEST] <nicolas17> -preset slower is already slower than my patience can deal with... so I dunno why I ever considered trying av1 :P
[01:25:15 CEST] <BtbN> Isn't even the fastest preset of av1 still less than 1fps for 1080p?
[01:25:40 CEST] <TheDrode> BtbN: i need to transcode because the darn machine likes h264, mpegts, mp2 sound
[01:25:43 CEST] <nicolas17> I *think* I was getting 8spf on 720p?
[01:25:50 CEST] <nicolas17> TheDrode: what's your input?
[01:25:50 CEST] <BtbN> mp2 sound? What?
[01:26:10 CEST] <BtbN> And what source HLS won't be h264 already?
[01:27:50 CEST] <nicolas17> out of curiosity, is there any difference between MPEG1 and MPEG2 audio?
[01:27:50 CEST] <TheDrode> BtbN: nicolas17 is a Colable5011 hell machine
[01:28:19 CEST] <TheDrode> BtbN: the thing wont take hls from my source, so i have *have* to convert to hls... So annoying
[01:28:34 CEST] <BtbN> But the source is not h264 already?
[01:29:17 CEST] <nicolas17> you can remux from <weird Colable thing> to HLS while passing-through the h264 video stream in it
[01:37:47 CEST] <furq> it's hls to rtp, but yeah
[01:38:09 CEST] <furq> you should nominally be able to copy the h264 stream and transcode the audio
[01:38:38 CEST] <furq> but all bets are off when it comes to rando hardware
[01:39:02 CEST] <furq> plus you have a whole other world of pain because it's a broadcast box that takes mpegts ingest
[01:41:22 CEST] <TheDrode> furq: exactly, it's taken 2 weeks from me that i won't get back
[01:41:23 CEST] <TheDrode> lol
[01:46:47 CEST] <cehoyos> nicolas17: The MPEG2 standard also contains aac, the MPEG1 standard only mp1, mp2 and mp3
[01:47:51 CEST] <furq> nicolas17: https://en.wikipedia.org/wiki/MPEG-2_Part_3
[02:05:35 CEST] <ullbeking> has anybody here used ffmpeg technology to construct a media server that is capable of playing to a display over the LAN, possibly with on-the-fly transcoding?
[02:28:39 CEST] <DHE> like UMS?
[02:28:54 CEST] <DHE> it uses ffmpeg as a workhorse if the device connecting doens't support the contained codec
[02:30:32 CEST] <kepstin> pretty much any tool that accepts arbitrary videos and converts them probably has ffmpeg in it, whether they say so or not :/
[02:37:28 CEST] <ullbeking> kepstin: i'm sure that is the case, and indeed i expected some sort of answer like that...
[02:37:32 CEST] <ullbeking> but the issue is...
[02:37:53 CEST] <ullbeking> is it possible to have an interface that maches?
[02:37:56 CEST] <ullbeking> that is...
[02:38:21 CEST] <ullbeking> something that doesn't pull you into some unnecessary propritary land?
[02:38:29 CEST] <ullbeking> everybody talks of plex and emby
[02:38:32 CEST] <ullbeking> and i think why?
[02:45:09 CEST] <kepstin> well, on the open source server side, it's basically kodi. iirc kodi does support streaming to a web browser player.
[03:33:56 CEST] <ullbeking> is vlc/videolan server+client not also used as the basic for media servers?
[03:34:12 CEST] <ullbeking> kepstin: kodi is properly open source? i'm looking now...
[03:37:10 CEST] <furq> there's also jellyfin which is a fork of the last oss emby
[03:38:14 CEST] <furq> but ultimately 99% of users only care about app support
[03:38:22 CEST] <furq> so it lives and dies on that
[04:44:18 CEST] <ullbeking> furq: i actually was building Jellyfin for an afternoon and trying to use it
[04:44:25 CEST] <ullbeking> .NET was AWFUL
[04:44:44 CEST] <ullbeking> i subsequently erased every trace of my involvement in that project
[06:33:53 CEST] <lain98> so i want to read the first video frame in a stream. i do av_seek_frame(ctx, video_stream_index, 0, AVSEEK_FLAG_BACKWARD); and then av_read_frame(ctx, &pkt) but the packet i get is audio
[06:36:03 CEST] <lain98> any clues ?
[07:31:22 CEST] <troyBORG> If I'm trying to build from the git version would I ask here or in Dev channel?
[07:32:06 CEST] <troyBORG> Or what does "ERROR: dav1d >= 0.4.0 not found using pkg-config" mean?
[07:42:52 CEST] <JEEB> troyBORG: you tried enabling dav1d but configure couldn't find it
[07:46:29 CEST] <troyBORG> where do I get dav1d?
[07:47:23 CEST] <troyBORG> whenever I try to build it, it keeps redownloading the PKGBUILD file, so I can't figure out how to tell it not to install it
[07:48:03 CEST] <troyBORG> Here is the build file it trying to use (Hopefully it doesn't kick or ban me for URLS?)
[07:48:07 CEST] <troyBORG> https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ffmpeg-full-git
[07:48:14 CEST] <furq> troyBORG: there should be an ffbuild/config.log somewhere unless aur deleted it or something
[07:48:38 CEST] <furq> it'll probably have some kind of cc or ld error at the bottom
[07:50:36 CEST] <troyBORG> gcc -D_FORTIFY_SOURCE=2 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -I/opt/cuda/include -I/usr/include/tensorflow -std=c11 -fomit-frame-pointer -fPIC -pthread -I/usr/include/p11-kit-1 -I/usr/include/lilv-0 -I/usr/include/serd-0 -I/usr/include/sord-0
[07:50:36 CEST] <troyBORG> -I/usr/include/sratom-0 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/uuid -I/usr/include/bs2b -c -o
[07:50:36 CEST] <troyBORG> /tmp/ffconf.AunXBayo/test.o /tmp/ffconf.AunXBayo/test.c
[07:50:36 CEST] <troyBORG> gcc -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/opt/cuda/lib64 -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.AunXBayo/test /tmp/ffconf.AunXBayo/test.o -lcodec2
[07:50:36 CEST] <troyBORG> require_pkg_config libdav1d dav1d >= 0.4.0 dav1d/dav1d.h dav1d_version
[07:50:36 CEST] <troyBORG> check_pkg_config libdav1d dav1d >= 0.4.0 dav1d/dav1d.h dav1d_version
[07:50:37 CEST] <troyBORG> test_pkg_config libdav1d dav1d >= 0.4.0 dav1d/dav1d.h dav1d_version
[07:50:37 CEST] <troyBORG> pkg-config --exists --print-errors dav1d >= 0.4.0
[07:50:38 CEST] <troyBORG> Package dependency requirement 'dav1d >= 0.4.0' could not be satisfied.
[07:50:38 CEST] <troyBORG> Package 'dav1d' has version '0.3.1', required version is '>= 0.4.0'
[07:50:39 CEST] <troyBORG> ERROR: dav1d >= 0.4.0 not found using pkg-config
[07:51:36 CEST] <troyBORG> looks like it has an old version of it in the git?
[07:56:01 CEST] <troyBORG> the non -git version "ffmpeg-full" builds fine, its just "ffmpeg-full-git" that seems to fail
[07:57:02 CEST] <troyBORG> any ideas @furq ?
[07:59:13 CEST] <poutine> install dav1d 0.4.0 or higher (and use pastebins)
[08:04:38 CEST] <troyBORG> sorry, and ok, going I wonder since its required for ffmpeg-full-git, wonder why it doesn't download it as well.....
[08:06:51 CEST] <troyBORG> yeah that fixed it. Thanks
[09:18:42 CEST] <lain98> does the av_seek_frame assure that if i read a frame after seeking the packet will have the same stream index that i passed to av_seek_frame ?
[09:19:58 CEST] <JEEB> I don't think there's any promises of that in the doc?
[09:20:09 CEST] <lain98> then why have the paramater
[09:20:49 CEST] <JEEB> not sure but I would expect that to be the stream according to which the seek is being done?
[09:20:51 CEST] <lain98> av_seek_frame takes format_context, stream_index, timestamp, flags
[09:21:12 CEST] <JEEB> although you'd have to look at the implementation if you'd want to be sure instead of my guesstimations
[09:21:27 CEST] <lain98> after seek if i av_read_frame, the packet didnt have the same stream index
[09:21:41 CEST] <lain98> i thought av_seek would seek to a frame of the stream index passed to it
[09:24:22 CEST] <lain98> JEEB: whats a fast way to read any packet of a stream index that i know. i just want a video packet and dont care about the frame number or timestamp
[09:25:17 CEST] <lain98> right now i do something like while(..) { if index != .. {do nothing} else if {index == video} break}
[09:27:56 CEST] <JEEB> lain98: I think the docs did note that the parameter was mostly utilized to "make sure" that you probably were around that time in that stream.
[09:28:03 CEST] <JEEB> but nothing about what gets read first
[09:28:29 CEST] <JEEB> lain98: that's how you typically do it. you read AVPackets and check if they match your stream selections
[09:28:34 CEST] <JEEB> if they don't; you discard
[09:29:04 CEST] <lain98> okay. the doxygen says that timestamp is converted from AV_TIME_BASE to time base of the stream
[09:29:28 CEST] <lain98> but doesnt say about seeking to a point with a packet of that index
[09:29:46 CEST] <lain98> so i guess youre right
[09:32:12 CEST] <JEEB> ah yes, so it's for time base only
[09:32:30 CEST] <JEEB> (welcome to me guesstimating things by memory ;) sometimes doxygen says it better)
[11:32:41 CEST] <Guest88210> how to know the meaning of ARCH_AVR32_AP??
[11:35:51 CEST] <lain98> Guest88210: its a microcontroller
[11:35:53 CEST] <lain98> arch
[11:36:52 CEST] <Guest88210> I want to know where is the document that I can reference for this micro?
[11:39:06 CEST] <lain98> Guest88210: source code its mentioned in libavutil/avr32
[11:41:28 CEST] <Guest88210> Thanks. How to know the meaning of macro ALT_BITSTREAM_READER?
[11:41:52 CEST] <lain98> Guest88210: clone ffmpeg. search in the source code
[11:42:18 CEST] <Guest88210> I am reading the source code.
[11:43:04 CEST] <Guest88210> but I want to know whether has document introducing it.
[11:43:28 CEST] <Guest88210> because it spends many time to read source code.
[11:43:46 CEST] <lain98> grep it
[11:44:09 CEST] <lain98> cant find that symbol in source code
[11:47:41 CEST] <Guest88210> there are so many symbol related it.
[12:02:09 CEST] <lain98> if i get EMFILE when trying to open file with the library. it only depends on ulimit right ? libav should handle if i up the limit ?
[12:19:19 CEST] <JEEB> lain98: that generally comes from the system so you either have a leak somewhere, or you just raise the limit yes
[13:09:48 CEST] <classsic> buen dia
[14:22:16 CEST] <goel> Hi, I am having some trouble writing in a packet using av_write_frame. I am using FFmpeg bindings for C# (FFmpeg.AutoGen). All packets work except for 1, the first audio packet in a stream. When av_write_frame is called I am getting a memory access violation, so it may be a pointer I am not sure what is causing the issue but I know av_write_frame c
[14:22:16 CEST] <goel> hanges the side_data. The packet->side_data.data is null but the packet->side_data.size is 10.
[14:23:32 CEST] <JEEB> goel: were buffers etc allocated with av_malloc?
[14:24:11 CEST] <JEEB> (or through the functions that set up AVPackets
[14:29:00 CEST] <goel> I am guessing that is something wrong there. The side_data.data is null but the side_data.size is 10 after passing the packet to av_write_frame. If the side_data is not allocated, would size be present?
[14:29:15 CEST] <goel> I call av_init_packet
[14:35:22 CEST] <Guest88210> libavcodec/put_bits.h and libavcodec/bitstream.h have almost same function. Why not merge the two files?
[14:43:05 CEST] <durandal_1707> Guest88210: you looking at wrong project files, bro
[14:43:41 CEST] <Guest88210> http://ffmpeg.org/doxygen/0.5/bitstream_8h-source.html
[14:43:47 CEST] <Guest88210> https://ffmpeg.org/doxygen/0.6/put__bits_8h-source.html
[14:44:09 CEST] <Guest88210> durandal_1707: you can look at put_bits function.
[14:47:02 CEST] <durandal_1707> sorry but you are not making any sense by comparing so old versions
[14:50:36 CEST] <saml> bitstream.h got split into put_bits.h and get_bits.h
[14:50:44 CEST] <saml> it no longer exists
[14:53:05 CEST] <Guest88210> lol,soga
[14:53:26 CEST] <Guest88210> durandal_1707: saml thanks
[15:04:04 CEST] <idlus> Hi, I am gathering info from libavformat/electronicarts.c to try to remux a vp6 file with different audio, I can follow what happens in the header parsing functions but I dont get where the offset to sample data is retrieved.
[15:04:31 CEST] <goel> Thank you, it is fixed now by calling av_packet_alloc, av_init_packet and av_packet_ref.
[15:04:45 CEST] <goel> It could have been trying to access unallocated memory.
[15:05:35 CEST] <lain98> do you thinks its possible to generate an index of (frame number)->(position in stream) by just iterating at the container level. avpacket only has timestamp information, but avframe has the number information. i wanted to use this index to seek quickly to the n'th frame
[15:07:32 CEST] <lain98> right now i can imagine sorting the index based on pts and then assuming the packets are in the order they would be if i had the frame numbers
[15:10:04 CEST] <DHE> if you sort AVPackets by pts time, you'll effectively get your frame number. it's just that they don't come out in render order from the container
[15:10:31 CEST] <DHE> at least, it's not guaranteed
[15:10:54 CEST] <lain98> any other better approach ?
[15:11:28 CEST] <lain98> the problem i'm actually trying to solve is vfr
[15:12:26 CEST] <lain98> my problem statement is something like decode x frames starting from n from video y
[15:14:06 CEST] <lain98> but right now i cant handle vfr without indexing
[16:21:46 CEST] <th3_v0ice> Hi, how can I configure ffmpeg so that I can debug it?
[16:27:14 CEST] <JEEB> th3_v0ice: by default debug symbols are left in the _g files and stripped from the files without _g suffix
[16:27:25 CEST] <JEEB> if you want everything to hvae debug symbols, --disable-stripping in configure
[16:32:04 CEST] <th3_v0ice> So essentially that should allow me to step trought each line of code? I am trying to debug with VS2017 but the code is run on linux.
[16:32:53 CEST] <DHE> yeah I just use ffmpeg_g directly as my binary with gdb when I'm troubleshooting
[16:33:18 CEST] <JEEB> well I would check running gdb BINARY or BINARY_g and seeing if you can see that the symbols get loaded
[16:33:25 CEST] <JEEB> if you are using the command line app
[16:33:43 CEST] <JEEB> I'm not sure if we even strip the libs? I couldn't see a STRIP line during compilation for libavcodec.a for example
[16:34:00 CEST] <JEEB> I just see STRIP lines for the cli binaries
[16:34:13 CEST] <DHE> the libs are still full of debug symbols, and only the ffmpeg binary is stripped at the end of it
[16:34:16 CEST] <JEEB> but yes, --disable-strip never strips anything during the build process :P
[16:34:26 CEST] <DHE> brings my typical ffmpeg/ffprobe binary from 50 MB to 20 MB or so
[16:34:46 CEST] <JEEB> DHE: ok so it's how it looks from my limited compilation log here in another terminal :P
[17:02:29 CEST] <th3_v0ice> JEEB: Thanks, that did the trick.
[18:24:11 CEST] <classsic> hi, I have two videos :A.avi: fps 30 tbr 30 tbn 30 tbc 30. B.avi: fps 2 tbr 2 tbn 2 tbc 2.
[18:24:43 CEST] <classsic> how can copy tbr tbn and tbc from a.avi to b.avi?
[18:24:56 CEST] <classsic> or get same values.
[18:28:20 CEST] Action: Hello71 smells xy problem
[20:03:51 CEST] <TheDrode> how is it going?
[21:00:46 CEST] <lyncher> hi, I'm looking to the latm to adts bsf filter and I'm wondering if that would be even possible
[21:01:08 CEST] <lyncher> because the input of that BSF would be aac_latm and the output will be ADTS
[21:01:19 CEST] <lyncher> there's a "format" change inside the BSF
[21:01:35 CEST] <lyncher> how will ffmpeg filtering handle that change inside a BSF?
[21:01:50 CEST] <JEEB> right, yes. avcodec id change in the middle.
[21:01:58 CEST] <JEEB> not sure if any other BSF has done that yet
[21:02:37 CEST] <lyncher> maybe there's a concept that is missing in ffmpeg
[21:03:01 CEST] <lyncher> for instance, if you try to extract CEA-608 captions from a H264 video
[21:03:09 CEST] <lyncher> you'll find the same limitation
[21:03:16 CEST] <JEEB> there it's side data
[21:03:33 CEST] <lyncher> the BSF filter input is H264 but it's output is now CEA_608
[21:03:34 CEST] <JEEB> you get side data of type closed captions, and you have to make your own decoder instance etc
[21:03:51 CEST] <JEEB> umm, why would you bsf that? the packets are already extracted for you?
[21:03:54 CEST] <lyncher> which means that you cannot connect to a SUBTITLE filter
[21:04:06 CEST] <lyncher> to convert the CC to SRT (for instance)
[21:04:34 CEST] <JEEB> I think that's more of a problem regarding ffmpeg.c
[21:04:36 CEST] <JEEB> than the APIs
[21:05:17 CEST] <JEEB> to do CC to SRT you start reading the packets from input, and see if the AVPackets for the H.264 or MPEG-2 or HEVC stream have closed caption side data attached
[21:05:19 CEST] <lyncher> I agree. the CC data is already at the side data
[21:05:37 CEST] <JEEB> then when you get that you just initialize your decoder and the rest is your usual stuff
[21:05:56 CEST] <JEEB> you get AVSubtitles from the decoder, you can then stick them where you want
[21:06:51 CEST] <JEEB> so the closed caption part is a bad example tbh. it's just a limitation of how the ffmpeg.c command line app uses the API
[21:06:56 CEST] <JEEB> rather than an issue with the API itself
[21:07:21 CEST] <JEEB> just like ffmpeg.c will happily ignore any new AVStreams that will appear in your input :P
[21:07:26 CEST] <lyncher> the only decoder that I found that is able to do that is lavfi: it receives a video and present two outputs: a video and a CC
[21:07:35 CEST] <lyncher> the CC output will contain the side data CC
[21:07:47 CEST] <lyncher> and can be then automatically connected to a subtitle processing filter
[21:08:06 CEST] <JEEB> that is a workaround because people found it easier to do that than to rework ffmpeg.c?
[21:08:15 CEST] <JEEB> separate ffmpeg.c and the APIs, please
[21:08:49 CEST] <lyncher> right now that the only way that I found to dump the CC that is in side data
[21:08:53 CEST] <DHE> is there a closed caption decoder available?
[21:08:57 CEST] <JEEB> yes
[21:09:08 CEST] <DHE> oh? I am interested. did not see it last time I checked
[21:09:12 CEST] <JEEB> lyncher: in ffmpeg.c yes, if you make a short API client of yours it's much simpler :P
[21:09:25 CEST] <JEEB> as I said a few times *please* separate ffmpeg.c from the APIs
[21:10:04 CEST] <JEEB> there's (unfortunately) a lot of stuff that you can do with the API, but ffmpeg.c was never adapted for :P
[21:10:06 CEST] <lyncher> I was trying to use ffmpeg.c to separate all source streams and process them individually (including CC)
[21:10:25 CEST] <JEEB> DHE: ccaption I think
[21:10:52 CEST] <lyncher> libavcodec/ccaption_dec
[21:10:53 CEST] <DHE> thanks, found it
[21:13:27 CEST] <DHE> Actually I think I want to do my own decoding and understanding of the format, but this is still awesome
[21:14:29 CEST] <lyncher> so to do the LATM->ADTS conversion, the only option available right now is to do a full audio transcode
[21:15:02 CEST] <lyncher> and the alternative will be to make an "encoder" that only repacks AAC packets in ADTS
[21:15:28 CEST] <lyncher> that way the codec can be changed
[21:16:09 CEST] <DHE> so there are adts and latm formats independent of the AAC encoder/decoders.
[21:16:46 CEST] <DHE> so it should be possible to do an independent demux/remix with that
[21:17:15 CEST] <DHE> the mpegts muxer does something like that with input that doesn't conform to the mpegts format needs
[21:18:46 CEST] <lyncher> I'm trying to remux a latm into a mpeg-ts to be distributed over HLS, and the browsers currently don't have support for latm
[21:24:01 CEST] <JEEB> DHE: so yea if you add a feature to the LATM demuxer that outputs ADTS AAC, that would be possible
[21:26:05 CEST] <TheDrode> Guys, how do i tell ffmpeg to output unicast? It is pointing to a tcp address
[21:26:12 CEST] <TheDrode> but tcp dump shows the packets as udp
[21:29:42 CEST] <JEEB> I think unicast is just udp://IP.ADDRESS.HERE:PORT ? since udp://MULTICAST_ADDRESS:PORT works for multicast just fine
[21:30:57 CEST] <TheDrode> JEEB: i dont want to send multicast packets
[21:31:06 CEST] <JEEB> and I didn't say you would
[21:31:24 CEST] <JEEB> I just say that according to my memory you should already with the first one have unicast UDP
[21:31:37 CEST] <JEEB> you can verify that with netstat -apn or something :P
[21:46:29 CEST] <TheDrode> ffmpeg -f hls -re -i http://localhost:5080/LiveApp/streams/548003639818081365541257.m3u8 -vcodec copy -tune zerolatency -r 20 -async 1 -acodec mp2 -ab 24k -ar 22050 -bsf:v h264_mp4toannexb -maxrate 700k -bufsize 3000k -f rtp_mpegts -fec prompeg=l=4:d=4 rtp://@10.10.13.3:1002
[21:46:43 CEST] <TheDrode> this command sends video to my headend
[21:48:26 CEST] <TheDrode> but it looks like this:
[21:49:34 CEST] <TheDrode> https://anonymousfiles.io/xnMUQaB8/
[23:26:58 CEST] <classsic> somebody know wha fps and tbr can differ?
[23:27:35 CEST] <classsic> *why
[23:29:37 CEST] <pink_mist> if they couldn't, there'd be no reason for both to exist
[23:29:42 CEST] <pink_mist> but both do exist, so of course they can
[23:32:53 CEST] <classsic> ok, here is the question, I have to concatenate black screen + video + blackscreen
[23:34:10 CEST] <classsic> If I create blackscreen without exaclty tbn, when concatenate, I get wrong duration
[23:36:41 CEST] <classsic> so, I need a ffprobe command that givme fps,tbn,tbr
[23:46:31 CEST] <classsic> ffmpeg -i 5b4353828469a60001ee51c5\@5d5348f65336ad988628349e_2019-08-30_07-23-43_00-01-01.16_std.mp4 2>/dev/stdout |grep tbr
[00:00:00 CEST] --- Sat Aug 31 2019
More information about the Ffmpeg-devel-irc
mailing list