Kodi Community Forum

Full Version: IPTV Recorder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The locale string needed on windows is not the same as the one needed on linux

I got it working with "French" instead of "fr_FR"

We could use pycountry to support both format, here is a working exemple on my env :

import os
import locale
import pycountry
import datetime

language = pycountry.languages.lookup(xbmc.getLanguage(xbmc.ISO_639_1))

if os.name == "posix":
    locale.setlocale(locale.LC_ALL, language.alpha_2)
else:
    locale.setlocale(locale.LC_ALL, language.name)

print(datetime.datetime.today().strftime("%A"))
Could you have a go adding it in.
I'm going away for a few days and should really take a break from this, although I probably won't.

Make sure the language variable doesn't clash with the language import for the po files.

I see in google that xbmc.getLanguage has had lots of issues in the past.

How many devices can you test on?
I usually try to make sure addons work on Android Leia and Windows Krypton and Leia.
nullege usually comes up with some good examples as does github search

http://nullege.com/codes/search/xbmc.getLanguage
I will give it a try later in the day, cannot do that right now

In the worse case we can always fallback to english, it's not that critical

Currently I test on Windows Krypton and Android Krypton
There is a module called script.module.pycountry but it's not in the main Kodi repo.

I tried this version
https://github.com/primaeval/plugin.vide...bd1935dR40
from here
https://github.com/dmitry-vinogradov/kod...ils.py#L61
and the day after tomorrow is jeudi, which is good.

We just need to extract the map of ISO_639_1 languages to locale languages.
It must be in Kodi somewhere as dates are already translated in the skin.
Multiline labels look much better with Arial-based fonts in Estuary.
They can look a mess in other fonts and skins.
I made a PR for the locale date function & added translations for new menus

Unfortunatly, set locale function doesn't work on my android device (OK on windows), getting the following error

Code:
_locale emulation only supports "C" locale
Hi,I managed to install and config this addon successfuly on kodi 17.6 windows device, but on the PI3 i cannot install ffmpeg.
This is because apt-get is not available on the OS Libreelec.
Is there another way to install ffmpeg?

Is there also a tutorial how to install ffmpeg on android tv device?
You can maybe find prebuilt lib for PI3, else you might need to compile it yourself

For android TV, you can use the prebuilt lib given on the first post, you just need to put it somewhere (on the device, USB, LAN...) and set the target on the addon's settings
In LibreELEC ffmpeg should be /usr/bin/ffmpeg

This post says that there is a fuller version of ffmpeg you could use that is part of emby.
https://forum.libreelec.tv/thread/11685-...libreelec/

As Chychy says there is a link to some Android ffmpeg builds on the first post.
This repo might be useful too.
https://github.com/Khang-NT/ffmpeg-binary-android
The next release 0.0.6 is going to need you to re-enter your recording jobs and rules.

Before I release it does anyone want me to write an update converter?
I will if there is any demand.
(2018-03-31, 12:17)wigee Wrote: [ -> ]Hi,I managed to install and config this addon successfuly on kodi 17.6 windows device, but on the PI3 i cannot install ffmpeg.
This is because apt-get is not available on the OS Libreelec.
Is there another way to install ffmpeg?
For rpi3 running Libreelec, my understanding is that ffmpeg is already built into Libreelec.  I ssh'd into my rpi2 running latest version Nightly of Leia and with ffmpeg -h command I recieved following information.
I believe location for ffmpeg is /usr/bin/ffmpeg
 
Code:
LibreELEC:~ # ffmpeg -h
ffmpeg version 3.4.1-Kodi Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --prefix=/usr --cpu=cortex-a7 --arch=arm --enable-cross-compile --cross-prefix=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi- --sysroot=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot --sysinclude=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include --target-os=linux --nm=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-nm --ar=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-ar --as=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-gcc --cc=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-gcc --ld=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-gcc --host-cc=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/host-gcc --host-cflags='-O2 -Wall -pipe -I/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/include -Wno-format-security' --host-ldflags='-Wl,-rpath,/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/lib -L/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/lib' --extra-cflags='-I/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/interface/vcos/pthreads -I/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/interface/vmcs_host/linux -march=armv7ve -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -fomit-frame-pointer -Wall -pipe -Os ' --extra-ldflags='-march=armv7ve -mtune=cortex-a7 -Wl,--as-needed' --extra-libs='-lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util -lvcsm' --disable-static --enable-shared --enable-gpl --disable-version3 --enable-nonfree --enable-logging --disable-doc --disable-debug --enable-stripping --enable-pic --pkg-config=/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/bin/pkg-config --enable-optimizations --disable-extra-warnings --disable-ffprobe --disable-ffplay --disable-ffserver --enable-ffmpeg --enable-avdevice --enable-avcodec --enable-avformat --enable-swscale --enable-postproc --enable-avfilter --disable-devices --enable-pthreads --disable-w32threads --enable-network --disable-gnutls --enable-openssl --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-vaapi --disable-vdpau --enable-rpi --disable-rkmpp --disable-dxva2 --enable-runtime-cpudetect --enable-hardcoded-tables --disable-encoders --enable-encoder=ac3 --enable-encoder=aac --enable-encoder=wmav2 --enable-encoder=mjpeg --enable-encoder=png --disable-decoder=mpeg_xvmc --enable-hwaccels --disable-muxers --enable-muxer=spdif --enable-muxer=adts --enable-muxer=asf --enable-muxer=ipod --enable-muxer=mpegts --enable-muxer=null --enable-encoder=libx264 --enable-encoder=libxvid --enable-encoder=mpeg4 --enable-encoder=mpeg2video --enable-demuxers --enable-parsers --enable-bsfs --enable-protocol=http --disable-indevs --disable-outdevs --enable-filters --disable-avisynth --enable-bzlib --disable-lzma --disable-alsa --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libopencv --disable-libdc1394 --disable-libfreetype --disable-libgsm --disable-libmp3lame --disable-libopenjpeg --disable-librtmp --enable-libspeex --disable-libtheora --disable-libvo-amrwbenc --disable-libvorbis --disable-libvpx --disable-libx264 --disable-libxavs --disable-libxvid --enable-zlib --enable-asm --disable-altivec --enable-neon --enable-yasm --disable-symver
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options][[infile options] -i infile]... {[outfile options] outfile}...

