SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-28-2019, 04:20 PM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
9.2.1 LiveTV/timeshifting problem & plays fine after recording ends

x-posting as this may be more appropriate section:
I have R5000HDs connected to my SageTV x64 9.2.1 and for some channels I have the problem that I cannot watch them while recording but can watch once the recording is completed. The recordings are .ts files mpeg2.

In the log it says:
Sun 4/28 10:51:02.949 [PooledThread@2dfcc3e2] Using internal format detector first for: N:\SageTV\MysteriesattheMuseum-S17E12-TerrorOnTheTracksTheApeAndTheChildandBodyInTheBog-92411310-0.ts
Sun 4/28 10:51:02.964 [PooledThread@2dfcc3e2] AV Format:Ret:-1 Program:0 Duration:714d6ab80 Format:AV-INF|f=MPEG2-TS;br=8384000;[bf=vid;f=MPEG2-Video;fps=29.970030;fpsn=30000;fpsd=1001;ar=1.777778;arn=16;ard=9;w=1920;h=1080;lace=1;cs=yuv420p;main=yes;tag=1c85;pid=7301;index=0;];[bf=aud;f=AC3;sr=48000;ch=6;br=384000;tag=1c86;pid=7302;index=2;];(0:50:41.438'400.0)
Sun 4/28 10:51:02.964 [PooledThread@2dfcc3e2] Not find a valid channelRet:-1 Program:0 Duration:714d6ab80 Format:AV-INF|f=MPEG2-TS;br=8384000;[bf=vid;f=MPEG2-Video;fps=29.970030;fpsn=30000;fpsd=1001;ar=1.777778;arn=16;ard=9;w=1920;h=1080;lace=1;cs=yuv420p;main=yes;tag=1c85;pid=7301;index=0;];[bf=aud;f=AC3;sr=48000;ch=6;br=384000;tag=1c86;pid=7302;index=2;];


i.e. it tries to detect the format using internal and external fmt detectors. It tells me it cannot find valid channel "Not find a valid channel" entry which also shows the correct format of 1080i with ac3 sound and even finds the pid 7302 so why does it not play that channel it detects?

Does it make a difference if I were to use the Sage Demux ? Any troubleshooting help greatly appreciated.

PS: After seeing a black "no signal" screen associated with the above log messages for the remaining duration of the recording it instantly started playing once the recording terminated. Why is there such different treatment in the software between watching finished recordings and watching live/timeshifted?
Reply With Quote
  #2  
Old 04-28-2019, 08:55 PM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
format detection

I ran the external format detection on this stream with output.

SageTVTranscoder.exe -dumpmetadata -v 2 -i MysteriesattheMuseum-S17E12-TerrorOnTheTracksTheApeAndTheChildandBodyInTheBog-92411310-0.ts
FFmpeg version SVN-r93, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 28 2011 10:48:22 with gcc 4.2.4
configuration: --target-os=mingw32 --prefix=/cygdrive/c/dev/src/buildwin/stage --disable-ffplay --disable-ffserver --enable-gpl --enable-nonfree --disable-encoder=aac --disable-demuxer=ea --disable-devices --enable-libxvid --enable-libx264 --enable-libfaac --enable-libfaad --enable-static --disable-shared --enable-pthreads --disable-debug --enable-memalign-hack --arch=x86 --extra-cflags='-fno-common -march=i686 -mtune=i686 -DWIN32 -I/cygdrive/c/dev/src/buildwin/stage/include' --extra-ldflags=-L/cygdrive/c/dev/src/buildwin/stage/lib --enable-cross-compile --cross-prefix=i686-pc-mingw32-
libavutil 50.22. 0 / 50.22. 0
libavcodec 52.83. 0 / 52.83. 0
libavformat 52.73. 0 / 52.73. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.22. 0 / 1.22. 0
libswscale 0.11. 0 / 0.11. 0
[NULL @ 0x1d5bd40] Probed with size=2048 and score=100
[mpegts @ 0x1d5bd40] stream=0 stream_type=0 pid=1c85 prog_reg_desc=
[mpegts @ 0x1d5bd40] stream=1 stream_type=0 pid=1c86 prog_reg_desc=
[mpegts @ 0x1d5bd40] probing stream 0
Last message repeated 1 times
[mpegts @ 0x1d5bd40] probing stream 1
Last message repeated 4 times
[mpegts @ 0x1d5bd40] probing stream 0
[mpegts @ 0x1d5bd40] Probe with size=228104, packets=3 detected mpegvideo with score=51
[mpegts @ 0x1d5bd40] probed stream 0
[mpeg2video @ 0x1bb8410] mpeg_decode_postinit() failure
[mpegts @ 0x1d5bd40] probing stream 1
[mpegts @ 0x1d5bd40] Probe with size=9116, packets=6 detected ac3 with score=25
[mpegts @ 0x1d5bd40] probed stream 1
[mpeg2video @ 0x1bb8410] mpeg_decode_postinit() failure
[mpegts @ 0x1d5bd40] Probe buffer size limit 5000000 reached
Input #0, mpegts, from 'MysteriesattheMuseum-S17E12-TerrorOnTheTracksTheApeAndTheChildandBodyInTheBog-92411310-0.ts':
Duration: 00:59:54.34, start: 3453.577711, bitrate: 12723 kb/s
Program 730
No Program
Stream #0.0[0x1c85], 90, 1/90000: Video: mpeg2video, yuv420p, 1920x1080, 1001/60000, AR: 16:9, interlaced, 64000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1c86], 94, 1/90000: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s

It finds program 730 but in addition also outputs "No Program". I looked at the FormatParser.java source code and noticed this regexp:
private static java.util.regex.Pattern myProgramPat = java.util.regex.Pattern.compile(" Program\\\\d+) ");
Reply With Quote
  #3  
Old 04-28-2019, 09:48 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
I found what looks to be a 32/64 bit type mismatch in the call to the internal format detector.

Give this version of DShowPlayer.dll a try to see if it acts any differently.

Disregard...no issue here.

Last edited by wnjj; 04-29-2019 at 08:37 AM.
Reply With Quote
  #4  
Old 04-29-2019, 08:05 AM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
Quote:
Originally Posted by wnjj View Post
I found what looks to be a 32/64 bit type mismatch in the call to the internal format detector.

Give this version of DShowPlayer.dll a try to see if it acts any differently.
I will try it hopefully tonight! Thanks for your response.

Hugo
Reply With Quote
  #5  
Old 04-29-2019, 08:19 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by guho View Post
I will try it hopefully tonight! Thanks for your response.

Hugo
Sorry, false alarm. It turns out that for Windows, that data type is actually the same size as the one it’s passing into. This DLL won’t do anything different.

What I can do is try to add some debugging code to help see why the format isn’t being detected correctly. I do see a flag passed in for live stream versus file so whatever is done differently there must be affecting it. Otherwise the file format is the same no matter whether it’s done recording or not.
Reply With Quote
  #6  
Old 04-29-2019, 09:22 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Another question: When you leave it on “no signal” and it starts playing when the show stops recording, does the internal format detector change what it reports? The key info is the “Ret:-1 Program:0”. That is why it says there are no valid channels.

Can you post a complete section of the logfile from the last several minutes when it is showing “no signal” to after it starts playing?
Reply With Quote
  #7  
Old 04-29-2019, 03:27 PM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
Yes, and I can also post the initial few megs of the Transport Stream in question later today.
Reply With Quote
  #8  
Old 04-29-2019, 05:30 PM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
Here is all the information.

Logfile https://1drv.ms/u/s!AqAlU5UQxL06hfVTmQLHqr1jNVD_IQ shows MPEG2-TS 0:58:36 in line 5 for this recording, which means only 1:24 left as it an hour-long show. Around line 3300 the recording ends. Although I can't find the place where it suddenly recognizes the program in the stream.

I run Service mode x64 9.2.1 not sure if it matters Service mode or standalone.

First 2M of stream: https://1drv.ms/u/s!AqAlU5UQxL06hfVSzxyK0nUGS2lZqA

Many thanks in advance for looking at this problem.
Reply With Quote
  #9  
Old 04-29-2019, 10:13 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by guho View Post
Here is all the information.

Logfile https://1drv.ms/u/s!AqAlU5UQxL06hfVTmQLHqr1jNVD_IQ shows MPEG2-TS 0:58:36 in line 5 for this recording, which means only 1:24 left as it an hour-long show. Around line 3300 the recording ends. Although I can't find the place where it suddenly recognizes the program in the stream.

I run Service mode x64 9.2.1 not sure if it matters Service mode or standalone.

First 2M of stream: https://1drv.ms/u/s!AqAlU5UQxL06hfVSzxyK0nUGS2lZqA

Many thanks in advance for looking at this problem.
The log helps. It seems that when the show stops recording, the code that causes it to return NULL from the internal detector is finally skipped and the external (FFMPEG) detector finds the correct format.

Setting 'skip_internal_format_parser=true' in your sage.properties file should skip the internal detector and might get you going for now. There is clearly still something wrong with the internal detector for your files on 64-bit. I assume this was/is all fine on 32-bit?

The Java code that does that is here if you're interested: https://github.com/google/sagetv/blo...rser.java#L259

Last edited by wnjj; 04-29-2019 at 10:18 PM.
Reply With Quote
  #10  
Old 04-29-2019, 11:19 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Some GitHub issues similar to yours:

https://github.com/google/sagetv/issues/222

https://github.com/google/sagetv/issues/232
Reply With Quote
  #11  
Old 04-30-2019, 08:15 AM
guho guho is offline
Sage Advanced User
 
Join Date: Feb 2005
Posts: 151
Many Thanks!

skip_internal_format_parser=true, great workaround. These channels now work for me, even as Live TV.

I can't confirm that my live tv troubles were linked to my 64-bit upgrade. It could be something changed in the stream from FIOS, making it incompatible with the internal format detector.
Reply With Quote
  #12  
Old 04-30-2019, 08:57 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by guho View Post
Many Thanks!

skip_internal_format_parser=true, great workaround. These channels now work for me, even as Live TV.

I can't confirm that my live tv troubles were linked to my 64-bit upgrade. It could be something changed in the stream from FIOS, making it incompatible with the internal format detector.
Ok, thanks. I don’t want to spend a bunch of time looking for a 64-bit issue then. I may still run your sample video through the internal one here with logging added to see why it fails. I have it downloaded already.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LiveTV/timeshifting problem & plays fine after recording ends guho SageTV Software 0 04-28-2019 08:54 AM
HD200 No Video, Sage plays fine frostykev SageTV Media Extender 3 02-01-2013 07:46 PM
SageTV Stutters on x.264 / Plays fine in WMP Classic RickWakeman SageTV Software 20 09-11-2009 09:13 AM
SD plays just fine HD doesnt recoil SageTV Software 3 07-24-2009 05:17 PM
How To Disable PVR-LiveTV TimeShifting (HDD Constant Recording) EyeCandy SageTV Software 11 08-16-2008 02:58 AM


All times are GMT -6. The time now is 12:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.