Project

General

Profile

Continuity counter error

Added by Michael Donet over 9 years ago

Has anyone got transcoding working stable? For me no matter what settings I set the video starts to stuttering after 15-20 minutes. When I restart stream it works fine for next 15-20 minutes.
CPU is I5-3470 so the usage is around 40% when transcoding HD content and much lower with SD.
Just wondering why it works for 15-20 minutes perfectly and then start to misbehave.
When it starts to stutter I get this in TVH log:

http://pastebin.com/aPuhD5n4

I have checked and re-alined my dish. All transponders report between 80-95% signal quality. The issue still exist only on transcoded content.
I can play two different channels at the same time - one transcoded and the other one not. Only the transcoded content stutter but only after 15 minutes.
Please advise something as I am running out of ideas.


Replies (13)

RE: Continuity counter error - Added by saen acro over 9 years ago

What container, video codec, audio codec?

RE: Continuity counter error - Added by Michael Donet over 9 years ago

Mkv, video - h264, audio - mp2.

RE: Continuity counter error - Added by Prof Yaffle over 9 years ago

The only other thought I have is to ask whether those libav errors are simply reflecting the CC errors - or whether they're the cause of the problem in some way. How are you building/installing your tvh binary? Are you using static ffmpeg (and what version), or dynamically linking (which I know has been problematic, but it should be possible)?

Does it happen just with the mkv/H.264/mp2 settings, or are others (e.g. VP8) any more successful?

If you create a recording profile that uses the same stream profile, does that work any better or does the recorded file also start to stutter?

Anything relevant in htop or similar when this is happening (e.g. an increasing memory usage for a process)?

I'm just thinking out loud, really...

RE: Continuity counter error - Added by Michael Donet over 9 years ago

I think that libav error are consequence of CC errors.
I build TVH like this: AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./Autobuild.sh -t precise-i386
I have no idea if I use static or dynamic ffmpeg.
I have tried H264 and VP8 as well but there is no difference.
I don't do recording, just live tv.
Htop shows nothing unusual, just about 40% CPU usage and about 50% memory usage.
No signs of memory leaks.

RE: Continuity counter error - Added by saen acro over 9 years ago

50% memory usage of 512Mb or 8Gb RAM /when write such stuff imagine how we are not with you behind your monitor/
check is there a difference if using
https://tvheadend.org/boards/5/topics/16651?r=16772#message-16772

12.04 have problems with ffmpeg from repo
try

sudo do-release-upgrade

precise work better

RE: Continuity counter error - Added by Michael Donet over 9 years ago

It's 50% of 1GB. Server runs Ubuntu 14.04. How is your build different from master?

RE: Continuity counter error - Added by saen acro over 9 years ago

Ubuntu 14.04.2 LTS (Trusty Tahr)

I build TVH like this: AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./Autobuild.sh -t precise-i386

Precise = 12.04
build on system with haven't such problems

saen@saen-ET1610PT:/opt/tvheadend$ ./configure
Checking support/features
  checking for cc execinfo.h ...                    ok
  checking for cc -mmmx ...                         ok
  checking for cc -msse2 ...                        ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic64 ...                      ok
  checking for cc lockowner ...                     ok
  checking for cc qsort_r ...                       ok
  checking for cc stime ...                         ok
  checking for cc recvmmsg ...                      ok
  checking for cc sendmmsg ...                      ok
  checking for cc libiconv ...                      fail
  checking for cc libdvben50221 ...                 ok
  checking for py module gzip ...                   ok
  checking for gzip ...                             ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok (detected 1.0.1f)
  checking for cc linux/dvb/version.h ...           ok
  checking for cc libhdhomerun/hdhomerun.h ...      fail
  checking for pkg zlib  ...                        ok (detected 1.2.8)
  checking for pkg liburiparser  ...                ok (detected 0.8.0.1)
  checking for pkg avahi-client  ...                ok (detected 0.6.31)
  checking for ffmpeg libraries ...                 fail
  checking for pkg libavcodec >=55.34.1 ...         ok (detected 56.1.0)
  checking for pkg libavutil >=53.3.0 ...           ok (detected 54.3.0)
  checking for pkg libavformat >=55.12.0 ...        ok (detected 56.1.0)
  checking for pkg libswscale >=2.1.2 ...           ok (detected 3.0.0)
  checking for pkg libavresample >=1.1.0 ...        ok (detected 2.1.0)
  checking for cc sys/inotify.h ...                 ok
  fetching dvb-scan files ...                       ok
  checking for pkg dbus-1  ...                      ok (detected 1.8.12)