Getting help:
    -h      -- print basic options
    -h long -- print more options
    -h full -- print all options (including all format and codec specific options, very long)
    -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter
    See man ffmpeg for detailed description of the options.

Print help / information / capabilities:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-buildconf          show build configuration
-formats            show available formats
-muxers             show available muxers
-demuxers           show available demuxers
-devices            show available devices
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-pix_fmts           show available pixel formats
-layouts            show standard channel layouts
-sample_fmts        show available audio sample formats
-colors             show available color names
-sources device     list sources of the input device
-sinks device       list sinks of the output device
-hwaccels           show available HW acceleration methods

Global options (affect whole program instead of just one file:
-loglevel loglevel  set logging level
-v loglevel         set logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-y                  overwrite output files
-n                  never overwrite output files
-ignore_unknown     Ignore unknown stream types
-filter_threads     number of non-complex filter threads
-filter_complex_threads  number of threads for -filter_complex
-stats              print progress report during encoding
-max_error_rate ratio of errors (0.0: no errors, 1.0: 100% error  maximum error rate
-bits_per_raw_sample number  set the number of bits per raw sample
-vol volume         change audio volume (256=normal)

Per-file main options:
-f fmt              force format
-c codec            codec name
-codec codec        codec name
-pre preset         preset name
-map_metadata outfile[,metadata]:infile[,metadata]  set metadata information of outfile from infile
-t duration         record or transcode "duration" seconds of audio/video
-to time_stop       record or transcode stop time
-fs limit_size      set the limit file size in bytes
-ss time_off        set the start time offset
-sseof time_off     set the start time offset relative to EOF
-seek_timestamp     enable/disable seeking by timestamp with -ss
-timestamp time     set the recording timestamp ('now' to set the current time)
-metadata string=string  add metadata
-program title=string:st=number...  add program with specified streams
-target type        specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apad               audio pad
-frames number      set the number of frames to output
-filter filter_graph  set stream filtergraph
-filter_script filename  read stream filtergraph description from a file
-reinit_filter      reinit filtergraph on input parameter changes
-discard            discard
-disposition        disposition

Video options:
-vframes number     set the number of video frames to output
-r rate             set frame rate (Hz value, fraction or abbreviation)
-s size             set frame size (WxH or abbreviation)
-aspect aspect      set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-bits_per_raw_sample number  set the number of bits per raw sample
-vn                 disable video
-vcodec codec       force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.
-pass n             select the pass number (1 to 3)
-vf filter_graph    set video filters
-ab bitrate         audio bitrate (please use -b:a)
-b bitrate          video bitrate (please use -b:v)
-dn                 disable data

Audio options:
-aframes number     set the number of audio frames to output
-aq quality         set audio quality (codec-specific)
-ar rate            set audio sampling rate (in Hz)
-ac channels        set number of audio channels
-an                 disable audio
-acodec codec       force audio codec ('copy' to copy stream)
-vol volume         change audio volume (256=normal)
-af filter_graph    set audio filters

Subtitle options:
-s size             set frame size (WxH or abbreviation)
-sn                 disable subtitle
-scodec codec       force subtitle codec ('copy' to copy stream)
-stag fourcc/tag    force subtitle tag/fourcc
-fix_sub_duration   fix subtitles duration
-canvas_size size   set canvas size (WxH or abbreviation)
-spre preset        set the subtitle options to the indicated preset

LibreELEC:~ #

---edit---Ahh I see primaeval already commented above about ffmpeg for librelec, with link to additional info Blush
version 0.0.6
- internal database (old jobs will need to be re-added)
- 2 xmltv/m3u file inputs
- watch timer rules
- internationalisation (French so far, thanks to Chychy)
- customizable display
- now/next program in channel listings
version 0.0.7
- category search
- title and plot search fix