Player switches from HW to SW decoder after viewing Chapters

I’m not sure if this is a known problem, or working as designed, but is this a bug?
When playing a movie, the video decoder changes from (HW) to (SW) if the chapters menu is displayed.

What I know:

  • happens with .mkv and .mp4 (have not tried other containers)
  • happens with VC-1, MPEG-2, and H.264 videos (have not tried other video encodings)
  • happens with Confluence, OSMC Skin, and Estuary skins
  • simply pulling up the chapters menu causes the issue (you don’t have to actually select a chapter)
  • issue did not occur with videos containing no chapters (ie, show the chapters menu but none are defined)
  • issue did not occur by pulling up “Audio settings” menu

Here’s how you can recreate the issue:

  1. Start playing a video
  2. Press the “menu”/settings button on the remote to pull up settings (button to the right of the “back” button)
  3. Verify that the "Video decoder: " shows that HW decoding is being used.
    for example: “Video decoder: am-h264 (HW)”
  4. Press “back” button on remote to hide the settings menu
  5. Press “OK” button on remote to pull up the menu (the menu that shows timeline, chapters, audio, video, etc at the bottom of the screen)
  6. Navigate to and select the’ chapters’ icon
  7. Move cursor to any chapter
    note: you don’t have to actually select the chapter
  8. Press “back” button on remote until all menus are removed
  9. Press the “menu” button on the remote again
    Note that "Video encoder: " has changed from (HW) to (SW)
    For example:
    before: am-h264 (HW)
    after: ff-264 (SW)

before: am-mpeg2 (HW)
after: ff-mpeg2video (SW)

before: am-vc1 (HW)
after: ff-vc1 (SW)

Can anyone else recreate this? Is this a known limitation or known issue?
Thanks.

Hi comer79,

Unfortunately I do not have a vero4k or play back videos with chapters, So I’m not sure I will be able to help. But I’ll try and I’m sure others will chip in, if you could please provide debugging logs

Then can you please repeat the steps, you have listed above.

Thanks Tom.

That sounds like a bug.

I could possibly understand if you were playing DVD content with menus.
As Tom says, debug logs are needed.

Sam

I uploaded the logs and will send you a PM with the link.

My suspicion is that the decoder being used to play the video doesn’t actually change, but maybe the ‘process info’ overlay window is just showing info from the ‘last’ decoder, which was SW/ffmpeg from when the thumbnails were created for the Chapters pop-up? But I’ll defer to the experts!

To provide reference points in the logs, here are some annotations:
[shortly after opening the video]
12:54:30.490 T:3691250672 DEBUG: FactoryCodec - Video: am-mpeg2 - Opened
CAMLCodec

[movie is playing]

[Pressed Title key to bring up process info and confirmed HW decode is in use]
12:54:36.693 T:4111999920 DEBUG: LIRC: Update - NEW at 27090:171 0 KEY_TITLE linux-input-layer (KEY_TITLE)
12:54:36.693 T:4111999920 DEBUG: OnKey: yellow (0xe5) pressed, action is PlayerProcessInfo
12:54:36.694 T:4111999920 DEBUG: Activating window ID: 10116
12:54:36.694 T:4111999920 DEBUG: ------ Window Init (DialogPlayerProcessInfo.xml) ------

12:54:49.907 T:4111999920 DEBUG: LIRC: Update - NEW at 40303:171 0 KEY_TITLE linux-input-layer (KEY_TITLE)
12:54:49.907 T:4111999920 DEBUG: OnKey: yellow (0xe5) pressed, action is PlayerProcessInfo
12:54:49.907 T:4111999920 DEBUG: ------ Window Deinit (DialogPlayerProcessInfo.xml) ------

