SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Github Development (http://forums.sagetv.com/forums/forumdisplay.php?f=53)
-   -   9.2.1 LiveTV/timeshifting problem & plays fine after recording ends (http://forums.sagetv.com/forums/showthread.php?t=65962)

guho 04-28-2019 04:20 PM

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?

guho 04-28-2019 08:55 PM

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+) ");

wnjj 04-28-2019 09:48 PM

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.

guho 04-29-2019 08:05 AM

Quote:

Originally Posted by wnjj (Post 620786)
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

wnjj 04-29-2019 08:19 AM

Quote:

Originally Posted by guho (Post 620787)
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.

wnjj 04-29-2019 09:22 AM

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?

guho 04-29-2019 03:27 PM

Yes, and I can also post the initial few megs of the Transport Stream in question later today.

guho 04-29-2019 05:30 PM

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.

wnjj 04-29-2019 10:13 PM

Quote:

Originally Posted by guho (Post 620794)
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

wnjj 04-29-2019 11:19 PM

Some GitHub issues similar to yours:

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

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

guho 04-30-2019 08:15 AM

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.

wnjj 04-30-2019 08:57 AM

Quote:

Originally Posted by guho (Post 620800)
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.


All times are GMT -6. The time now is 02:06 AM.

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