[mythtv-commits] Ticket #12047: mythplayer picks the wrong fps for 1080i matroska, degrading to 1xHW deint
MythTV
noreply at mythtv.org
Sun Apr 27 12:00:26 UTC 2014
#12047: mythplayer picks the wrong fps for 1080i matroska, degrading to 1xHW deint
-------------------------------------+--------------------------------
Reporter: angela.schmid@… | Owner:
Type: Patch - Bug Fix | Status: infoneeded_new
Priority: major | Milestone: 0.28
Component: MythTV - Video Playback | Version: Master Head
Severity: high | Resolution:
Keywords: deinterlace mkv 1080i | Ticket locked: 0
-------------------------------------+--------------------------------
Comment (by angela.schmid@…):
Patch didn't compile on 0.27 and master:
{{{
avformatdecoder.cpp: In member function ‘float
AvFormatDecoder::normalized_fps(AVStream*, AVCodecContext*)’:
avformatdecoder.cpp:1351:13: error: ‘st’ was not declared in this scope
}}}
Changed 'st' to 'stream' and tested on 0.27-fixes.
The patch works for media as the one shown above.
I didn't had good luck with lossless_cut (uses mkvmerge) and 1080i
material with minimal glitches, so I changed my workflow in the meantime
and use ts-doctor (which at the end produces correct total times and
proper FFWD) and avconv.
I don't have the original chinese wall recording anymore and the resulting
mkv has been converted with the following:
{{{
avconv -y -i input-tsdoctor.mpg -r 25 -c:v libx264 -flags
+ilme+ildct+loop -cmp chroma -deblock 0:0 -r 25 -bt 256k -coder 0
-me_method full -me_range 16 -subq 5 -partitions
+parti4x4+parti8x8+partp8x -g 250 -keyint_min 25 -trellis 2 -sc_threshold
40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qdiff 4 -refs 2 -direct-pred
1 -wpredp 2 -rc_lookahead 30 -profile:v baseline -level 30 -bf 0 -coder 0
-crf 22 -qmin 2 -qmax 30 -b:v 5000K -c:a copy -ar 44100 -ac 2 -b:a 128K
-map 0:0 -map 0:a:0 -sn -f matroska output.mkv
}}}
which produces MBAFF
{{{
General
Unique ID :
63265251044264927949292968836987650338
(0x2F9871B35334230A54E4639435FC8122)
Complete name : Die sieben Wunder Chinas S01E06
Die Verbotene Stadt.mkv
Format : Matroska
Format version : Version 2
File size : 1.69 GiB
Duration : 23mn 59s
Overall bit rate : 10.1 Mbps
Writing application : Lavf53.21.1
Writing library : Lavf53.21.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main at L3.0
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 59s
Bit rate : 9 489 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Bits/(Pixel*Frame) : 0.183
Stream size : 1.59 GiB (94%)
Writing library : x264 core 120 r2151 a3f4407
Encoding settings : cabac=0 / ref=2 / deblock=1:0:0
/ analyse=0x1:0x1 / me=umh / subme=5 / psy=1 / psy_rd=1.00:0.00 /
mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 /
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 /
sliced_threads=0 / nr=0 / decimate=1 / interlaced=tff / bluray_compat=0 /
constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 /
scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 /
crf=22.0 / qcomp=0.60 / qpmin=2 / qpmax=30 / qpstep=4 / ip_ratio=1.41 /
aq=1:1.00
Default : Yes
Forced : No
}}}
Your patch produces for MBAFF media the wrong FPS, interlacing is detected
correctly:
{{{
CoreContext avformatdecoder.cpp:1256 (normalized_fps) - AFD: Selected FPS
is 12.5 (avg 12.5 codec 25 container 1000 estimated 25 ticks_per_frame 2)
CoreContext mythplayer.cpp:1748 (SetFrameInterval) - Player(6):
SetFrameInterval ps:1 scan:3
CoreContext mythplayer.cpp:670 (detectInterlace) - Player(6):
detectInterlace(Detect Scan, Interlaced Scan, 12.5, 1080) ->Interlaced
Scan
}}}
For MBAFF no patch is needed, my patch does not interfere.
OT:
I searched for other tools other than mediainfo to inspect the interlace
status, but couldn't find one showing interlacing for MBAFF media, any
suggestions.
OT:
Is MBAFF good, or should I use another avconv command, any suggestions.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12047#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list