Bug #4040
Some playback files chopy, streaming okay
100%
Description
I have a problem with one of my TV channels when playing recordings.
1. Streaming live TV plays back fine. No video chopping
2. Recording the same channel, the resulting recording is choppy and does not play back correctly.
I have verified that the recording is still choppy when downloading the recording file and playing it locally on my PC.
I'm not sure if it is relevant, but his is the media information of the resulting mkv file:
Video
ID : 1
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : No
Format settings, Matrix : Custom
Format settings, picture structure : Frame
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 31mn 59s
Bit rate mode : Variable
Bit rate : 1 076 Kbps
Maximum bit rate : 10 000 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 2.083 fps
Original frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.246
Time code of first frame : 17:36:19:02
Time code source : Group of pictures header
Stream size : 246 MiB (79%)
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : A_MPEG/L3
Codec ID/Hint : MP3
Duration : 31mn 59s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : 1mn 5s
Stream size : 58.6 MiB (19%)
Language : English
Default : Yes
Forced : No
Text
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English
Default : Yes
Forced : No
Please let me know if you need further information.
Files
History
Updated by Mark C-S about 8 years ago
Note that the following file plays file, without the 'chop':
Video
ID : 1
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : No
Format settings, Matrix : Custom
Format settings, picture structure : Frame
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 9mn 23s
Bit rate mode : Variable
Bit rate : 2 520 Kbps
Maximum bit rate : 15.0 Mbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.243
Stream size : 169 MiB (89%)
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Mode : Joint stereo
Mode extension : Intensity Stereo + MS Stereo
Codec ID : A_MPEG/L3
Codec ID/Hint : MP3
Duration : 9mn 23s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -1s 449ms
Stream size : 17.2 MiB (9%)
Language : English
Default : Yes
Forced : No
Updated by Mark C-S about 8 years ago
I noticed that in the first example with choppy playback, the frame rate is Frame rate : 2.083 fps
Updated by Mark C-S about 8 years ago
Changing the stream profile to 'pass' works okay. It seems to be something when using profile 'matroska'
Updated by Jaroslav Kysela about 8 years ago
Could you try to change '#if 1' to '#if 0' in src/plumbing/tsfix.c ?
Updated by Mark C-S about 8 years ago
Jaroslav Kysela wrote:
Could you try to change '#if 1' to '#if 0' in src/plumbing/tsfix.c ?
First try, I got the following two errors:
src/plumbing/tsfix.c:383:9: error: ‘total’ undeclared (first use in this function)
src/plumbing/tsfix.c:384:17: error: ‘srch’ undeclared (first use in this function)
So I uncommented out these two lines:
// th_pktref_t *srch;
// int total;
Rebuilt and it seems to work! Great.
What has that bit of code been excluded from the builds?
Updated by Jaroslav Kysela about 8 years ago
If your stream is on SAT, could you give me hints where I can test this (position / channel name)? Or could you give me log for '--trace parser,tsfix,globalheaders' when you tune to the affected channel ? https://tvheadend.org/projects/tvheadend/wiki/Traces
Updated by Mark C-S about 8 years ago
- File tvheadend_ABC_log1.txt tvheadend_ABC_log1.txt added
This is not SAT, it is a free to air channel.
Attached are the logs. Note, that this is with the original code ( '#if 1' ).
Updated by Jaroslav Kysela about 8 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|50a370707aedf5c127e92bb517c378aa8ac04657.