Compiler:
  Using C compiler:                        cc
  Using LD flags:                           -ldvben50221 -ldvbapi -lucsi
  Build for arch:                          i686

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  cwc                                      yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         no
  hdhomerun_static                         no
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  imagecache                               yes
  avahi                                    yes
  zlib                                     yes
  libav                                    yes
  libffmpeg_static                         no
  libffmpeg_static_x264                    yes
  inotify                                  yes
  epoll                                    yes
  uriparser                                yes
  ccache                                   no
  tvhcsa                                   yes
  bundle                                   no
  dvbcsa                                   no
  dvben50221                               yes
  kqueue                                   no
  dbus_1                                   yes
  android                                  no
  tsdebug                                  no
  gtimer_check                             no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  getloadavg                               yes
  atomic64                                 yes
  lockowner                                yes
  qsort_r                                  yes
  stime                                    yes
  recvmmsg                                 yes
  sendmmsg                                 yes
  libdvben50221                            yes
  py_gzip                                  yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  upnp                                     yes
  inotify_h                                yes
  linuxdvb_ca                              yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.0.1f
  zlib                                     1.2.8
  liburiparser                             0.8.0.1
  avahi-client                             0.6.31
  libavcodec                               56.1.0
  libavutil                                54.3.0
  libavformat                              56.1.0
  libswscale                               3.0.0
  libavresample                            2.1.0
  dbus-1                                   1.8.12

Installation paths:
  Prefix:                                  /usr/local
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               ${datadir}/man

in About there is a link "Toggle details" where is show what version you use in time of compilation
ps. Jaroslav Kysela can you move this above image because 1366x768 screen hide content

RE: Continuity counter error - Added by Prof Yaffle over 9 years ago

Not sure that the precise-i386 bit does anything other than set the architecture to 32-bit (i686) and then name the output file. It doesn't change the target binaries AFAIK.

You're using static ffmpeg (--enable-libffmpeg_static), so 'make' downloads ffmpeg, compiles it and statically links in the required libraries. You will keep using whatever version you downloaded when you first built it, however, until you either 'make clean' or manually remove the libav_static directory in your build directory ... I think we're currently using ffmpeg 2.6.3, so check in libav_static for that.

Perhaps worth trying a build from a different system, just in case something's up there.

I'd still test what happens when you use the same profile to record a file, as that might at least give something to analyse. I'd also try ts as a container as it's theoretically lower overhead - especially if you don't rewrite the PAT/EIT/etc. Along with the errors you posted, it sounds like you're losing sync frames or timer 'ticks' in the stream - but, as I said, I'm no expert here. Might be worth popping over to #hts on freenode to see if anyone there uses transcoding and can suggest what's up.

RE: Continuity counter error - Added by Michael Donet over 9 years ago

I cannot find "Toggle details" link.

here is my build log:

  Checking support/features
  checking for cc execinfo.h ...                    ok
  checking for cc -mmmx ...                         ok
  checking for cc -msse2 ...                        ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic64 ...                      ok
  checking for cc lockowner ...                     ok
  checking for cc qsort_r ...                       ok
  checking for cc stime ...                         ok
  checking for cc recvmmsg ...                      ok
  checking for cc sendmmsg ...                      ok
  checking for cc libiconv ...                      fail
  checking for cc libdvben50221 ...                 fail
  checking for py module gzip ...                   ok
  checking for gzip ...                             ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok (detected 1.0.1f)
  checking for cc linux/dvb/version.h ...           ok
  checking for cc libhdhomerun/hdhomerun.h ...      fail
  checking for pkg zlib  ...                        ok (detected 1.2.8)
  checking for pkg liburiparser  ...                ok (detected 0.7.5)
  checking for pkg avahi-client  ...                ok (detected 0.6.31)
  checking for cc sys/inotify.h ...                 ok
  fetching dvb-scan files ...                       ok
  checking for pkg dbus-1  ...                      ok (detected 1.6.18)

