Transcoding video stutter, audio loss, time de-sync
I tried to stream an episode of Horizon to my Panasonic TX-42PVT30B but experienced the problems in the subject.
The source file is x264/AAC in MKV. My TV only supports AAC in MP4, MOV or TS containers. So I created a rule to transcode to MPEG2-TS and AC3:
<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="matroska" vCodec="h264" aCodec="aac" />
</Video>
However, near the beginning there is some break-up between audio/video and around 17:34 the video and audio break down completely.
If I play the file in Media Player Classic Home Cinema x64 on Windows 7 SP1 then it plays fine.
If I transcode the MKV with tsMuxer to TS/H264/AC3 then it also plays fine when streamed.
File properties and the output from tsMuxer follow:
General
Unique ID : 252279090025133653928121879257246286925 (0xBDCB2F75357E7845AFCAFAE95F47444D)
Complete name : C:\Users\Public\Videos\Horizon - 50x10 - Out of Control.mkv
Format : Matroska
Format version : Version 2
File size : 1.50 GiB
Duration : 58mn 26s
Overall bit rate : 3 663 Kbps
Encoded date : UTC 2012-03-14 07:37:40
Writing application : mkvmerge v5.4.0 ('Piper') built on Mar 10 2012 13:34:39
Writing library : libebml v1.2.3 + libmatroska v1.3.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 6 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 58mn 26s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 120 r2164 da19765
Encoding settings : cabac=1 / ref=6 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=150 / keyint_min=15 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 58mn 26s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
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 : No
Forced : No
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Decoding H264 stream (track 1): Profile: High@4.1 Resolution: 1280:720p Frame rate: 25
H.264 stream does not contain fps field. Muxing fps=25
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AAC stream (track 2): Sample Rate: 48KHz Channels: 2
Decoding PGS stream (track 3): Resolution: 1280:720 Frame rate: 25
B-pyramid level 1 detected. Shift DTS to 2 frames
H264 bitstream changed: insert SPS/PPS units
Processed 87663 video frames
Mux successful complete.
Muxing time: 52 sec
The source file is x264/AAC in MKV. My TV only supports AAC in MP4, MOV or TS containers. So I created a rule to transcode to MPEG2-TS and AC3:
<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="matroska" vCodec="h264" aCodec="aac" />
</Video>
However, near the beginning there is some break-up between audio/video and around 17:34 the video and audio break down completely.
If I play the file in Media Player Classic Home Cinema x64 on Windows 7 SP1 then it plays fine.
If I transcode the MKV with tsMuxer to TS/H264/AC3 then it also plays fine when streamed.
File properties and the output from tsMuxer follow:
General
Unique ID : 252279090025133653928121879257246286925 (0xBDCB2F75357E7845AFCAFAE95F47444D)
Complete name : C:\Users\Public\Videos\Horizon - 50x10 - Out of Control.mkv
Format : Matroska
Format version : Version 2
File size : 1.50 GiB
Duration : 58mn 26s
Overall bit rate : 3 663 Kbps
Encoded date : UTC 2012-03-14 07:37:40
Writing application : mkvmerge v5.4.0 ('Piper') built on Mar 10 2012 13:34:39
Writing library : libebml v1.2.3 + libmatroska v1.3.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 6 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 58mn 26s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 120 r2164 da19765
Encoding settings : cabac=1 / ref=6 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=150 / keyint_min=15 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 58mn 26s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
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 : No
Forced : No
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Decoding H264 stream (track 1): Profile: High@4.1 Resolution: 1280:720p Frame rate: 25
H.264 stream does not contain fps field. Muxing fps=25
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert pict timing and buffering period SEI units
Decoding AAC stream (track 2): Sample Rate: 48KHz Channels: 2
Decoding PGS stream (track 3): Resolution: 1280:720 Frame rate: 25
B-pyramid level 1 detected. Shift DTS to 2 frames
H264 bitstream changed: insert SPS/PPS units
Processed 87663 video frames
Mux successful complete.
Muxing time: 52 sec