Log in

View Full Version : tv internal media player does'nt play re-encoded .mkv


reinen
14th January 2011, 11:08
I have problems with playing a .mkv via the internal media player of my samsung led tv. The firmware of the tv is up to date and the video and audio formats/codecs of the file should actually be supported too.
I re-encoded the file with ffmpeg to change the h264 level from 5.1 to 4.1.
The curious thing about it is that the tv has no problem to play another .mkv of nearly the same setting (to my knowledge encoded with the same codecs).
I already tried to adjust the settings of the broken .mkv to those of the other one by removing the subtitle stream and lowering the ref frame rate from 16 to 4 with no success.
Perhaps anybody can have a look at the outputs that mediainfo gave me and tell me what I could have missed.
Are there any important differences between these two files which could be responsible for my dilemma?

mediainfo ouput of the .mkv, that the tv has problems to play with:
General
UniqueID : 69360328613891285784370121761979159365 (0x342E5039DE55E30146F9F5AA6FC8D345)
Complete name : /home/reinen/input-x264-L4.1.mkv
Format : Matroska
File size : 4.37 GiB
Duration : 49mn 56s
Overall bit rate : 12.5 Mbps
Writing application : Lavf52.92.0
Writing library : Lavf52.92.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 49mn 56s
Bit rate : 12.1 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Original frame rate : 24.472 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.243
Stream size : 4.13 GiB (94%)
Writing library : x264 core 55 svn-655
Encoding settings : cabac=1 / ref=16 / deblock=1:-2:-1 / analyse=0x3:0x133 / me=umh / subme=7 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=2 / nr=0 / decimate=0 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=12087 / ratetol=1.5 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
Language : English

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 49mn 56s
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 160 MiB (4%)
Title : English (AC3)
Language : English / English

Text
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : English / English


mediainfo output of the .mkv that the tv plays without any problems:
General
UniqueID : 206967699371913491422205325509297378405 (0x9BB4876AD93E4872DF48212091B71465)
Complete name : /media/MEDIAPLATTE/input-x264.mkv
Format : Matroska
File size : 2.96 GiB
Duration : 29mn 22s
Overall bit rate : 14.4 Mbps
Encoded date : UTC 2011-01-09 14:34:47
Writing application : mkvmerge v3.0.0 ('Hang up your Hang-Ups') gebaut am Dec 29 2009 00:24:14
Writing library : libebml v0.7.7 + libmatroska v0.8.1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 29mn 22s
Bit rate : 13.5 Mbps
Nominal bit rate : 14.2 Mbps
Width : 1 920 pixels
Height : 1 080 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
Bits/(Pixel*Frame) : 0.260
Stream size : 2.77 GiB (94%)
Writing library : x264 core 80 r1376M 3feaec2
Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=10 / psy=1 / psy_rd=1.0:0.2 / mixed_ref=0 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=5 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=14240 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 / ip_ratio=1.40 / aq=1:1.00
Language : English

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 29mn 22s
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 134 MiB (4%)
Language : English

Text
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English

Menu
00:00:00.000 : en:00:00:00.000
00:10:38.680 : en:00:10:38.680
00:17:09.480 : en:00:17:09.480
00:27:17.000 : en:00:27:17.000


Thanks for your help,
reinen

nurbs
14th January 2011, 11:25
The first file isn't level 4.1 even if the label says so. Level 4.1 allows a maximum of 4 reference frames with 1080p content, your file has 16. The only way to lower the number of reference frames is to reencode.

J_Darnley
14th January 2011, 11:36
Also no B-pyramid and VBV limits

reinen
14th January 2011, 12:35
Thank you, nurbs and J_Darnley.

I've already tried to lower the reframerate before this way:

ffmpeg -i infile -vcodec copy -acodec copy -scodec copy -vbsf h264_changesps=level=41[/ref=4] outfile


...unfortunately with no success.

I'll try it once more paying attention to J_Darnleys advices too.
Am I right to set -b_pyramid=0 and vbv_maxrate=0 in my ffmpeg command? What about vbv_bufsize? Besides there are no vbv entries in my broken .mkv at the moment.

cheers,
reinen

Ghitulescu
14th January 2011, 14:49
How to say this in a gentle manner? Well, taking apart that most manufacturers do not know the difference between a container (AVI or MKV) and a codec (H.264, MPEG-2) and so on (because the leaflets and the instruction manuals are written by marketing dept), most things are both intentionally and unintentionally written wrong, to be more appealing but in the same time to have a legal fallback position. Mentioning all things in a mixed information does not automatically means that it would support all the possible combinations and parameters. From what I know, Samsung BD players do understand MKV but they need external subtitles (they can't read the muxed ones).

I used to give long time ago an example from an USB-capturing stick:
-resolution up to 640x480
-fps up to 30fps
-etc. etc. etc.
so the customer would be tricked to think that it would do 640x480x30
whereas the stick could capture either 640x480x15 or 320x240x30, because of the USB 1.1 version.

J_Darnley
14th January 2011, 15:07
Thank you, nurbs and J_Darnley.

I've already tried to lower the reframerate before this way:

ffmpeg -i infile -vcodec copy -acodec copy -scodec copy -vbsf h264_changesps=level=41[/ref=4] outfile

That doesn't change the number of refs used at all. As nurbs said, you have to encode it!

Am I right to set -b_pyramid=0 and vbv_maxrate=0 in my ffmpeg command? What about vbv_bufsize?

No and no. RTFM. -bufsize and -maxrate (in bits per second) and -flags2 -bpyramid

GodofaGap
14th January 2011, 15:48
How to say this in a gentle manner? Well, taking apart that most manufacturers do not know the difference between a container (AVI or MKV) and a codec (H.264, MPEG-2) and so on (because the leaflets and the instruction manuals are written by marketing dept), most things are both intentionally and unintentionally written wrong, to be more appealing but in the same time to have a legal fallback position. Mentioning all things in a mixed information does not automatically means that it would support all the possible combinations and parameters. From what I know, Samsung BD players do understand MKV but they need external subtitles (they can't read the muxed ones).
However the Samsung manuals I have seen are quite clear on combination of video and audio in containers and what kind of levels are supported. The bigger problem is that when the manual says "Supports up to H264, level 4.1" (this comes straight out of the Samsung manual) the average consumer has no idea what that means. Heck, I think most people here would at least have to look up what kind of restrictions there actually are then.

bernd_b
3rd August 2011, 19:44
Old thread, but I googled here and noticed this:

Frame rate : 23.976 fps
Original frame rate : 24.472 fps

If the media player reads the original frame rate (which is what my LG to my point of view does ignoring the frame rate given by the container) I would really wonder if this is playable by a stand alone player at all.