• videojs of piwigo

    Install:

    Suppose that the piwigo have been installed at the dir of

    PIWIGO_DIR=/opt/local/data/www/gallery,

    wget -O piwigo-videojs.zip https://github.com/xbgmsharp/piwigo-videojs/archive/master.zip
    
    unzip piwigo-videojs.zip
    
    sudo mv    piwigo-videojs-master ${PIWIGO_DIR}/piwigo-videojs
    sudo chown ${PHP_USER}  -R       ${PIWIGO_DIR}/piwigo-videojs
    sudo chgrp ${PHP_GROUP} -R       ${PIWIGO_DIR}/piwigo-videojs

    Customize bin path

    Suppose that ffmpeg,mediainfo,exiftool,ffprobe have been installed at /opt/local/bin/

    Add the following line into the file of ${PIWIGO_DIR}/include/config_default.inc.php

    $conf['vjs_mediainfo_dir']='/opt/local/bin/';
    $conf['vjs_exiftool_dir']='/opt/local/bin/';
    $conf['vjs_ffprobe_dir']='/opt/local/bin/';
    $conf['ffmpeg_dir']='/opt/local/bin/';

    Update media info of your video

    Go to the admin page of your gallery,

    Select the album with video ,

    Edit the album,

    Manager the image of the album

    Select video file

    Launch the videos batch operation

  • gallery.zhenglei.net is online

    The personal photo gallery is online at the end of 2022.

    The open source piwigo suite is used to build the gallery, same as the blog site, the whole software stack, except the linux kernel layer, is built from souce, i.e, LFS (linux from scratch)

    Thanks to the LFS technology, the who software image can be run on almost any linux X64 enviroment. keep the file level compability, and cloned to the other machine with rsync, backup and restore with easy.

  • Play DSD dff file within MPD daemon

    To support play DSD dff file inrealtime mode, we must add dsdiff plugin in mpd config file.

    decoder {
      plugin “ffmpeg”
      enable “yes”
    }

    decoder {
      plugin “dsdiff”
      enable “yes”
    }

    cat mpd.conf

    music_directory     “/music”
    playlist_directory “/opt/local/run/mpd/playlists”
    db_file            “/opt/local/run/mpd/database”
    log_file       “/opt/local/run/mpd/log”
    pid_file       “/opt/local/run/mpd/mpd.pid”
    state_file         “/opt/local/run/mpd/state”
    sticker_file      “/opt/local/run/mpd/sticker.sql”

    user           “root”
    group          “root”
    bind_to_address         “any”
    #bind_to_address       “localhost”
    bind_to_address         “/opt/local/run/mpd/socket”
    port           “6600”


    # default=notice
    # secure=info

    log_level      “default”
    #log_level              “secure”
    #log_level              “verbose”
    #log_level              “warning”
    #log_level              “error”



    restore_paused         “no”
    save_absolute_paths_in_playlists  “no”
    metadata_to_use  “artist,album,title,track,name,genre,date,composer,performer,disc”

    auto_update        “yes”
    auto_update_depth      “8”


    follow_outside_symlinks        “yes”
    follow_inside_symlinks      “yes”



    zeroconf_enabled       “yes”
    zeroconf_name          “Music Player @ %h”


    #password                        “password@read,add,control,admin”
    default_permissions         “read,add,control,admin”



    #database {
    #       plugin “proxy”
    #       host “other.mpd.host”
    #       port “6600”
    #}


    decoder {
      plugin “ffmpeg”
      enable “yes”
    }

    decoder {
      plugin “dsdiff”
      enable “yes”
    }


    #input {
    #        plugin “curl”
    #       proxy “proxy.isp.com:8080”
    #       proxy_user “user”
    #       proxy_password “password”
    #}


    #audio_output {
    #   type       “alsa”
    #   name       “ALSA”
    #   device     “hw:0,0”   # optional
    #   mixer_type      “hardware” # optional
    #   mixer_device   “default”  # optional
    #   mixer_control  “PCM”      # optional
    #   mixer_index “0”     # optional
    #}

    #audio_output {
    #    type                    “fifo”
    #    name                    “my_fifo”
    #    path                    “/tmp/mpd.fifo”
    #    format                  “44100:16:2”
    #}


    # creative usb card
    #audio_output {
    #        type            “alsa”
    #        name            “MP3”
    #        device          “hw:CARD=MP3,DEV=0”
    #        mixer_type      “software”      # optional
    #}


    #audio_output {
    #        type            “alsa”
    #        name            “TerraTec”
    #        device          “iec958:CARD=Device,DEV=0”
    #        mixer_type      “software”      # optional
    #}

    #audio_output {
    #        type            “alsa”
    #        name            “C-Media”
    #        device          “iec958:CARD=Set,DEV=0”
    #        mixer_type      “hardware”      # optional
    #}

    # Via Winner AD-86D amplifer
    audio_output {
            type            “alsa”
            name            “Audio”
            device          “hw:CARD=AUDIO,DEV=0”
            mixer_type      “software”    
    }



    # via Jack Daemon
    #audio_output {
    #        type “jack”
    #        name “My Jack Output”
    #        mixer_type      “software”
    #}



    #
    # An example of an OSS output:
    #
    #audio_output {
    #   type       “oss”
    #   name       “My OSS Device”
    ##  device     “/dev/dsp” # optional
    ##  mixer_type      “hardware” # optional
    ##  mixer_device   “/dev/mixer”   # optional
    ##  mixer_control  “PCM”      # optional
    #}
    #
    # An example of a shout output (for streaming to Icecast):
    #
    #audio_output {
    #   type       “shout”
    #   encoder    “vorbis”       # optional
    #   name       “My Shout Stream”
    #   host       “localhost”
    #   port       “8000”
    #   mount      “/mpd.ogg”
    #   password   “hackme”
    #   quality    “5.0”
    #   bitrate    “128”
    #   format     “44100:16:1”
    ##  protocol   “icecast2”     # optional
    ##  user       “source”       # optional
    ##  description “My Stream Description”    # optional
    ##  url     “http://example.com”   # optional
    ##  genre      “jazz”         # optional
    ##  public     “no”           # optional
    ##  timeout    “2”        # optional
    ##  mixer_type      “software”     # optional
    #}
    #
    # An example of a recorder output:
    #
    #audio_output {
    #   type       “recorder”
    #   name       “My recorder”
    #   encoder    “vorbis”       # optional, vorbis or lame
    #   path       “/opt/local/run/mpd/recorder/mpd.ogg”
    ##  quality    “5.0”          # do not define if bitrate is defined
    #   bitrate    “128”          # do not define if quality is defined
    #   format     “44100:16:1”
    #}
    #
    # An example of a httpd output (built-in HTTP streaming server):
    #
    #audio_output {
    #   type       “httpd”
    #   name       “My HTTP Stream”
    #   encoder    “vorbis”       # optional, vorbis or lame
    #   port       “8000”
    #   bind_to_address “0.0.0.0”      # optional, IPv4 or IPv6
    ##  quality    “5.0”          # do not define if bitrate is defined
    #   bitrate    “128”          # do not define if quality is defined
    #   format     “44100:16:1”
    #   max_clients “0”        # optional 0=no limit
    #}
    #
    # An example of a pulseaudio output (streaming to a remote pulseaudio server)
    #
    #audio_output {
    #   type       “pulse”
    #   name       “My Pulse Output”
    ##  server     “remote_server”    # optional
    ##  sink       “remote_server_sink”   # optional
    #}
    #
    # An example of a winmm output (Windows multimedia API).
    #
    #audio_output {
    #   type       “winmm”
    #   name       “My WinMM output”
    ##  device     “Digital Audio (S/PDIF) (High Definition Audio Device)” # optional
    #       or
    ##  device     “0”     # optional
    ##  mixer_type “hardware” # optional
    #}
    #
    # An example of an openal output.
    #
    #audio_output {
    #   type       “openal”
    #   name       “My OpenAL output”
    ##  device     “Digital Audio (S/PDIF) (High Definition Audio Device)” # optional
    #}
    #
    # An example of an sndio output.
    #
    #audio_output {
    #   type       “sndio”
    #   name       “sndio output”
    #   mixer_type “hardware”
    #}
    #
    # An example of an OS X output:
    #
    #audio_output {
    #   type       “osx”
    #   name       “My OS X Device”
    ##  device     “Built-in Output”  # optional
    ##  channel_map      “-1,-1,0,1”   # optional
    #}
    #
    ## Example “pipe” output:
    #
    #audio_output {
    #   type       “pipe”
    #   name       “my pipe”
    #   command    “aplay -f cd 2>/dev/null”
    ## Or if you’re want to use AudioCompress
    #   command    “AudioCompress -m | aplay -f cd 2>/dev/null”
    ## Or to send raw PCM stream through PCM:
    #   command    “nc example.org 8765”
    #   format     “44100:16:2”
    #}
    #
    ## An example of a null output (for no audio output):
    #
    #audio_output {
    #   type       “null”
    #   name       “My Null Output”
    #   mixer_type      “none”         # optional
    #}
    #
    ###############################################################################


    # Normalization automatic volume adjustments ##################################
    #
    # This setting specifies the type of ReplayGain to use. This setting can have
    # the argument “off”, “album”, “track” or “auto”. “auto” is a special mode that
    # chooses between “track” and “album” depending on the current state of
    # random playback. If random playback is enabled then “track” mode is used.
    # See <http://www.replaygain.org> for more details about ReplayGain.
    # This setting is off by default.
    #
    #replaygain        “album”
    #
    # This setting sets the pre-amp used for files that have ReplayGain tags. By
    # default this setting is disabled.
    #
    #replaygain_preamp     “0”
    #
    # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
    # By default this setting is disabled.
    #
    #replaygain_missing_preamp “0”
    #
    # This setting enables or disables ReplayGain limiting.
    # MPD calculates actual amplification based on the ReplayGain tags
    # and replaygain_preamp / replaygain_missing_preamp setting.
    # If replaygain_limit is enabled MPD will never amplify audio signal
    # above its original level. If replaygain_limit is disabled such amplification
    # might occur. By default this setting is enabled.
    #
    #replaygain_limit      “yes”
    #
    # This setting enables on-the-fly normalization volume adjustment. This will
    # result in the volume of all playing audio to be adjusted so the output has
    # equal “loudness”. This setting is disabled by default.
    #
    #volume_normalization      “no”
    #
    ###############################################################################

    # Character Encoding ##########################################################
    #
    # If file or directory names do not display correctly for your locale then you
    # may need to modify this setting.
    #
    #filesystem_charset        “UTF-8”
    #
    ###############################################################################

  • Convert   SACD ISO file To DSF file

    Build Tool: sacd_extract:

    wget https://github.com/sacd-ripper/sacd-ripper/archive/refs/tags/0.3.8.tar.gz

    tar xvfz 0.3.8.tar.gz

    cd sacd-ripper-0.3.8/tools/sace_extract

    cmake .

    make

    ls sacd_extract

    sudo cp sacd_extrace /usr/local/bin

    Convert ISO

    sacd_extrace -i sacd_sample.iso -s

    chmod 777 sacd_sample

  • Export disk volume from TrueNas via iSCSI protocol

    We can export an virtual volume (zvol) on TrueNas, thanks to the iSCSI protocol.

    Storage

    Create a pool

    Create a zvol from the pool

    Sharing / Block/Shars (iscsi)

    Target Global Configuration: Modify iqn if necessary

    Portals: Add a portal with IP 0.0.0.0

    Initiators Groups: Add a initiator with feature of “Allow All initiators”

    Authorized Access: No modification

    Targets: Add a target with the above portal id, initiator id

    Extents: Add a extent with created pool/zvol

    Associated Targets: Add an associated target with created target and extent

    Services

    Launch iscsi service, and start it automaticlly

  • NAS DIY: HP ML310e Gen8 V2 + TrueNas v13

    Hardware:

    HP ML310e Gen8 V2

    Update system software with SPP gen8.1

    Update iLO4 to v2.8.1

    CPU:

    E3-1220L V3 @1.10GHz

    RAM:

    32G ECC DDR3 @1.35V / 1066MHz

    System Disk:

    32G T-Flash Card + 32G USB Disk

    Hrad disk drivers

    6 LFF SATA

    Software:

    TruenNAS – Core – 13.0 – U2

    Power Consumption

    28W ( Without hard driver )

    TCO: RMB 1326.8

    HP ML310e Gen8 V2 X1 638

    Samsung 8G 2RX8 PC3-12800E X4 397

    Intel E3-1220L V3 X1 130

    SanDisk 32GB USB3.1 CZ430 X1 35.9

    SanDisk Ultra 64GB Micro SD X1 35.9

    Toolfree MRA190 5.25=>3.5 X2 90

  • Update iLO4 to the latest version

    To have HTML5 console supported in ILO4, we must to update iLO4 to the new version on HP ML310e Gen8 V2

    Go to the HPE support center: support.hpe.com

    Search iLO4

    Select HPE Integrated Lights-Out 4 (iLO 4)

    Select Driver and Software

    Download ilO4 2.81 of Online ROM Flash Component for Windows x64 – HPE Integrated Lights-Out 4 —— cp051874.exe

    Execute the cp051874.exe under windows, extract the firmware bin file, instead of install

    Launch a browser, such as firefox, and login into the iLO4 of ML310e Gen8 V2

    Go to Administration / Firmware, select the download bin file, and updating