Open quarnster opened 11 years ago
I have tested the code you wrote for SetNativeResolution and it allows me to change between 1920x1080p and 1920x1080i. I can change to other resolutions as well but then the screen just turns black but the tv does recognize the resolution change and the call to gdl returns success. Don't know if it has anything to do with that xbmc is locked to windowed display mode or not.
I'd suggest digging into the boxee sources and see what it does when changing resolution if you want to tackle this one.
boxee is using sort of script see set resolution sh script in boxee dir. also soort of get native hdmi file,
I'm checking for what might control the auto refresh rate for movies and why it's not possible to choose a lower refresh rate from the settings. For me the refresh rate is set to 24fps from the start if I don't tuch anything the settings for it. Sadly this area is hard to understand since the code for xbmc is extensive and what works for other systems might not work here. I'm trying to understand why the the options for auto sync the refreshrate is not visible in the options, but have had no luck so far.
Any help is appreciated.
The Raspbarry Pi seems to not use xrandr or X11 either so that should not be the problem I guess.
trying to understand why the the options for auto sync the refreshrate
IIRC you need to enable expert mode (press left while in the settings menu) to make that option show.
Aha that explains it :)
@quarnster No that option is not there, yes i see allot more options now but match frame to video is not there.
@SpaceOgre i do the same but 24hz from boxee menu is not 23.97 what you need to play films, 23.97 you only get whene match framerate is enabled, whene using boxee menu en set it to 24Hz is real 24Hz not the film 24p(23.97)
@quarnster No that option is not there, yes i see allot more options now but match frame to video is not there.
Not here on expert mode....
Hmm after reboot the option is there, nice but whene auto frame is on video is stuttering and hanging and if you go back to menu you only see stripes no menu also you cannot kill xbmc.bin anymore.
Hmmm is not working :( you see 10sec of picture and crashes only reboot is working than.
I didn't expect it to work unless @SpaceOgre had fixed it.
Ok, think let you know :)
I din't either expect it to work but to start working on it I wanted the options for it in the settings. @devilstrike you are more than welcome to check the log file for anything interesting regarding this crash :)
@SpaceOgre already looking @ log file, but under telnet you see constanly adjust sync... under top command Audio_Pipe_Mgr is using constantly 69% cpu when it happens linux load goes to 9.00 en you cannot kill xbmc.bin(only reboot.
Open - av_find_stream_info finished 08:41:46 T:2984192912 NOTICE: Opening video stream: 0 source: 256 08:41:46 T:2984192912 DEBUG: StereoscopicsManager: Detected stereo mode in string 'smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv' is 'mono' 08:41:46 T:2984192912 NOTICE: Creating video codec with codec id: 28 08:41:46 T:2984192912 DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no AMCodec:no OpenMax:no libstagefright:no VDPAU:no VAAPI:no IntelSMD:yes 08:41:46 T:2984192912 DEBUG: FactoryCodec - Video: SMD: codec not configured - Opening 08:41:46 T:2984192912 DEBUG: CDVDVideoCodecSMD::Open force hardware 1 08:41:46 T:2984192912 DEBUG: CDVDVideoCodecSMD::Open width 1280 height 720 type 28 08:41:46 T:2984192912 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 2 08:41:46 T:2984192912 DEBUG: SetVideoDecoderState state 2 ret 0 08:41:47 T:2984192912 DEBUG: CIntelSMDGlobals::SetVideoRenderState 2 08:41:47 T:2984192912 DEBUG: SetRenderrState state 2 ret 0 08:41:47 T:2984192912 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 2 08:41:47 T:2984192912 DEBUG: SetVideoDecoderState state 2 ret 0 08:41:47 T:2984192912 DEBUG: CIntelSMDGlobals::SetVideoRenderState 2 08:41:47 T:2984192912 DEBUG: SetRenderrState state 2 ret 0 08:41:47 T:2984192912 INFO: IntelSMDVideo: codec opened 08:41:47 T:2984192912 INFO: Opened Intel SMD Codec, SMD-h264 08:41:47 T:2984192912 DEBUG: FactoryCodec - Video: SMD-h264 - Opened 08:41:47 T:2984192912 NOTICE: Creating video thread 08:41:47 T:2977901456 NOTICE: Thread DVDPlayerVideo start, auto delete: false 08:41:47 T:2977901456 NOTICE: running thread: video_thread 08:41:47 T:2984192912 NOTICE: Opening audio stream: 1 source: 256 08:41:47 T:2977901456 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE 08:41:47 T:2984192912 NOTICE: Finding audio codec for: 86019 08:41:47 T:2984192912 DEBUG: FactoryCodec - Audio: FFmpeg - Opening 08:41:47 T:2984192912 DEBUG: DllAvUtilBase: Using libavutil system library 08:41:47 T:2984192912 DEBUG: DllAvCodec: Using libavcodec system library 08:41:47 T:2984192912 DEBUG: DllAvFormat: Using libswresample system library 08:41:47 T:2984192912 DEBUG: FactoryCodec - Audio: FFmpeg - Opened 08:41:47 T:2984192912 NOTICE: Creating audio thread 08:41:47 T:2975706000 NOTICE: Thread DVDPlayerAudio start, auto delete: false 08:41:47 T:2975706000 NOTICE: running thread: CDVDPlayerAudio::Process() 08:41:47 T:2984192912 NOTICE: Opening Subtitle stream: 2 source: 256 08:41:47 T:2984192912 DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opening 08:41:47 T:2984192912 DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opened 08:41:47 T:2984192912 DEBUG: ReadEditDecisionLists - Checking for edit decision lists (EDL) on local drive or remote share for: smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv 08:41:47 T:2984192912 DEBUG: OnPlayBackStarted : play state was 1, starting 1 08:41:47 T:2984192912 DEBUG: CDVDPlayer::SetCaching - caching state 3 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 2 08:41:47 T:2977901456 DEBUG: SetVideoDecoderState state 2 ret 0 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoRenderState 2 08:41:47 T:2977901456 DEBUG: SetRenderrState state 2 ret 0 08:41:47 T:2977901456 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback 08:41:47 T:2977901456 NOTICE: fps: 23.976024, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720 08:41:47 T:2977901456 DEBUG: OutputPicture - change configuration. 1280x720. framerate: 23.98. format: ISMD 08:41:47 T:2977901456 INFO: CIntelSMDRenderer::Configure width 1280 height 720 d_width 1280 d_height 720 fps 23.976025 flags 17 08:41:47 T:2977901456 INFO: CIntelSMDRenderer configure overscan values left 0 top 0 right 1920 bottom 1080 08:41:47 T:2977901456 INFO: CIntelSMDRenderer::Configure - Video rendering using SMD decoder 08:41:47 T:2977901456 NOTICE: Display resolution ADJUST : 1920x1080 @ 23.98 - Full Screen (35) (weight: 0.000) 08:41:47 T:2977901456 INFO: CIntelSMDRenderer::ConfigureGDLPlane 4 08:41:47 T:3047962304 DEBUG: PlayFile : OpenFile succeed, play state 2 08:41:47 T:3047962304 DEBUG: OnPlayBackStarted : play state was 2, starting 0 08:41:47 T:2977901456 INFO: Setting Interlace mode: screen 0 user 0 smd 4 08:41:47 T:2977901456 INFO: CIntelSMDRenderer Setting deringing_filter 0 08:41:47 T:2977901456 INFO: CIntelSMDRenderer Setting gaussian filter 0 08:41:47 T:2977901456 WARNING: CXBMCRenderManager::Configure - queue size too small (2, 0, 0) 08:41:47 T:2977901456 DEBUG: CXBMCRenderManager::Configure - 2 08:41:47 T:2977901456 INFO: SetVideoRenderBaseTime base time 231009 ms 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 3 08:41:47 T:2977901456 DEBUG: SetVideoDecoderState state 3 ret 0 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoRenderState 3 08:41:47 T:2977901456 DEBUG: SetRenderrState state 3 ret 0 08:41:47 T:2984192912 DEBUG: CDVDPlayer::HandleMessages - player started 2 08:41:47 T:2975706000 NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through) 08:41:47 T:2975706000 INFO: CSoftAE::MakeStream - AE_FMT_FLOAT, 48000, FL,FR,FC,LFE,SL,SR 08:41:47 T:3046767504 DEBUG: AESinkIntelSMD::SoftResume 08:41:47 T:3046767504 DEBUG: CSoftAE::Run - Sink was forgotten 08:41:47 T:3046767504 DEBUG: CSoftAE::Run - Sink restart flagged 08:41:47 T:3046767504 INFO: CSoftAE::InternalOpenSink - sink incompatible, re-starting 08:41:47 T:3046767504 DEBUG: AESinkIntelSMD::Drain 08:41:47 T:3046767504 DEBUG: AESinkIntelSMD::Deinitialize 08:41:47 T:3046767504 INFO: CAESinkIntelSMD::Deinitialize 08:41:47 T:3046767504 INFO: CIntelSMDGlobals::BuildAudioOutputs: HDMI 1 SPDIF 1 Analog 1 08:41:47 T:3047962304 DEBUG: CGUIInfoManager::SetCurrentMovie(smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv) 08:41:47 T:3047962304 DEBUG: GetMovieId (smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv), query = select idMovie from movie where idFile=40 08:41:47 T:3047962304 DEBUG: GetEpisodeId (smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv), query = select idEpisode from episode where idFile=40 08:41:47 T:3047962304 DEBUG: GetMusicVideoId (smb://DEVIL-STRIKE-PC/Movies/HEMLOCK GROVE/HG.S01E01.720p.x264.NLsubs-QoQ.mkv), query = select idMVideo from musicvideo where idFile=40 08:41:47 T:3047962304 DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc 08:41:47 T:3047962304 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay 08:41:47 T:3047962304 DEBUG: Activating window ID: 12005 08:41:47 T:3047962304 DEBUG: ------ Window Deinit (MyVideoNav.xml) ------ 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 2 08:41:47 T:2977901456 DEBUG: SetVideoDecoderState state 2 ret 0 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoRenderState 2 08:41:47 T:2977901456 DEBUG: SetRenderrState state 2 ret 0 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 2 08:41:47 T:2977901456 DEBUG: SetVideoDecoderState state 2 ret 0 08:41:47 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoRenderState 2 08:41:47 T:2977901456 DEBUG: SetRenderrState state 2 ret 0 08:41:47 T:3047962304 DEBUG: CAnnouncementManager - Announcement: OnPause from xbmc 08:41:47 T:3047962304 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPause 08:41:47 T:2974653328 NOTICE: Thread DelayedMessage start, auto delete: true 08:41:47 T:3047962304 NOTICE: Current resolution: 1920x1080 @ 59.94 - Full Screen 08:41:47 T:3047962304 NOTICE: Setting resolution: 1920x1080 @ 23.98 - Full Screen 08:41:47 T:3046767504 INFO: CIntelSMDGlobals::RemoveAudioOutput HDMI 08:41:47 T:3046767504 INFO: CIntelSMDGlobals::RemoveAudioOutput SPDIF 08:41:47 T:3046767504 INFO: CIntelSMDGlobals::AddAudioOutput HDMI 08:41:47 T:3047962304 INFO: GDL plane setup complete 08:41:47 T:3047962304 DEBUG: CreateWindow: Created surface of size 1920x1080 08:41:47 T:3047962304 INFO: GLES: Maximum texture width: 2048 08:41:47 T:3047962304 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec 08:41:47 T:3047962304 DEBUG: ------ Window Init (VideoFullScreen.xml) ------ 08:41:47 T:3047962304 INFO: Loading skin file: VideoFullScreen.xml, load type: KEEP_IN_MEMORY 08:41:47 T:3047962304 DEBUG: Load VideoFullScreen.xml: 75.65ms 08:41:47 T:3047962304 DEBUG: Alloc resources: 150.70ms (76.90 ms skin load) 08:41:48 T:3047962304 INFO: CheckIdle - Closing session to http://www.google.com (easy=0xa1772a8, multi=(nil)) 08:41:48 T:3047962304 DEBUG: ------ Window Init (DialogSeekBar.xml) ------ 08:41:48 T:3047962304 DEBUG: Window DialogSeekBar.xml was already loaded 08:41:48 T:3047962304 DEBUG: Alloc resources: 0.05m 08:41:48 T:3047962304 DEBUG: ------ Window Deinit (DialogBusy.xml) ------ 08:41:48 T:3046767504 ERROR: CIntelSMDGlobals::EnableAudioOutput failed - 26 08:41:48 T:3046767504 INFO: CIntelSMDGlobals::AddAudioOutput SPDIF 08:41:48 T:3046767504 DEBUG: AESinkIntelSMD::~CAESinkIntelSMD 08:41:48 T:3046767504 DEBUG: AESinkIntelSMD::Deinitialize 08:41:48 T:3046767504 INFO: CAESinkIntelSMD::Deinitialize 08:41:48 T:3046767504 DEBUG: AESinkIntelSMD::CAESinkIntelSMD 08:41:48 T:3046767504 DEBUG: AESinkIntelSMD::Initialize 08:41:48 T:3046767504 INFO: CAESinkIntelSMD::Initialize ismdAudioInputFormat 1 Hardware decoding (non PCM) 0 08:41:48 T:3046767504 INFO: CAESinkIntelSMD::ConfigureAudioOutputParams HDMI sample size 16 sample rate 48000 channels 2 format 1 08:41:48 T:3046767504 INFO: CAESinkIntelSMD::ConfigureAudioOutputParams stream_delay 0 sample_size 16 ch_config 1 out_mode 1 sample_rate 48000 ch_map 0 08:41:48 T:3046767504 INFO: CAESinkIntelSMD::Initialize ConfigureMasterClock 48000 08:41:50 T:2974653328 DEBUG: Thread DelayedMessage 2974653328 terminating (autodelete) 08:41:50 T:2977901456 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(209000.000000, 0) 08:41:50 T:2977901456 INFO: SetVideoRenderBaseTime base time 234461 ms 08:41:50 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoDecoderState 3 08:41:50 T:2977901456 DEBUG: SetVideoDecoderState state 3 ret 0 08:41:50 T:2977901456 DEBUG: CIntelSMDGlobals::SetVideoRenderState 3 08:41:50 T:2977901456 DEBUG: SetRenderrState state 3 ret 0 08:41:50 T:3047962304 DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc 08:41:50 T:3047962304 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay 08:41:50 T:3047962304 DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------ 08:41:55 T:2977901456 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available 08:41:55 T:2977901456 INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23.976024 fps 08:42:00 T:2977901456 DEBUG: CPullupCorrection: detected pattern of length 1: 41708.33, frameduration: 41708.333333 08:42:16 T:2989878160 DEBUG: Thread JobWorker 2989878160 terminating (autodelete)
It seems that it sets the correct refresh rate at least:
08:41:47 T:3047962304 NOTICE: Setting resolution: 1920x1080 @ 23.98 - Full Screen
But more testing/debugging is needed ofc.
Thats correct my tv also switch from 60hz to 23,98(24Hz) but after it switch it plays for about 10sec and hangs, osd and menu still works at that point at the same time you see in telnet adjust sync, and if you stop the video is goes back to 60Hz but than you see only stripes and thats was it reboot is than needed.
I have no clue if this would help anything but if you check the boxee source code they use the
<fakefullscreen>true</fakefullscreen>
in advancedsettings.xml. I was planing on testing this later but if you are testing stuff now it can't hurt to try atleast. And have you tried with the settings that quasar posted in the forums?
<bginfoloadermaxthreads>5</bginfoloadermaxthreads>
<useddsfanart>true</useddsfanart>
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
</gui>
<gui>
<nofliptimeout>1000</nofliptimeout>
</gui>
I gif it a try.
I found some other settings, but I'm not code savvy as to whether or not these settings below make a difference. What I did was set my resolution settings in Boxee first to 1080p 24hz, then put this in the advacedsettings.xml
<video>
<vdpauscaling>true</vdpauscaling>
<enablehighqualityhwscalers>true</enablehighqualityhwscalers>
<autoscalemaxfps>60</autoscalemaxfps>
<adjustrefreshrate>
<override>
<fps>23.976</fps>
<refresh>24.0</refresh>
</override>
</adjustrefreshrate>
</video>
Again, uncertain if this makes any difference as we seem to have incorrect fps rate reported when playing back a video with the Video Diagnostic Screen?. And I understand you are trying to adjust refresh rate to match video, maybe you could alter these settings/parameters.
@SpaceOgre wont works give the same errors.
btw telnet errors:
flushing in AddPicture: 0.00, 8891.29 libpng warning: iCCP: known incorrect sRGB profile Adjusting clock: 8891.30 -> 8891.79, 0.49 Adjusting clock: 8892.33 -> 8891.34, -1.00 Adjusting clock: 8892.37 -> 8891.34, -1.04 Adjusting clock: 8892.75 -> 8891.78, -0.98 Adjusting clock: 8892.79 -> 8891.75, -1.04 Adjusting clock: 8892.76 -> 8891.79, -0.97 Adjusting clock: 8892.80 -> 8891.76, -1.04 Adjusting clock: 8892.77 -> 8891.80, -0.97 Adjusting clock: 8892.89 -> 8891.85, -1.04 Adjusting clock: 8892.86 -> 8891.89, -0.97 Adjusting clock: 8892.90 -> 8891.86, -1.04 Adjusting clock: 8892.87 -> 8891.90, -0.97 Adjusting clock: 8892.90 -> 8891.87, -1.04 Adjusting clock: 8892.88 -> 8891.90, -0.97 Adjusting clock: 8892.91 -> 8891.88, -1.04 vsyncs_frame_received 454 vsyncs_frame_skipped 14 vsyncs_top_received 0 vsyncs_top_skipped 0 vsyncs_bottom_received 0 vsyncs_bottom_skipped 0 frames_input 50 frames_displayed 36 frames_released 46 frames_dropped 12 frames_repeated 352 frames_late 13 frames_out_of_order 0 frames_out_of_segment 0 late_flips 0 Adjusting clock: 8892.89 -> 8891.92, -0.97 Adjusting clock: 8892.92 -> 8891.89, -1.04 Adjusting clock: 8892.90 -> 8891.92, -0.97 Adjusting clock: 8892.93 -> 8891.90, -1.04 Adjusting clock: 8892.90 -> 8891.93, -0.97 Adjusting clock: 8892.96 -> 8891.92, -1.04 Adjusting clock: 8892.96 -> 8891.99, -0.97 Adjusting clock: 8893.03 -> 8892.00, -1.04
Without trying, I'm guessing the way the SMD hardware codecs interact with dvdplayer might be causing issues here. I'd suggest setting ISMD_VIDEO_BUFFER_QUEUE to 1 and see if that's any better (this will introduce many other issues instead). See the code in AddInput in IntelSMDVideo.cpp for how it is used and these two posts in the xbmc forums as to why I did that in the first place.
Or it might be messed up timestamps or over-eager clock adjustments (set lastClockChange to 10 rather than 0 to not adjust it for 10 buffer submits if it's out of sync rather than every buffer submit).
Would using an external player like mplayer help?
I have done some testing now and think that it might have something to do with the audio. I get alot of these
ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
ERROR: AddPackets - failed to add leftover bytes to render
It also seems to fail to initiate HDMI sound and fallback to SPDIF
ERROR: CIntelSMDGlobals::EnableAudioOutput failed - 26
Did also try to change lastClockChange to 10 but that did not seem to do anything. Will look more into the clock since it is outputting way more adjusts then when not using match frame rate.
I think I have found something that works, but will have to test more. The problem is I tried two things at once but I would guess it is the clock change that did it, I just gave it a bit more room before needing to sync and that seems to work quite well. More testing tomorrow :)
Edit 2014-02-24: Sadly I don't remember exactly what I did here and the code is no more :( But I think I changed the fabs(diff) > 0.05 to 0.1 or something.
@SpaceOgre So it is just a sort of timing problem than?
Seems a audio passtrough problem, whene you disable ac3/dts or other passtrough options is works, whene enabled it crash after few sec.
Involves modifying https://github.com/quarnster/boxeebox-xbmc/blob/master/xbmc/xbmc/windowing/egl/EGLNativeTypeBoxee.cpp, and https://github.com/quarnster/boxeebox-xbmc/blob/master/xbmc/xbmc/windowing/egl/EGLNativeTypeBoxee.h as appropriate to detect the resolution currently used and make sure that's set instead of the hardcoded 720p.
This would make use of the "GDL" api https://github.com/quarnster/boxeebox-xbmc/blob/master/intel/headers/gdl.h. Don't know the xbmc internals enough, but it looks like it's possible to select different resolutions from the ui somehow so that should be supported also.