mkv - video lagging behind audio

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

mkv - video lagging behind audio

Postby jaffar » Sat Apr 25, 2009 9:58 am

hi
i am trying to watch a 1080p mkv (which works great otherwise, playerd with vlc) throug PMS. it has no external subtitles.
it starts well, but after ~30 seconds the video starts to become slower than the audio and it goes more and more behind. in the debug log i get these messages:

[Thread-31576] DEBUG 11:51:15.206 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31576] DEBUG 11:51:15.206 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.206 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31576] DEBUG 11:51:15.206 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.209 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31576] DEBUG 11:51:15.209 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.209 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31576] DEBUG 11:51:15.209 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.209 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31571] DEBUG 11:51:15.214 Too many video packets in the buffer: (1319 in 33558211 bytes).
[Thread-31576] DEBUG 11:51:15.243 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.243 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31576] DEBUG 11:51:15.243 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-31576] DEBUG 11:51:15.252 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-31571] DEBUG 11:51:15.334 Too many video packets in the buffer: (1319 in 33571543 bytes).
[Thread-31571] DEBUG 11:51:15.348 Too many video packets in the buffer: (1318 in 33562809 bytes).
[Thread-31571] DEBUG 11:51:15.407 Too many video packets in the buffer: (1318 in 33554557 bytes).
[Thread-31571] DEBUG 11:51:15.407 Too many video packets in the buffer: (1318 in 33562035 bytes).
[Thread-31571] DEBUG 11:51:15.407 Too many video packets in the buffer: (1318 in 33560737 bytes).
[Thread-31571] DEBUG 11:51:15.407 Too many video packets in the buffer: (1318 in 33559304 bytes).
[Thread-31571] DEBUG 11:51:15.412 Too many video packets in the buffer: (1318 in 33575442 bytes).
[Thread-31571] DEBUG 11:51:15.426 Too many video packets in the buffer: (1317 in 33560314 bytes).

process looked like this:

[mencoder] INFO 11:42:00.601 Starting mencoder -ss 9.84 -quiet /storage/download/Discovery.Channel.1000.Places.To.See.Before.You.Die.Pack.HDTV.XviD/1000.Places.To.See.India.1080.DivX.AC3.mkv -quiet -quiet -oac lavc -of mpeg -lavfopts form at=asf -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=640:threads=4:keyint=1:vqscale=1:vqmin=2 -quiet -fontconfig -subcp cp1250 -fribidi-charset cp1250 -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 2 -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 25 -quiet -quiet -mc 0 -noskip -af lavcresample=48000 -srate 48000 -o /tmp/javaps3media/mencoder1240648920474

anything i can set to solve this ?
other movies from the series worked fine, this is the first one that produces the problem.
thanks
jaffar
 
Posts: 23
Joined: Sat Mar 07, 2009 1:34 pm

Re: mkv - video lagging behind audio

Postby shagrath » Sat Apr 25, 2009 10:35 am

can you provide detailed infos on this video ? (framerate, etc.)
shagrath
Project Lead
 
Posts: 2667
Joined: Wed Jan 14, 2009 1:39 pm

Re: mkv - video lagging behind audio

Postby jaffar » Sat Apr 25, 2009 11:06 am

sure - i just don't know where to find lots of details. here's what VLC gives me:

codec details

stream 0
codec DX50
language english
type video
resolution 1920x1080

stream 1
codec a52
language english
type audio
channels 5
sample rate 48000 hz

ahd here's what gspot gives me (attached screenshot)
gspot.gif
gspot.gif (105.42 KiB) Viewed 1625 times


and mediainfo (seems to be different from gspot - the real length of the movie is 45:39)

General
Complete name : X:\Discovery.Channel.1000.Places.To.See.Before.You.Die.Pack.HDTV.XviD\1000.Places.To.See.India.1080.DivX.AC3.mkv
Format : Matroska
File size : 2.03 GiB
Duration : 45mn 39s
Overall bit rate : 6 375 Kbps
Writing application : AVI-Mux GUI 1.17.7, Aug 8 2006 20:59:17
Writing library : matroska muxer by Alexander Noe, build date Aug 8 2006

