MythLogBot@irc.freenode.net :: #mythtv

Daily chat history

Current users (61):

MythBuild, MythLogBot, aloril, Anssi, blahdodo, brfranse_, ChanServ, Chutt, clever, CyberJacob, davic, dym, eharris, ElmerFudd, enyc, frobnic, gbee, ghoti, gigem, hampton, ijc, ikevin, J-e-f-f-A, jarle_, jheizer_, jpabq, jpharvey, jya, knowledgejunkie, libsci, mad_enz, markspieth, MitchCapper, MythNotifyBot, nephyrin, ooshlablu, peper03, pppingme, ramshadow, sheedy, sphery, sraue, stuarta, taylorr, tgm4883, toeb, tonsofpcs, tris, Warped, XDS2010|AFK, _charly_, sdrik, gregl, dekarl, GreyFoxx, Hydroponx, Tobbe5178, amessina_, Guest10049, jpharvey_, ShapeShifter499
Wednesday, November 22nd, 2017, 00:47 UTC
[00:47:09] dekarl (dekarl!~dekarl@mythtv/developer/dekarl) has joined #mythtv
[00:47:27] dekarl1 (dekarl1!~dekarl@mythtv/developer/dekarl) has quit (Ping timeout: 240 seconds)
[02:04:14] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has joined #mythtv
[02:31:34] Guest10049 (Guest10049!~dblain@c-73-100-248-159.hsd1.ma.comcast.net) has joined #mythtv
[03:59:35] peper03 (peper03!~peper03@mythtv/developer/peper03) has quit (Ping timeout: 240 seconds)
[04:05:04] peper03 (peper03!~peper03@mythtv/developer/peper03) has joined #mythtv
[04:13:18] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has quit (Remote host closed the connection)
[06:14:16] pppingme (pppingme!~pppingme@unaffiliated/pppingme) has quit (Remote host closed the connection)
[06:17:53] pppingme (pppingme!~pppingme@unaffiliated/pppingme) has joined #mythtv
[06:59:47] Warped (Warped!~Warped@unaffiliated/warped) has quit (Quit: ChatZilla 0.9.93 [Firefox 56.0.2/20171024165158])
[07:16:34] SteveGoodey (SteveGoodey!~steve@host81-158-52-80.range81-158.btcentralplus.com) has joined #mythtv
[07:17:12] dblain (dblain!~dblain@mythtv/developer/dblain) has joined #mythtv
[07:17:22] Warped (Warped!~Warped@unaffiliated/warped) has joined #mythtv
[07:17:27] Guest10049 (Guest10049!~dblain@c-73-100-248-159.hsd1.ma.comcast.net) has quit (Ping timeout: 240 seconds)
[07:18:01] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has joined #mythtv
[07:28:01] dblain (dblain!~dblain@mythtv/developer/dblain) has quit (Ping timeout: 248 seconds)
[07:28:02] Guest10049 (Guest10049!~dblain@c-73-100-248-159.hsd1.ma.comcast.net) has joined #mythtv
[07:43:08] jya (jya!~sid132@2620:101:8016:74::5:84) has quit (Ping timeout: 258 seconds)
[07:43:56] jya (jya!~sid132@2620:101:8016:74::5:84) has joined #mythtv
[09:01:29] gbee (gbee!~stuartm@mythtv/developer/stuartm) has quit (Remote host closed the connection)
[09:07:06] Merlin83b (Merlin83b!~Daniel@2a00:1ee0:3:1337:e0f1:4aa6:6d0e:9f8d) has joined #mythtv
[09:07:27] stuarta: morning all
[09:08:42] willcooke (willcooke!~willcooke@host-92-6-129-43.as43234.net) has joined #mythtv
[09:08:42] willcooke (willcooke!~willcooke@host-92-6-129-43.as43234.net) has quit (Changing host)
[09:08:42] willcooke (willcooke!~willcooke@ubuntu/member/willcooke) has joined #mythtv
[09:38:11] gbee (gbee!~stuartm@mythtv/developer/stuartm) has joined #mythtv
[09:54:50] stuarta: gigem: it might make more sense to further utilize ffmpeg, as it already has support for much of the hardware decode platforms we are interested in. it also has hardware assisted encoding, which we've never bothered with
[09:58:10] stuarta: just reading the changelog for ffmpeg makes me think that is a very good idea
[10:32:11] peper03 (peper03!~peper03@mythtv/developer/peper03) has quit (Ping timeout: 268 seconds)
[10:37:44] peper03 (peper03!~peper03@mythtv/developer/peper03) has joined #mythtv
[10:40:35] markspieth (markspieth!~markspiet@CPE-121-215-178-83.lns6.way.bigpond.net.au) has joined #mythtv
[10:41:33] markspieth: gigem: I meant that a native android implementation is custom for android only. not portable. Note that I still use Xv. Works brilliantly
[10:42:04] stuarta: not very fast tho
[10:43:29] markspieth: fast enough.
[12:01:55] stuarta: markspieth: it might make more sense to further utilize ffmpeg, as it already has support for much of the hardware decode platforms we are interested in. it also has hardware assisted encoding, which we've never bothered with
[12:02:11] stuarta: mentioned that before you joined
[12:04:46] kc (kc!~kcasper@unaffiliated/kc) has quit (Quit: Konversation terminated!)
[12:04:59] kc (kc!~kc@pool-71-246-23-127.phlapa.fios.verizon.net) has joined #mythtv
[12:04:59] kc (kc!~kc@unaffiliated/kc) has joined #mythtv
[12:04:59] kc (kc!~kc@pool-71-246-23-127.phlapa.fios.verizon.net) has quit (Changing host)
[12:20:12] stuarta: hmm, think i locked up my rpi trying to do a build
[12:20:15] stuarta: that is not good
[12:20:37] stuarta: either that or it's massively struggling
[12:25:03] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has quit (Ping timeout: 248 seconds)
[12:44:39] SteveGoodey (SteveGoodey!~steve@host81-158-52-80.range81-158.btcentralplus.com) has quit (Quit: Konversation terminated!)
[13:31:10] Spicy-Rabbit (Spicy-Rabbit!~Jordack@75-151-31-172-Michigan.hfc.comcastbusiness.net) has joined #mythtv
[15:42:08] stuarta: https://trac.ffmpeg.org/wiki/HWAccelIntro <- makes for interesting reading
[16:20:23] MythBuild (MythBuild!~MythBuild@mizar.mythtv.org) has quit (Quit: buildmaster reconfigured: bot disconnecting)
[16:20:34] MythBuild (MythBuild!~MythBuild@mizar.mythtv.org) has joined #mythtv
[16:28:25] gigem: markspieth: The problem with Xv as I recall is that the UI has to be "paintend" into the video frame before output. Because the UI has to run in the Qt event loop thread, it causes tighter than desirable coupling between the event loop thread and the decoding and presentation threads.
[16:29:07] stuarta: isn't that true for any output method? or do we do some post compositing with other output methods?
[16:33:13] SteveGoodey (SteveGoodey!~steve@host81-158-52-80.range81-158.btcentralplus.com) has joined #mythtv
[16:35:20] gigem: I didn't think so, but I could be wrong. With vdpau, for example, the decoded video frame never goes back to the cpu whild the UI is painted independently to the whole screen with opengl. I'm not sure what happens with decoding like vaapi where the frame goes back to the cpu and is painted with opengl. Does opengl require all output from one thread. I didn't think so, but that might not be unreasonable.
[16:37:24] stuarta: re vdpau, that makes sense, the reading i've been doing says you pretty much don't get the frame back once you send it to the GPU
[16:43:01] stuarta: and i'm fairly sure we can improve our vaapi pipeline
[17:56:34] Merlin83b (Merlin83b!~Daniel@2a00:1ee0:3:1337:e0f1:4aa6:6d0e:9f8d) has quit (Quit: Leaving)
[17:58:14] willcooke (willcooke!~willcooke@ubuntu/member/willcooke) has quit (Quit: Do your hobbies)
[18:06:33] dekarl: didn't jya work on playback with modern ffmpeg for another project? maybe he has some hints on what works well and what doesn't
[18:25:13] jya: dekarl: I have written the ffmpeg decoder for firefox yes
[18:25:35] jya: however, firefox uses their own demuxer. only the ffmpeg decoders are used
[18:25:47] jya: a very narrow subset of libavcodec only
[19:22:04] stuarta: jya: sounds a lot like how we use it
[19:25:18] jheizer_: #include <firefox>
[19:25:58] stuarta: well that's basically how the ticket for netflix integration works (except it uses chrome)
[19:27:37] jheizer_: I feel worse in that I had too google remember what a C++ include statement looked like. Been so damn long.
[19:27:49] ** stuarta chuckles **
[19:32:27] jya: stuarta: not really, we use it in combination with libavformat
[19:32:56] jya: that only thing special on how mythtv uses it is that it override the methods to grab the content from the buffer
[20:01:22] jya: stuarta: our AVFormatBlah code is bad in that it performs a loop, asking libavformat to demux the next frame. Then depending on its type it pass it through the right decoder.
[20:01:49] jya: That's fine with your typical mpegts content, where the audio and video is properly interleaved.
[20:02:13] jya: with mp4 however, that's often not the case. You have the audio blob on one side, the video on another.
[20:02:53] jya: so it's very easy to get the video decoder plenty of compressed frames, and yet no audio got ever seen. That leads to audio underrun, it starts droppng frame like crazy and so on
[20:05:08] peterbennett (peterbennett!~Peter@mythtv/developer/peterbennett) has joined #mythtv
[20:08:01] peterbennett: jya: Is there a good open source example of how best to use ffmpeg without using deprectaed apis? The ffplay itself uses deprecated apis.
[20:08:39] jya: peterbennett: even libavcodec / libavutil uses deprecated API !
[20:08:55] jya: there are a few examples.
[20:09:05] jya: ffplay uses very little of deprecated API though
[20:09:25] jya: the main change in ffmpeg are refcounted objects.
[20:09:34] jya: we could remove unecessary copies if we used it
[20:09:38] peterbennett: jya: Also I wonder whet the most efficient design is – for example our player does everything in one thread, I think it could be done better.
[20:10:02] jya: well, that's not entirely true
[20:10:54] jya: in firefox, player is in one thread, demuxer in another, decoder in another. and it's all asynchronous
[20:11:12] jya: if a packet is late with being decoded, it barely affect the rest of it
[20:11:32] peterbennett: That makes sense – what about audio and video ? Do they get separate threads?
[20:11:58] jya: the sad thing is that it wouldn't take me too long to fully rewrite the player, I've done it so many times now.. I just lack the will
[20:12:03] jya: yes.
[20:12:21] jya: we use task queues. everything is done through small tasks dispatched on taskqueues
[20:12:58] jya: so audio decoding = 1 taskqueue, video decoding = 1 tq, demuxing = 1tq, player = 1tq (that coordinate the lot)
[20:13:13] jya: those taskqueues however, share a single threads pool
[20:13:24] peterbennett: Another thing that bothers me is the framerate – it can vary but if you are trying to synchonize with video refresh that may not be possible
[20:13:33] jya: the thread pool is made of 8 threads to start with
[20:14:04] jya: the main difference between FF and mythtv, is that mythtv under most circumstances, plays 1 video and 1 video only (and that's the same for ffplay or vlc)
[20:14:12] jya: firefox can play hundreds of videos at once
[20:14:31] jya: and that's where using ffmpeg sucks
[20:14:47] jya: ffmpeg be default will use as many threads as you have core per video decoder
[20:15:20] jya: I have a page with like 400 videos playing at once, that will cause any 32 bits programs to crash with an OOM at once
[20:16:02] jya: I tried to argue that ffmpeg need a different threading model, one that would allow to share threads across decoders. A global thread pool...
[20:16:08] jya: idea didn't get far
[20:16:29] jya: it's hard to convince people whose typical usage is playing a single video
[20:16:59] jya: peterbennett: yeah, refresh rate shouldn't matter. a frame has a start time. it should be displayed until a new one is coming
[20:17:11] hampton: I tried rewriting the thumbnail generation code from mytharchive using the new APIs, and the ffmpeg decoder kept complaining that my video had issues. It didn't complain at all using the older decoding functions (which are used under the cover by the new functions).
[20:17:20] peterbennett: You said firefox uses ffmpeg decoder ? so you have a way of getting around that problem?
[20:17:41] jya: on linux only. firefox can't ship its own h264 decoder
[20:18:01] hampton: Seems much simpler to just fire off an instance of ffmpeg with the right arguments instead of doing all the decoding in mytharchive.
[20:18:06] jya: the solution around the problem is messy... if the video is less than xx high, then don't use multi-threading
[20:20:42] peterbennett: MythTV tries to work according to a framerate, but I have thought that you should ignore the framerate and just display each frame according to the time code, i.e. when it is due.
[20:21:20] peterbennett: jya: Does that make sense or am I wrong?
[20:22:06] jya: it does, and that's how it should be done
[20:22:54] jya: assuming that you'll get a frame exactly when you need it can work 99% of the time, but when it doesn't, you're in a world of pain
[20:23:33] jya: play the frame you need at the time you need it, and if you don't have one, just wait until a new one comes
[20:23:56] jya: and if you're video decoding is too far behind, you start jumping keyframes
[20:24:32] peterbennett: jya: I would like to rewrite the player but I am daunted by the many features – time stretch, audio sync adjustment – sub titles – zoom – picture in picture – color adjustment – etc – and I don't have experience with writing video players.
[20:25:22] jya: start by making the demuxing + decoding asynchronous
[20:25:33] jya: the player can stay as is
[20:25:49] jya: and separate the demuxing audio from video
[20:25:55] jya: same for the decoder
[20:26:17] jya: two demuxers, two decoders
[20:26:30] jya: good exercise :)
[20:26:40] jya: who knows , you may find yourself a new hobby !
[20:27:20] peterbennett: jya: ok , one thing that worries me about the player is the way it does so much work between frames, I think that is what causes raspberry pi to be juddery
[20:27:35] jya: yeah, that's why if you make it asynchronous
[20:27:42] peterbennett: I would think some of that could be a separate thread
[20:27:46] jya: the next step is you put that asynchronous part in a different thread
[20:28:11] jya: so now the player is in one thread, and every asynchronous part is in a different thread
[20:28:20] jya: then make audio on one thread and video on another
[20:28:29] jya: keep moving up that way
[20:28:49] jya: I'm fairly sure that just that would alleviate most of the current issue
[20:29:02] jya: but we're back to what I think mythtv should be:
[20:29:06] jya: just mythbackend
[20:29:20] peterbennett: That being in the same thread causes the pause to have to loop continuously redisplaying a frame just so it can be responsive
[20:29:23] jya: drop the frontend, make it easier for anyone to write a frontend for it
[20:30:37] jya: doing video is hard
[20:30:54] peterbennett: On that note I was wondering if I could plug in VLC or something like that as player, but not sure how we would communicate with it, show OSD, etc.
[20:32:47] jya: just use overlay
[20:33:09] jya: that becomes easy if you drop everything that isn't opengl
[20:33:12] jya: it's 2017!
[20:33:33] peterbennett: Anyway – you recommend doing it gradually a bit at a time – I can try that. Also get rid of the deprecated calls, and I would like to get rid of the private ffmpeg and use ffmpeg from the distribution.
[20:33:56] jya: peterbennett: that unfortunately is difficult due to our reliance on our mpeg-ts demuxer
[20:34:09] jya: we never got our changes approved upstream
[20:34:26] jya: all the subtitles support, audio channels, teletext and so forth...
[20:34:49] jya: there's no very little difference between stock ffmpeg and our copy
[20:35:06] jya: mostly the mpeg-ts demuxer and the ability to select audio streams
[20:35:19] jya: gotta go now
[20:35:31] jya: happy to help in whatever you start
[20:35:34] peterbennett: Ok Bye thanks for the info
[21:02:06] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has joined #mythtv
[21:08:22] LePetomane (LePetomane!~Dirkka@1.152.107.133) has joined #mythtv
[21:10:26] Roklobster (Roklobster!~Dirkka@119-18-8-177.cust.aussiebb.net) has quit (Ping timeout: 268 seconds)
[21:35:28] stuarta: jya: your explanations are very helpful in understanding the mythtv player
[21:39:33] stuarta: peterbennett: i like jya's suggested work to make it better. pretty much the conclusion i had come to whilst researching the "new" ffmpeg API
[21:41:16] stuarta: separate decoding threads for video / audio etc, which feeds into queues for the player, and it pulls what it needs off
[21:42:05] stuarta: and we should be able to do all this with opengl, especially if it greatly simplifies the internal architecture.
[21:44:40] peterbennett (peterbennett!~Peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.)
[21:50:54] peterbennett (peterbennett!~Peter@mythtv/developer/peterbennett) has joined #mythtv
[21:56:14] peterbennett (peterbennett!~Peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.)
[22:05:52] LePetomane (LePetomane!~Dirkka@1.152.107.133) has quit (Ping timeout: 260 seconds)
[22:29:32] SteveGoodey (SteveGoodey!~steve@host81-158-52-80.range81-158.btcentralplus.com) has quit (Quit: Konversation terminated!)
[22:36:48] Spicy-Rabbit (Spicy-Rabbit!~Jordack@75-151-31-172-Michigan.hfc.comcastbusiness.net) has quit (Quit: Looking in rear view mirror to see someone riding a motorbike, has skull crossbones masks. Its 28F, think BadAss or DumbAss? As we move i see a Moped... Yup dumbass.)
[23:12:16] MythBuild (MythBuild!~MythBuild@mizar.mythtv.org) has quit (Quit: buildmaster reconfigured: bot disconnecting)
[23:12:25] MythBuild (MythBuild!~MythBuild@mizar.mythtv.org) has joined #mythtv
[23:17:31] amessina (amessina!~amessina@unaffiliated/amessina) has joined #mythtv
[23:20:52] Roklobster (Roklobster!~Dirkka@1.152.107.133) has joined #mythtv
[23:22:11] ShapeShifter499 (ShapeShifter499!~ShapeShif@unaffiliated/shapeshifter499) has joined #mythtv
[23:31:02] amessina_ (amessina_!~amessina@unaffiliated/amessina) has joined #mythtv
[23:31:20] amessina (amessina!~amessina@unaffiliated/amessina) has quit (Ping timeout: 255 seconds)
[23:33:39] gigem: jya: What do we have to do to increase your will? :)
[23:33:43] gigem: What overlay capabilities do players like VLC and Kodi have? Is it enough to replicate all of MythTV's in-player capability? How would out-of-player stuff be done in VLC? I assume Kodi's plugin framework would be enough to handle the out-of-player stuff there. On the surface, Kodi would seem like a good, extensible base for an alternative frontend. I just don't know if it's customizable enough to
[23:33:46] gigem: overcome the parts of the Kodi UI that I don't like and present something closer to mythfrontend.
[23:39:00] gigem: markspieth: Yes, mediacodec support would be custom to to Android. So what? VDPAU is (mostly) specific to Nvidia cards and VAAPI, is specific to Intel. It's just another decoding and presentation option. With the Shield, it is *the* choice for deinterlacing of HD material.
[23:45:57] Roklobster (Roklobster!~Dirkka@1.152.107.133) has quit (Ping timeout: 240 seconds)

IRC Logs collected by BeirdoBot.
Please use the above link to report any bugs.