fplay video performance is very slow, also no audio

Post here questions, problems and suggestions in English language
  • I can think of two issues that potentially lead to lags during video playback: 1) slow access to bios disks and 2) lack of audio (player tries to synchronize video and audio).

    1. I don't think the root cause is bios disks, but
    a) who knows, they are implemented as a big hack, and
    b) they are really slow, that is why they are disabled by default.

    I see that your laptop has a SATA disk. To access that drive without calling BIOS and hacks you can enter BIOS setup and change operation mode of the disk from AHCI (aka native or sata) to IDE (aka compatibility or legacy).
    The disk should appear as /hd0 with bios disks disabled.

    2. The issue with audio may be because of SO many devices sharing IRQ10 line. Solution here is to enable APIC controller instead of default PICs.
    Unfortunately, there is no simple or automatic way to do it at the moment. I will try to describe steps in detail.
    1. Download devman.zip.
    2. Unzip it to location accessible from KolibriOS.
    3. Boot KolibriOS.
    4. Remove file /rd/1/KERNEL.MNT to free some space.
    5. Copy acpi and acpi.dll files from devman.zip to /rd/1/DRIVERS directory.
    6. Run acpi program.
    7. There should be DEVICES.DAT file near acpi* files now.
    8. Delete acpi* files.
    9. Run RDSAVE program (on the desktop) and overwrite kolibri.img file which you use to boot (looks like it is /usbhd0/1/kolibri.img)
    10. Reboot to KolibriOS, try to play a video, get logs.
    garbb wrote:Does anyone have a video file that is known to play OK with fplay so I can be sure the video file I am playing is not the problem?
    http://ftp.kolibrios.org/users/dunkaist ... eagles.mkv
  • First I booted off of the USB thumb drive and tried your instructions, however after I ran acpi, when I tried to click on usbhd0 in any file browser, the file browser would freeze and I could not copy the log files.
    Then I booted off of a sata hdd and tried the same instructions. This time I was able to run acpi and copy the acpi.log and device.dat to the HDD. Then I saved the ramdisk and rebooted, but when booting kolibrios froze as soon as the launcher desktop appeared. I booted again with the [c] option turned on and [d] turned off and took a picture of the screen (hdd_boot.jpg).

    And I did remember to copy back kernel.mnt to the ramdisk before I saved the ramdisk and rebooted.

    I will try later to play with different bios settings (AHCI/IDE) and see if I can get kolibrios to boot with the devices.dat in the drivers directory.
    Attachments
    DEVICES.DAT.zip (258 Bytes)
    Downloaded 251 times
    hdd_boot.JPG
    hdd_boot.JPG (348.87 KiB)
    Viewed 7336 times
    ACPI.LOG (13.98 KiB)
    Downloaded 245 times
  • DEVICES.DAT file that you attached contains garbage (don't know why) but ACPI.LOG mentions enough information to produce valid DEVICES.DAT.
    Both valid DEVICES.DAT and a new image to test are here.
    I already put DEVICES.DAT to the image, so you only need to flash it.
    If it works, attach only BOARDLOG.TXT.
    garbb wrote:And I did remember to copy back kernel.mnt to the ramdisk before I saved the ramdisk and rebooted.
    kolibri.img is used by several loaders. Some of them do use kernel.mnt that is inside kolibri.img. But the loader of kolibri.raw (aka extended_primary_loader) uses kernel.mnt from the root dir of the flash. We haven't switched to extended_primary_loader for .iso and .img (yet?), therefore there is some confusion if KERNEL.MNT is actually needed. Moreover, kolibri.raw is meant to be a universal image to boot from flash/hdd in BIOS/UEFI32/UEFI64 modes, therefore you can find copies of the same files in different locations inside the image.
    garbb wrote:I will try later to play with different bios settings (AHCI/IDE)
    Yes, I recommend you to switch your SATA disk to IDE mode. Not because IDE is better than AHCI (it isn't) but because KolibriOS doesn't have more or less complete AHCI driver.
  • Ok here is what I did:
    Flashed your image to USB thumb drive. (BTW i could not get rawwrite32.exe to work on my computer, i got error "Could not access device! Make sure a medium is inserted and you have administrative privileges." even though I ran it as admin, so i used rufus instead which seems to work fine.)
    Copied kolibrios folder and kolibri.lbl from https://builds.kolibrios.org/eng/latest-distr.7z to the USB thumb drive root to allow fplay to be used.
    Copied eagles.mkv test video file to USB thumb drive root.
    Set laptop BIOS setting to IDE mode.
    Booted laptop off of USB thumb drive.
    Left kolibrios boot menu setting as default ([a]=1024x768x32, =off, [c]=on, [e]=floppy image: C:\kolibri.img)
    Clicked "app+" on desktrop
    Clicked "FPlay"
    loaded eagles.mkv test video, it played the same, very slowly with no audio.
    Closed FPlay window.
    ran /sys/develop/board /usbhd0/2/boardlog.txt from shell to output log

    Then I did the same things again but I set the BIOS setting to AHCI mode just to see if there was any difference, but the video played the same.
    I have attached both logs.
    Attachments
    BOARDLOG_AHCI.TXT (19.95 KiB)
    Downloaded 234 times
    BOARDLOG_IDE.TXT (21.51 KiB)
    Downloaded 236 times
  • Well, USB and HDAudio share an interrupt even with APIC enabled. In theory, this shouldn't be fatal. But in practice it's unclear whether the issue is with interrupts or with the sound driver.

    What is more interesting (and that I missed before) is that your laptop has two HDAudio devices: 8086:0C0C and 8086:8C20.
    Moreover, the sound driver reports that they are both attached to IRQ16, even though DEVICES.DAT assigns IRQ16 to the former and IRQ22 to the latter.
    I'm not going to look for the bug in the sound driver right now but I prepared images with two versions of the sound driver: each supports only one audio device (one, two).

    I also removed USB drivers from the images to avoid interrupt sharing, sorry for inconvenience.
    Use the touchpad if it emulates PS2 mouse or the keyboard (MENU/System/FIle Management/KFAR).

    There is a small mp3 file /RD/1/SINE.MP3 which should be just enough to test a sound card.
    Press <Enter> on the file in KFAR to play it.

    So, steps to test (for each image):
    1. Flash the image.
    2. Set SATA disk mode to AHCI.
    3. Boot KolibriOS with [c]=on.
    4. Play /RD/1/SINE.MP3. Does it make any beep?
    5. Take a photo of the log.
  • kos_hpt.raw.xz did not play sound, I attached a photo of log
    kos_lpt.raw.xz DID play the sound! the volume was very quiet, so I went to syspanel>volume and pressed the right arrow key to increase the volume and then I played it again and i could hear it more loudly. I attached a photo of that log as well.
    Both took a bit longer to boot than previous images while the log said "Try to initialize APIC"
    Attachments
    kos_hpt.raw.xz.jpg
    kos_hpt.raw.xz.jpg (305.55 KiB)
    Viewed 7174 times
    kos_lpt.raw.xz.jpg
    kos_lpt.raw.xz.jpg (106.75 KiB)
    Viewed 7174 times
  • garbb wrote:kos_lpt.raw.xz DID play the sound!
    Great! Here is another image with all the drivers and programs included:
    • It's the standard flash image, which contains all the files from the distro now (i.e. you don't have to copy fplay etc.);
    • With DEVICES.DAT for your laptop placed to /DRIVERS/ of kolibri.img in the root dir of the flash image;
    • With modified sound driver (intel_hda.sys, near DEVICES.DAT) that supports only one of your HDAudio devices (namely, 8086:8C20).
    garbb wrote:Both took a bit longer to boot than previous images while the log said "Try to initialize APIC"
    I modified delay procedure in #8139. The author requested delay of 0.64 sec, I don't know why. If it looks like 0.64 sec then it's okay.
  • The delay is actually much longer than 0.64 seconds, more like about 5 seconds.
    I found that if I delete the devices.dat file but leave the new intel_hda.sys file then there is no more delay and the sound still works OK.

    Also I have another question, I tried changing the resolution in the config file from the default of resolution=1024*768 to another resolution like resolution=800*600 but when the boot menu appears the setting is still 1024x768x32. Maybe this setting in the config.ini file does not work?
  • garbb wrote:The delay is actually much longer than 0.64 seconds, more like about 5 seconds.
    Indeed, another bug of mine. The delay was 6.4s instead of 0.64s. Fixed in #8176.
    garbb wrote:Also I have another question, I tried changing the resolution in the config file from the default of resolution=1024*768 to another resolution like resolution=800*600 but when the boot menu appears the setting is still 1024x768x32. Maybe this setting in the config.ini file does not work?
    Yes, it didn't work, I fixed this in #8175.
    garbb wrote:I found that if I delete the devices.dat file but leave the new intel_hda.sys file then there is no more delay and the sound still works OK.
    Great, less manual work is better. This means that the kernel and drivers can handle many devices sharing an IRQ properly.

    To summarize, how to get KolibriOS working on your laptop:
    1. download default flash image,
    2. write it (with rawwrite32 or rufus) to a flash drive,
    3. copy intel_hda.sys to /DRIVERS/ directory of kolibri.img which is in the root of the flash,
    4. may be edit config.ini near mentioned kolibri.img.
    For the step 3 I usually provide this link. Please, let me know which tool (if any) can do this under Windows in 2020.
  • I've just tested FPlay and... WOW! It have become much faster!
    Thanks dunkaist!
    Из хаоса в космос
  • Thank you for your help with this dunkaist.
    The latest image works great. The only software that I could get to work in windows 10 to allow me to insert intel_hda.sys into kolibrios was winimage.

    I have another question: is is possible to change the mouse cursor? I think I found the cursor file in the source code in video/arrow.cur. Would I need to compile kilibrios myself in order to change the mouse cursor? Could you tell me what file the mouse cursor is inside when kolibrios is compiled? is it inside the kernel in "KERNEL.MNT"?
  • garbb wrote:I have another question: is is possible to change the mouse cursor?
    It is possible but it is not straightforward.
    garbb wrote:I think I found the cursor file in the source code in video/arrow.cur.
    Looks like this one is not the default cursor. This is the fallback one that is used when an app tries to set its own cursor but fails to do so. Default cursor is hardcoded in /kernel/trunk/gui/mousepointer.inc[1]. It is 16x24 24bpp raw image. Of course this is not okay to have hardcoded images but nobody fixed this.
    Looks like you are right.
    garbb wrote:Would I need to compile kilibrios myself in order to change the mouse cursor? Could you tell me what file the mouse cursor is inside when kolibrios is compiled? is it inside the kernel in "KERNEL.MNT"?
    Yes, you have to compile KERNEL.MNT.

    Code: Select all

    fasm -m1234567 -dextended_primary_loader=1 bootbios.asm bootbios.ext_loader
    fasm -m1234567 -dextended_primary_loader=1 kernel.asm kernel.mnt
    kerpack kernel.mnt
    Get fasm from its official site.
    Unfortunately, I don't have kerpack.exe at hand. Windows users, please, share it.
  • Just wanted to let you know that I was able to compile the kernel using fasm and your instructions, very simple compared to other open source projects I have tried to compile using other tools like c++ where I often have trouble getting many dependencies and libraries working. Thanks.

    I was able to find a link to windows kpack.exe listed in build.txt: http://diamond.kolibrios.org/prg/kpack.exe, but I used kpack in kolibrios itself to pack the kernel since it seems that you need to use the "-ker" option to pack the kernel and I was not sure how to do this with the windows kpack.exe...

    I have yet another question:
    I have noticed that during kolibrios boot process it seems that "/SYS/SEARCHAP" runs from "kolibrios.img/settings/AUTORUN.DAT" to find a /kolibrios/ path on hard drives to mount as system directory. In my case it finds "/USBHD0/1/KOLIBRIOS/" on my usb drive. This works OK, however I have noticed that while kolibrios desktop boots very fast, it seems to take a few more seconds for SEARCHAP to find the "/USBHD0/1/KOLIBRIOS/" directory and allow access to other programs like fplay in this directory. Since I know that in my case the directory will always be located at "/USBHD0/1/KOLIBRIOS/", I had thought that I could set this directory name somewhere permanently and disable SEARCHAP from running and speed up the boot a bit. I saw this text in config.ini:

    Code: Select all

    ; which directory to use as /sys
    ;syspath=/HD0/1/KOLIBRIOS
    and I had changed it to

    Code: Select all

    ; which directory to use as /sys
    syspath=/USBHD0/1/KOLIBRIOS/
    but it this did not appear to work; it seems that I still needed to wait until searchap found the directory before I could access applications on the usb drive
    from debug log:

    Code: Select all

    Searchap: compare files - success!
    Searchap: mount directory: /usbhd0/1/
    Do you know of any way that I might be able to set the system directory to "/USBHD0/1/KOLIBRIOS/" so that I would not need to wait for SEARCHAP to find it? Maybe there is a shell command like "mount /USBHD0/1/KOLIBRIOS /SYS" I could put into autodun.dat? I tried this but it did not work.
    Last edited by garbb on Mon Dec 14, 2020 8:19 pm, edited 1 time in total.
  • Hello, garbb
    Since I know that in my case the directory will always be located at "/USBHD0/1/KOLIBRIOS/"
    In #8400 I've added such feature. So now you can give the path to mount and avoid autosearch:

    Code: Select all

    /SYS/@SEARCHAP /HD0/1/KOLIBRIOS
    Please try it on your side.

    Regards,
    Leency
    Из хаоса в космос
  • Who is online

    Users browsing this forum: No registered users and 7 guests