Page 1 of 1

Unable to watch TV

Posted: Tue Sep 04, 2018 2:09 pm
by eabaggot
I am setting up MythTV on Linux Mint v19. I should also mention that I am just getting started with Linux, but have many years with a career in SW dev (now retired). I will also mention that I have Kaffeine working fine, so I know my capture card is recognized.

I made it through all the MythTV backend configuration, detected my capture card, scanned all the channels, and fired up the front end. When I click "Watch TV", I get a flicker "Please wait" then immediately returns to the top-level menu. The logs suggest a permissions problem.

Front End:
Sep 4 08:56:33 ed mythfrontend.real: mythfrontend[2583]: I CoreContext mythcorecontext.cpp:448 (ConnectCommandSocket) MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
Sep 4 08:56:34 ed mythfrontend.real: mythfrontend[2583]: E CoreContext livetvchain.cpp:282 (GetEntryAt) GetEntryAt(-1) failed.
Sep 4 08:56:34 ed mythfrontend.real: mythfrontend[2583]: E CoreContext livetvchain.cpp:289 (GetEntryAt) It appears that your backend may be misconfigured. Check your backend logs to determine whether your inputs, lineups, channels, or storage configuration are reporting errors. This issue is commonly caused by failing to complete all setup steps properly. You may wish to review the documentation for mythtv-setup.

Sep 4 08:56:34 ed mythfrontend.real: mythfrontend[2583]: E CoreContext livetvchain.cpp:306 (EntryToProgram)

Back End:
Sep 4 08:56:33 ed mythbackend: mythbackend[1242]: I TVRecEvent tv_rec.cpp:3649 (TuningFrequency) TVRec[1]: TuningFrequency
Sep 4 08:56:33 ed mythbackend: mythbackend[1242]: N CoreContext autoexpire.cpp:251 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
Sep 4 08:56:34 ed mythbackend: mythbackend[1242]: E TVRecEvent threadedfilewriter.cpp:129 (Open) TFW(/home/ed/Videos/TV Recordings/1191_20180904135633.ts:-1): Opening file '/home/ed/Videos/TV Recordings/1191_20180904135633.ts'.#012#011#011#011eno: Permission denied (13)
Sep 4 08:56:34 ed mythbackend: mythbackend[1242]: E TVRecEvent tv_rec.cpp:4600 (GetProgramRingBufferForLiveTV) TVRec[1]: RingBuffer '/home/ed/Videos/TV Recordings/1191_20180904135633.ts' not open...
Sep 4 08:56:34 ed mythbackend: mythbackend[1242]: E TVRecEvent tv_rec.cpp:4636 (CreateLiveTVRingBuffer) TVRec[1]: CreateLiveTVRingBuffer(19_1) failed
Sep 4 08:56:34 ed mythbackend: mythbackend[1242]: E TVRecEvent tv_rec.cpp:3766 (TuningFrequency) TVRec[1]: Failed to create RingBuffer 1
Sep 4 08:56:34 ed mythbackend: mythbackend[1242]: I TVRecEvent tv_rec.cpp:1088 (HandleStateChange) TVRec[1]: Changing from WatchingLiveTV to None

What is the fix for this issue?
Thanks.

Re: Unable to watch TV

Posted: Tue Sep 04, 2018 3:41 pm
by MikeB2013
It does look like permissions issue, although I would have expected mythtv-setup complain on exit.
recording folders/directories need to be owned by mythtv and also have certain permissions, so try the following to resolve

Code: Select all

sudo chown -R mythtv:mythtv /home/ed/Videos
sudo chmod -R  u=rwx,g=rwxs,o=rx /home/ed/Videos
I suggest you restart mythtv-backend service at this point, the backend checks storage directories on startup.

Code: Select all

sudo systemctl stop mythtv-backend
sudo systemctl start mythtv-backend

Re: Unable to watch TV