Video
Format : MPEG-4 Visual
Format profile : Simple@L1
Format settings, BVOP : Yes
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default
Codec ID : DX50
Codec ID/Hint : DivX 5
Duration : 45mn 37s
Bit rate : 5 730 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16/9
Frame rate : 29.970 fps
Original frame rate : 25.000 fps
Resolution : 24 bits
Scan type : Progressive
Writing library : 3ivx

Audio
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 45mn 39s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48.0 KHz
jaffar
 
Posts: 23
Joined: Sat Mar 07, 2009 1:34 pm

Re: mkv - video lagging behind audio

Postby shagrath » Sat Apr 25, 2009 2:19 pm

interesting, it's rare to see mpeg4 in a matroska container
in "expert settings", try to add

container == matroska && vcodec == mpeg4 :: -mc 0.1
shagrath
Project Lead
 
Posts: 2667
Joined: Wed Jan 14, 2009 1:39 pm

Re: mkv - video lagging behind audio

Postby jaffar » Sat Apr 25, 2009 6:55 pm

i've added the option and restarted PMS.sh, there's no change:

Code: Select all
[Thread-162] DEBUG 20:46:09.515 Too many video packets in the buffer: (1209 in 33589825 bytes).
[Thread-162] DEBUG 20:46:09.515 Too many video packets in the buffer: (1208 in 33566560 bytes).
[Thread-162] DEBUG 20:46:09.515 Too many video packets in the buffer: (1208 in 33592814 bytes).
[Thread-162] DEBUG 20:46:09.515 Too many video packets in the buffer: (1207 in 33573330 bytes).
[Thread-166] DEBUG 20:46:09.515 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-166] DEBUG 20:46:09.515 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-166] DEBUG 20:46:09.515 Maybe you are playing a non-interleaved stream/file or the codec failed?
[Thread-166] DEBUG 20:46:09.515 For AVI files, try to force non-interleaved mode with the -ni option.
[Thread-166] DEBUG 20:46:09.515 Maybe you are playing a non-interleaved stream/file or the codec failed?


what's funny is that the PS shows the correct movie length.
from the log, i think that the newly added option was ignored (-mc 0) :

Code: Select all
[mkfifo] INFO  20:42:56.535 Starting mkfifo --mode=777 /tmp/javaps3media/mencoder1240681376534
[mencoder] INFO  20:42:56.586 Starting mencoder -ss 0 -quiet /storage/download/Discovery.Channel.1000.Places.To.See.Before.You.Die.Pack.HDTV.XviD/1000.Places.To.See.India.1080.DivX.AC3.mkv -quiet -quie
t -oac lavc -of mpeg -lavfopts format=asf -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:ac
odec=ac3:abitrate=640:threads=4:keyint=1:vqscale=1:vqmin=2 -quiet -fontconfig -subcp cp1250 -fribidi-charset cp1250 -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 2 -ass-force-style Fon
tName=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 25 -quiet -quiet -mc 0 -noskip -af lavcresample=48000 -srate 48000 -o /tmp/javaps3media/mencoder1240681376534
[mencoder] INFO  20:42:56.604 Reading pipe: /tmp/javaps3media/mencoder1240681376534
[mencoder] DEBUG 20:42:56.604 Opening file /tmp/javaps3media/mencoder1240681376534 for reading...


and here's the identifying part too:

Code: Select all
[pool-10-thread-3] DEBUG 20:42:51.504 Media info of : /storage/download/Discovery.Channel.1000.Places.To.See.Before.You.Die.Pack.HDTV.XviD/1000.Places.To.See.France.1080.DivX.AC3.mkv / mimeType: video/
mp4 / container: matroska / bitrate: 0 / size: 2144455590 / codecV: mpeg4 / duration: 00:43:29.500 / width: 1920 / height: 1080 / frameRate: 25.00 / thumb size : 7896
        audio: id=0 / lang: eng / codec: ac3 / sf:48000
jaffar
 
Posts: 23
Joined: Sat Mar 07, 2009 1:34 pm


Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 5 guests