Compiler:
  Using C compiler:                        cc
  Build for arch:                          x86_64

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  cwc                                      yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         no
  hdhomerun_static                         no
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  imagecache                               yes
  avahi                                    yes
  zlib                                     yes
  libav                                    yes
  libffmpeg_static                         yes
  libffmpeg_static_x264                    yes
  inotify                                  yes
  epoll                                    yes
  uriparser                                yes
  ccache                                   no
  tvhcsa                                   yes
  bundle                                   no
  dvbcsa                                   no
  dvben50221                               no
  kqueue                                   no
  dbus_1                                   yes
  android                                  no
  tsdebug                                  no
  gtimer_check                             no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  getloadavg                               yes
  atomic64                                 yes
  lockowner                                yes
  qsort_r                                  yes
  stime                                    yes
  recvmmsg                                 yes
  sendmmsg                                 yes
  py_gzip                                  yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  upnp                                     yes
  inotify_h                                yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.0.1f
  zlib                                     1.2.8
  liburiparser                             0.7.5
  avahi-client                             0.6.31
  dbus-1                                   1.6.18

Installation paths:
  Prefix:                                  /usr/local
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               ${datadir}/man

Final Binary:
  /home/tvh/tvheadend/build.linux/tvheadend

Tvheadend Data Directory:
  /usr/local/share/tvheadend

RE: Continuity counter error - Added by saen acro over 9 years ago

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

I cannot find "Toggle details" link.

in "About" page
on each version after 4.1.180

RE: Continuity counter error - Added by Michael Donet over 9 years ago

It shows this:

Configure arguments:
  --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/tvheadend --disable-maintainer-mode --disable-dependency-tracking --enable-libffmpeg_static --arch=x86_64

Compiler:
  Using C compiler:                        cc
  Build for arch:                          x86_64

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  cwc                                      yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         no
  hdhomerun_static                         no
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  imagecache                               yes
  avahi                                    yes
  zlib                                     yes
  libav                                    yes
  libffmpeg_static                         yes
  libffmpeg_static_x264                    yes
  inotify                                  yes
  epoll                                    yes
  uriparser                                yes
  ccache                                   no
  tvhcsa                                   yes
  bundle                                   no
  dvbcsa                                   no
  dvben50221                               no
  kqueue                                   no
  dbus_1                                   yes
  android                                  no
  tsdebug                                  no
  gtimer_check                             no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  getloadavg                               yes
  atomic64                                 yes
  lockowner                                yes
  qsort_r                                  yes
  stime                                    yes
  recvmmsg                                 yes
  sendmmsg                                 yes
  py_gzip                                  yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  upnp                                     yes
  inotify_h                                yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.0.1f
  zlib                                     1.2.8
  liburiparser                             0.7.5
  avahi-client                             0.6.31
  dbus-1                                   1.6.18

Installation paths:
  Prefix:                                  /usr
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               /usr/share/man

RE: Continuity counter error - Added by Michael Donet over 9 years ago

So I have installed fresh Ubuntu 14.04 x64, latest driver for my tuner, latest Tvheadend from master and the issue is still there.
Loads of CC errors when transcoding. I think that it's down to TVH as I tried on two different systems with two different PCI tuners (S952 and TBS6981).
Hope it will be fixed at some point. Till then I assume that transcoding is broken.

RE: Continuity counter error - Added by saen acro over 9 years ago

What show femon

$ sudo femon -H
FE: DiBcom 3000MC/P (DVBT)

status SCVYL | signal  97% | snr  74% | ber -1076102844 | unc -1218408725 | FE_HAS_LOCK
status SCVYL | signal  97% | snr  74% | ber -1076102844 | unc -1218408725 | FE_HAS_LOCK
status SCVYL | signal  97% | snr  74% | ber -1076102844 | unc -1218408725 | FE_HAS_LOCK
bad signal
$sudo femon -H -a 1
FE: Afatech AF9013 (DVBT)
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal 100% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK

signal ok
    (1-13/13)