Project

General

Profile

Bug #3195

TVH Fails to correctly demux TS files coming from VLC streaming

Added by The Troll almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Category:
Parsers
Target version:
-
Start date:
2015-10-22
Due date:
% Done:

0%

Estimated time:
Found in version:
472131f5
Affected Versions:

Description

Hi,

I noticed that when I use a VLC TS output as IPTV Service, it fails demuxing correctly and there are artifacts on video.
It happens only in HLS and in transcoding modes (when the stream is actually demuxed).

To test, you can use the sample file attached (output from VLC remux).
The file was generated using mux=ts in VLC.
Then in TVHeadend, add a new IPTV and select your TS input like this:

pipe:///bin/cat [PATH]/demuxing_fails.ts

Scan it and play it with Kodi or transcoded.

You will see a lot of decoding artifacts (and decoding errors if you actually transcode).

If you add ffmpeg to remux in the middle, it works:

pipe:///usr/bin/ffmpeg -i [PATH]/demuxing_fails.ts -vcodec copy -acodec copy -f mpegts -

It looks like a demuxer issue.

Thanks


Files

demuxing_fails.ts (99 MB) demuxing_fails.ts Output from VLC remuxing The Troll, 2015-10-22 14:09
fail_demuxing_20151031.ts (21.1 MB) fail_demuxing_20151031.ts The Troll, 2015-10-31 20:49

History

#1

Updated by Jaroslav Kysela almost 6 years ago

  • Assignee changed from Andreas Smas to Jaroslav Kysela

Attach the file. There's 100MB limit, I think.

#2

Updated by The Troll almost 6 years ago

I thought I did!
Let's try again

#3

Updated by Jaroslav Kysela almost 6 years ago

I can confirm - the H264 stream is corrupted.

#4

Updated by The Troll almost 6 years ago

After TVH demuxing you mean right ?
In the original TS, it's fine.

#5

Updated by Jaroslav Kysela almost 6 years ago

Yes, the H264 stream parser (MPEG-TS H264 demuxer) is somewhat broken. It seems that a little part of frames is cut.

#6

Updated by The Troll almost 6 years ago

Ok, looking forward to a fix :)

#7

Updated by Jaroslav Kysela almost 6 years ago

I pushed upstream first parser fixes, but the picture is not perfect yet. It seems that ffmpeg reorders input NALs a little bit differently:

      Tvheadend                      FFMPEG
      -------------------------------------------------------
      NAL0: 000029 (NAL_SPS        ) 000002 (NAL_AUD        )
      NAL1: 000005 (NAL_PPS        ) 000029 (NAL_SPS        )
      NAL2: 000002 (NAL_AUD        ) 000005 (NAL_PPS        )
      NAL3: 000011 (NAL_SEI        ) 000011 (NAL_SEI        )
      NAL4: 186181 (NAL_SLICE      ) 186181 (NAL_SLICE      )
#8

Updated by The Troll almost 6 years ago

Hi,

I tested and it's much much better!
I saw some occasional glitches but I am not sure it comes from the network/transcoding or what you mention in not perfect...

Thanks a lot for working on this so quickly.

#9

Updated by The Troll almost 6 years ago

Hi!

I have another stream that seems to create problem...
With pipe://ffmpeg it works fine.

It is attached, could you have a look ?

Thanks!

Also available in: Atom PDF