Posts by Mario77

    Gonna try your have some code I never tryed before..

    what is this for?

    -g 100 -af "aresample=async=1:first_pts=0"

    Still stopping on my setup..max it plays is 10 minutes...are you using FFMPEG addon from Libreelec repo?

    I know ppl had it working at RPi3 and Tvh, so it may be a problem at the cmd you are using.

    Nothing obviouse if you ask me. I would cut down the commandline as much as possible, maybe some command combination creates problems.

    I tryed so many commands that I m running out of ideas...problem is that even with the simplest of commands with just copy and no just stops..

    Maybe someone comes up with a working command so I can hopefully know if issue is with command or something else..

    So I decided to kill some time playing with transcoding and I'm getting frustrated..

    Im not even sure if this is possible..

    I m trying to transcode an mpeg2 stream to h264..

    So far I only managed to get it working not longer then 10 minutes after that stream just drops...

    While it's working cpu is averaging around 50% so no big deal I suppose...

    Output is h264/aac as buffers or glitches..

    Command i m using right now is this tough I tryed loads and loads of different versions... :S

    ffmpeg -threads 4 -c:v mpeg2_mmal -v panic -hide_banner -nostats -i pipe:0 -map 0:0 -map 0:1 -map 0:2? -c:v h264_omx -s 480x270 -b:v 768k -pix_fmt yuv420p -bufsize 3000k -c:a aac -ac 1 -ar 22050 -c:s copy -f mpegts -r 25 pipe:1

    Anyone got this working?Or I m asking too much from my little computer ^^

    Probably that was some visually impaired audio stream or something to the liking

    And that s not only for individual things...if you set it to make default for all media ,everything will use that setting

    what are you using to be spawned ?

    if using ffmpeg with logs activated, you can inspect the journal to understand why it stopped

    Hi..just using a tiny script 1 liner with ffmpeg input pipe:0 output pipe:1

    Anyway I test it it always stops...sometimes after 10 min and sometimes less...while it's playing it's buffering or anything..

    Log is here maybe you have an idea what's failing..I m suspecting it's a cpu issue...tried everything in ffmpeg command..setting cpu threads,buffer etc..


    • ffmpeg.log.txt

      (76.37 kB, downloaded 48 times, last: )

    AML S905 does not have the horsepower to do "proper" transcoding. AML has a GPU encoder but no driver for it because AML does not care :D

    remuxing ofc is easily possible, so *.ts -> *.mkv etc is no problem

    On rpi it just works for few minutes then it just stops

    [  ERROR] spawn: Exiting normally, received signal 15.

    when it works it works fine no buffering or any issues

    No, it's not an rpi, it's a tv box based on the amlogic S905D

    You can probably transcode too but don't use the codecs profiles cause I m sure CVH told us they are broken on some post few months ago..

    Use FFmpeg pipe options..

    Just create new streaming profile choose mpeg-ts spawn/ built-in and add your ffmpeg command in their or by a script..

    I don t own a Rpi 4 yet but your issue might easily be an unsupported resolution the rpi is trying to change to on boot as no monitor is detected...can you try to whitelist some commonly used resolutions like 1920x1080 60hz in the video settings and try to reboot again

    so it's not just me ;)

    If you r using rpi that wont work..just delete that libx264 are supposed to create new codec profile with omx_h264..then set that when you create new transcoding profile but even that is not working..only audio is transcoded and no video..I m sure it used to work before with older builds..As I understand it..Tvheadend uses it s own ffmpeg build and something is broken there as Omx h264 works on Ffmpeg provided with Libreelec

    Sorry, I was referring to (what I think is) real time transcoding of live tv (stream profiles/codec profile) in order to serve lower bitrate content to mobile devices connected to cellular data. I never managed to configure that in tvheadend, I'm not sure it's possible at all on a tv box (e.g. the "webtv-h264" codec profile is disabled and cannot be enabled).

    Not sure what you mean by disabled but the last time I looked it was a bit confusing..I am on Rpi but codecs available for transcoding in tvheadend for rpi don't work with libx264 encoder...I only managed to get OMx to work but not with stream transcoding....just with recordings and that was not through codec profiles but through ffmpeg something is broken or Im doing something wrong..

    Regarding transcoding I did manage to make it work with tvheadend stream urls and ffmpeg pipe but rpi struggles so I gave up...was more for experimenting then that I need transcoding..

    I can confirm that /storage/.config/ does not run when the Pi is started before the TV is powered up.

    Is there a way to launch a script that is not blocked if LE doesn't find a monitor? Also, if LE is going to block on a no monitor event, how come it doesn't keep trying to discover a monitor every few seconds and then launch the platform if it discovers one?

    You need to pass the monitor EDID file to your RPi...

    try this


    /opt/vc/bin/tvservice -d /storage/edid.dat


    #mount -o remount,rw /flash

    take the edid.dat from storage and place it in the flash directory

    then add this line to config.txt



    #mount -o remount,ro /flash


    Thank you, Mario. That would be brilliant if there were a running process that could execute my script. I'm trying to find that process. This is the root of my question.

    You can always start script with while loop breaks and monitor is on startup will be paused as script loop will be running..not tested tough..that was just an idea..

    My advice = leave RPi on 24hrs

    Or have a look how to create EDID for Rpi..that might help