[Pressed OK to bring up Player menu]
12:54:53.728 T:4111999920 DEBUG: LIRC: Update - NEW at 44124:160 0 KEY_OK linux-input-layer (KEY_OK)
12:54:53.728 T:4111999920 DEBUG: OnKey: 11 (0x0b, obc244) pressed, action is OSD
12:54:53.728 T:4111999920 DEBUG: ------ Window Init (VideoOSD.xml) ------
12:54:53.730 T:4111999920 INFO: Loading skin file: VideoOSD.xml, load type: LOAD_ON_GUI_INIT

[Several KEY_LEFT events to access the ‘Chapters’ icon]

[Pressed OK to bring up ‘Chapters’ window]
12:54:57.515 T:4111999920 DEBUG: LIRC: Update - NEW at 47911:160 0 KEY_OK linux-input-layer (KEY_OK)
12:54:57.515 T:4111999920 DEBUG: OnKey: 11 (0x0b, obc244) pressed, action is Select
12:54:57.516 T:4111999920 DEBUG: Activating window ID: 10125
12:54:57.516 T:4111999920 DEBUG: ------ Window Init (VideoOSDBookmarks.xml) ------
12:54:57.516 T:4111999920 INFO: Loading skin file: VideoOSDBookmarks.xml, load type: LOAD_EVERY_TIME
12:54:57.541 T:3896398832 DEBUG: DoWork - trying to extract thumb from video file smb://m01srvr/r/stream/Video/Video_(year)_dvd.mkv
12:54:57.554 T:4111999920 DEBUG: LIRC: Update - NEW at 47950:160 0 KEY_OK_UP linux-input-layer (KEY_OK_UP)

[ffmpeg is called multiple times to create chapter thumbnails]
12:54:57.821 T:3896398832 DEBUG: cached image ‘special://masterprofile/Thumbnails/0/05ed4bad.jpg’ size 540x404
12:54:57.822 T:3896398832 DEBUG: ffmpeg[E83E53F0]: [mjpeg] intra_quant_bias = 96 inter_quant_bias = 0
12:54:57.878 T:3896398832 DEBUG: ExtractThumb - measured 337 ms to extract thumb from file smb://m01srvr/r/stream/Video/Video_(year)_dvd.mkv in 17 packets.

[Exited chapters pop-up]
12:55:01.519 T:4111999920 DEBUG: LIRC: Update - NEW at 51915:9e 0 KEY_BACK linux-input-layer (KEY_BACK)
12:55:01.519 T:4111999920 DEBUG: OnKey: menu (0xd8) pressed, action is Back
12:55:01.524 T:4111999920 DEBUG: ------ Window Deinit (VideoOSDBookmarks.xml) ------

[Pressed Title key to bring up process info and confirmed SW decode is now shown]
12:55:04.038 T:4111999920 DEBUG: LIRC: Update - NEW at 54434:171 0 KEY_TITLE linux-input-layer (KEY_TITLE)
12:55:04.038 T:4111999920 DEBUG: OnKey: yellow (0xe5) pressed, action is PlayerProcessInfo
12:55:04.038 T:4111999920 DEBUG: Activating window ID: 10116
12:55:04.038 T:4111999920 DEBUG: ------ Window Init (DialogPlayerProcessInfo.xml) ------

12:54:57.646 T:3896398832   DEBUG: FactoryCodec - Video:  - Opening
12:54:57.646 T:3896398832  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
12:54:57.646 T:3896398832   DEBUG: CDVDVideoCodecFFmpeg - Updated codec: ff-mpeg2video
12:54:57.646 T:3896398832   DEBUG: FactoryCodec - Video: ff-mpeg2video - Opened

I think ffmpeg is only being used to grab hints / extract thumbnails / chapter information etc.

Sam

Hi Sam - I think we both reached the same conclusion, but I just wanted to be confirm… the video decoder isn’t actually changing when chapters are pulled up. So the bug is that the info pop-up shows that a sw decoder is being used when it actually isn’t. Is that correct? Thanks!

ffmpeg is used for the extraction of chapter information
this may be presented incorrectly in the GUI for playback.

dmesg would likely show if the hardware decoder is active.