Posted: Tue Sep 04, 2018 4:04 pm
by eabaggot
Thanks for the response. I did these things and am now getting "Error opening jump program file buffer". From the frontend log below, there is some problem with the file 1191_20180904155204.ts. That file does appear in the recordings folder and is 376 bytes in size. I do not see anything in the backend log.
  • FRONTEND LOG

    Sep 4 10:52:03 ed mythfrontend.real: mythfrontend[7029]: I CoreContext videooutbase.cpp:1488 (DisplayOSD) VideoOutput: Created YV12 OSD.
    Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: E CoreContext fileringbuffer.cpp:309 (OpenFile) FileRingBuf(/home/ed/Videos/TV Recordings/1191_20180904155204.ts): OpenFile(): File too small (0B).
    Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: E CoreContext mythplayer.cpp:2839 (JumpToProgram) Player(3): JumpToProgram's OpenFile failed (input type: DVB).
    Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: E CoreContext mythplayer.cpp:2840 (JumpToProgram) LiveTVChain has 2 entries#012 DUMMY: 1191 (15:52:03 to 15:52:04)#012* DVB: 1191 (15:52:04 to 16:00:00) discontinuous
    Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: E CoreContext mythplayer.cpp:3095 (EventLoop) Player(3): Unknown recorder error, exiting decoder
    Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: I CoreContext tv_play.cpp:2277 (HandleStateChange) TV::HandleStateChange(): Attempting to change from WatchingLiveTV to None
  • BACKEND LOG

    Sep 4 10:52:03 ed mythbackend: mythbackend[6971]: I TVRecEvent tv_rec.cpp:1088 (HandleStateChange) TVRec[1]: Changing from None to WatchingLiveTV
    Sep 4 10:52:03 ed mythbackend: mythbackend[6971]: I TVRecEvent tv_rec.cpp:3649 (TuningFrequency) TVRec[1]: TuningFrequency
    Sep 4 10:52:03 ed mythbackend: mythbackend[6971]: N CoreContext autoexpire.cpp:251 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
    Sep 4 10:52:03 ed mythbackend: mythbackend[6971]: N TVRecEvent recordinginfo.cpp:695 (ApplyRecordRecGroupChange) ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: N CoreContext autoexpire.cpp:251 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: N TVRecEvent recordinginfo.cpp:695 (ApplyRecordRecGroupChange) ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: I TVRecEvent tv_rec.cpp:4224 (TuningNewRecorder) TVRec[1]: TuningNewRecorder - CreateRecorder()
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: I TVRecEvent tv_rec.cpp:1088 (HandleStateChange) TVRec[1]: Changing from WatchingLiveTV to None
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: N RecThread recorders/recorderbase.cpp:501 (FinishRecording) Finished Recording: Container: MPEG2-TS Video Codec: mpeg2video (0x0 A/R: 0 29.97fps) Audio Codec: ac3
    Sep 4 10:52:04 ed mythbackend: mythbackend[6971]: I TVRecEvent tv_rec.cpp:863 (FinishedRecording) TVRec[1]: FinishedRecording(1191_2018-09-04T15:52:04Z) damaged recq:<RecordingQuality overall_score="0" key="1191_2018-09-04T15:52:04Z">#012 <Gap start="2018-09-04T15:00:00Z" end="2018-09-04T16:00:00Z" duration="3600" />#012</RecordingQuality>

Re: Unable to watch TV

Posted: Mon Sep 24, 2018 1:24 am
by strom
Are you able to record a program, and watch it?

If so, you may be running into the same problem I am having; The ring buffer does not have enough, in your case any, data to display. In my case, I am able to rewind(Left Arrow) to allow the buffer to fully fill prior to display. This only occurs when the front end is also the back end.
My computer is well over 5 years old(Ivy Bridge, NVidia 465), if it is experiencing these issues, I could imagine a newer computer exhibiting the behavior you are describing by extension.

A delay needs to be added to the live TV feature to wait for enough bytes to fill in the ring-buffer prior to display.( submit a bug)

If you are not able to record a show and watch it, then you may still have permission(or other) issues.

Re: Unable to watch TV

Posted: Mon Sep 24, 2018 9:57 am
by MikeB2013
From frontend log
Sep 4 10:52:04 ed mythfrontend.real: mythfrontend[7029]: E CoreContext fileringbuffer.cpp:309 (OpenFile) FileRingBuf(/home/ed/Videos/TV Recordings/1191_20180904155204.ts): OpenFile(): File too small (0B).

There is a space character in TV Recordings/ directory name, suggest you rename the directory to TV_Recordings/ i.e. use underscore instead of space, remembering to change the appropriate Storage Group using mythtv-setup to /home/ed/Videos/TV Recordings

Another user had a similar problem see viewtopic.php?p=13760#p13760 and using underscore instead of space character resolved the issue.