If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

RPi Transcoding

1356710

Comments

  • KnightOrcKnightOrc Posts: 233Members, Plex Pass Plex Pass

    I'm waiting for my Zotac Zbox ID91 to arrive, Core i3 2.9Ghz (Haswell), will host PMS and my Minecraft :)  For under $50 I could have had the older Core i5 2.9Ghz (Turbo 3.6Ghz) version, but I think/hope a new i3 will be enough to handle 1080p transcodes.

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    Ok i'll have to update the first post. I made further testings and two scenarios seems to cause issues.

    • DTS remuxing : when you have to transcode the video stream for like bitrate being too high, remuxing will result in an invalid stream seen from the client (no audio). I have open a ticket at PlexInc. Therefore, any scenario requiring transcoding with DTS input, will trancode DTS to AAC.
    • FLAC output : I was thinking of having flac usable as an output possibility as well, so that it can be remuxed rather than transcoded. but it seems this is causing issues as well, as transcoder will use it in scenarios that are obviously not working. For instance, if i try to play a truehd stream, transcoder will choose to transcode truehd to flac, which will result in an error on PMS. To avoid this i will remove flac from the transcoded possible targets and anything getting transcoded from flac will be transcoded to AAC as well. 

    To clarify this, it doesnt mean that if you are playing flac / DTS that it will not DirectPlay it, if the file is within the directplay capabilities (total birtrate audio + video < 21 Mbits) and known audio / video codec, then it will directplay it.

    But if it has to transcode, given those issues, its will transcode audio streams to AAC which seems the safest bet for now :)

    Plex Dev Team

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass

    Sounds good dude :)

    Any rough idea of when we might see 0.4.0 ?

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja
    edited March 2014

    I already answered that yesterday here : https://forums.plex.tv/topic/101251-expected-040-release-date/ :)

    Plex Dev Team

  • mooturnermooturner Posts: 13Members ✭✭
    Will it test for a compatible container too?

    Rasplex won't play my .wtv files from Windows Media Centre (recorded MPG2 TV), but if I simply put the very same video in a regular mpg2 container (like program stream or transport stream) I have no dramas.
  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    I didn't implement this now, but i can look into this.

    we're using ffmpeg on RPi as well which should iirc handle the container part as PMS does (assuming that ffmpeg handles WTV).

    So first could you check if transcoding wtv files (you can do that forcing transcoding in Preferences / network) works ?

    if it works using transcoding, then could you PM me a link to a sample ? I will make some testing and let you know if we can do something :)

    Plex Dev Team

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja
    xortim wrote on February 28 2014, 5:42 PM: »

    VC1 and MPEG2 should leverage DirectPlay if the licenses are added to the config.txt:

    decode_MPG2=0x00000000
    decode_WVC1=0x00000000

    Verified they're actually enabled with:

    vcgencmd codec_enabled MPG2
    vcgencmd codec_enabled WVC1

    Perhaps always have PMS DirectPlat these, but have some intelligence on the RasPlex side to turn DirectPlay off if the above commands don't indicate support for the formats.

    The other option, would probably to setup two profiles for 4 profiles for the Rasperry Pi in DirectPlay, no licenses, mpg2, wvc1 and both.

    This has been implemented :)

    Plex Dev Team

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    I'll freeze the current status (summed up in first post).

    There will probably be some adjustments to be made after next release according to people experiences, but i want this to go upstream for now so that we can move on :)

    Plex Dev Team

  • dlanordlanor Posts: 2,215Members, Plex Pass Plex Pass
    edited March 2014

    The first post is either incorrect or too vague in specifying that ALL mpeg4 content can be played without transcoding.
    That's simply wrong, as has been stated several times in this thread.

    "DIV3"/"div3" aka "DivX 3 Low" media require transcoding, which they won't get if you accept all mpeg4 for 'Direct Play'.
    This could apply to other mpeg4 implementations as well, but we can deal with that as issues pop up in future.
    The important thing here is to NOT give blanket permission for all mpeg4, but implement specific exceptions.

    There's also an incorrect statement about how bitrate limitation should work:

    Bitrate limitation for video (when transcoding)


    The bitrate limitation is NOT something used only after already deciding to transcode, which that statement implies.
    Instead the limitation is one of the criteria determining whether or not transcoding is needed even for a compatible format.
    In other words: It is not something used "when transcoding", as it is used to enforce transcoding whenever the limit is exceeded.

    A similar objection also applies to the statement for audio transcoding.

    NB:
    The current implementation allows "Direct Play" only for the "Direct Play" setting, where no bitrate is specified, but that is a BUG.

    And it is because of that bug that the current bitrate limits only apply "when transcoding", since any bitrate enforces transcoding regardless of source bitrate (even if it is much lower), so that the bitrate limit value only affects what bitrate the transcoder will 'aim' for in its work, without any influence over the decision to transcode.

    I sincerely hope that the new implementation will work properly, so that the bitrate limit is used for both of its intended purposes

    1: A bitrate limit forcing all media exceeding the limit to be transcoded, regardless of CODECs, with Direct play used for compatible CODECs at lower bitrates
    2: A bitrate limit which the transcoder must respect in generating the new stream

    Possibly (and hopefully) you did intend the correct implementation, but it's best to make the wording of the post clear.
    I suggest simply removing the substring "(when transcoding)" or replacing it with "(transcoding trigger and limit)"

    Best regards: dlanor

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja
    edited March 2014

    Hi dlanor,

    Ok lemme clarify some of the points you mentioned :)

    dlanor wrote on March 10 2014, 6:44 PM: »

    The first post is either incorrect or too vague in specifying that ALL mpeg4 content can be played without transcoding.
    That's simply wrong, as has been stated several times in this thread.

    "DIV3"/"div3" aka "DivX 3 Low" media require transcoding, which they won't get if you accept all mpeg4 for 'Direct Play'.
    This could apply to other mpeg4 implementations as well, but we can deal with that as issues pop up in future.
    The important thing here is to NOT give blanket permission for all mpeg4, but implement specific exceptions.

    I understand this concern though i have no Div3 Low sample to test with. But the profile information is not something that is available to PHT client when it has to decide whether it should transcode or not.

    basically the information which is available for the client is what you can see in the information window in PMS when you are inside you movie in Plex Web (stream codecs, no profile information).

    I believe that whatever the profile is on the server side media, it's not transfered to client side so that he can make the right decision.

    If you have any sample that you could make available and PM me a link, i could check it out.

    If my statement is right, then we only have the possibility to ask for systematic transcoding on mpeg4 files (no matter what the profile is), which will cause mpeg4 streams with higher profiles to be transcoded as well.

    This could be an issue as some PMS servers could not have the adequate power for transcoding on a media that could have played natively.

    dlanor wrote on March 10 2014, 6:44 PM: »

    There's also an incorrect statement about how bitrate limitation should work:


    The bitrate limitation is NOT something used only after already deciding to transcode, which that statement implies.
    Instead the limitation is one of the criteria determining whether or not transcoding is needed even for a compatible format.
    In other words: It is not something used "when transcoding", as it is used to enforce transcoding whenever the limit is exceeded.

    A similar objection also applies to the statement for audio transcoding.
     

    The current implementation checks for the global bitrate, that is audio bitrate + video bitrate. If this exceeds 21 mbits, then transcoding is triggerred as higher bitrates would probably cause stuttering.

    Once the server is applying transcoding, it will cap the video bitrate to 20 Mbits and audio to 1 Mbit no matter what.

    This is i think the best we can do with the possibilities that are offered by PMS transcoding profiles serverside.

    So basically you have both bitrate capping path (client side on global bitrate, and server side on individual streams bitrates)

    dlanor wrote on March 10 2014, 6:44 PM: »

    NB:
    The current implementation allows "Direct Play" only for the "Direct Play" setting, where no bitrate is specified, but that is a BUG.

    And it is because of that bug that the current bitrate limits only apply "when transcoding", since any bitrate enforces transcoding regardless of source bitrate (even if it is much lower), so that the bitrate limit value only affects what bitrate the transcoder will 'aim' for in its work, without any influence over the decision to transcode.
     

    Well this is the way it was intended to be implemented by Plex guys, even if the implementation is not completely satisfying, you cannot call this a BUG.

    dlanor wrote on March 10 2014, 6:44 PM: »

    I sincerely hope that the new implementation will work properly, so that the bitrate limit is used for both of its intended purposes

    1: A bitrate limit forcing all media exceeding the limit to be transcoded, regardless of CODECs, with Direct play used for compatible CODECs at lower bitrates
    2: A bitrate limit which the transcoder must respect in generating the new stream

    Possibly (and hopefully) you did intend the correct implementation, but it's best to make the wording of the post clear.
    I suggest simply removing the substring "(when transcoding)" or replacing it with "(transcoding trigger and limit)"

    Best regards: dlanor

    1 - all medias having a global bitrate above 21 Mbits will be transcoded. the directplay setting will have to be set to allow both directplay / transcoding depending on the client-side decision. The 'transcode always' functionality will remain as some people have a use for it (like for remote server playback).

    2 - yeah server-side bitrate limitations will be set to 20 mbits video / 1 Mbit audio.

    I hope this clarifies a bit the implementation. Don't get me wrong, your points make sense but i need to deal with the current transcoder possibilities which are missing some features in some areas.

    On the other hand i dont want to overuse transcoding as some users will have gimped PMS and might be in trouble for transcoding even on some lower resolution medias.

    PS : PM me a Divx3 file link so that i can have a look if you can.

    Plex Dev Team

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass
    edited March 2014

    divx is quite uncommon anyway. the old sd stuff is usually xvid and the new hd "and sd" stuff is usually x264. perfect for the pi :D

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    After diescussing for a while with the Plex transcoder guys, they would recommend that we dont directplay mpeg4 as there are a lots of variants which might cause troubles to Rpi in directplay.

    As we dont have the necessary infromation on clientside to decide wether it would support it or not, they suggest to trasncode mpeg4 streams to H264.

    This would avoid any issue with mpeg4 streams, but might require extra load for PMS as it will have to do more transcoding.

    What would be your thoughts about this ?

    Plex Dev Team

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass
    This would be a big problem for me as I have a lot of xvid mpeg4's that play through direct play perfectly ATM.

    My PMS on my ReadyNAS NV+ v2 is not capable of transcoding anything not even audio

    Can't it just be left as it is now on 0.3.1 ? Do we really need profiles ?

    Things work fine as they apart from the odd crash here n there and a little bit of lag in the menus.

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass
    The raspberry pi is perfectly capable of playing mp4 or avi files with a xvid codec

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    We will introduce transcoding so that unsupported formats can become supported.

    The issue is in the formats which are like 'half' supported, and mpeg4 is one of them. In that case we only have two options :

    - transcode, but every mpeg4 will be transcoded and we will also have to transcode the ones that could have been directplayed

    - Directplay, but the unsupported mpeg4 profiles wont be played either.

    I will ask the Plex guys if its possible to have the profile information on client side .. but this might be long to come.

    Plex Dev Team

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja
    treboR2Robert wrote on March 11 2014, 12:36 PM: »

    The raspberry pi is perfectly capable of playing mp4 or avi files with a xvid codec

    dlanor is reporting that some profiles wont directplay ... the mpeg4 files that i have seem also to directplay properly, but there are so many codecs / profiles variants, especially in mpeg that it hard to test them all ... 

    Plex Dev Team

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass
    edited March 2014

    I think making the PMS transcode all mpeg4 files would be a step backwards.

    It seems that from what i have read the only mpeg4 that is not direct playable is the older 3.xx divx files. here is a quote from the wiki

    1.4 Video and audio formats the Raspberry Pi can playback

    • H.264 (up to High Profile) encoded videos are supported up to 1080P using hardware video decoding. Note: Hi10P will not work.
    • MPEG-4 encoded videos are supported up to 1080P using hardware video decoding. This includes XviD and recent versions on DivX (but not the older 3.xx DivX).
    • The Raspberry Pi Foundation offers additional video codec licenses for a few dollars. At the moment you can purchase MPEG-2 and VC1, both with support up to 1080P. Read below on how to enable these.
    • MJPEG, VP6, VP8 and OGG Theora are supported as GPU accelerated software decoders. These are limited to SD resolutions.
    • The ARM is not powerful enough for useful software decode of video.
    • DVD ISOs and DVD menu navigation is early in development and might not always work.
    • Software DTS audio decode was initially problematic, but works quite well in recent builds. TrueHD audio is too CPU intensive and will not play.

    divx is hardly ever used either and I am sure most people would rather have their PMS direct play their xvid and new divx files than transcode them all just because of a really old format divx

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass
    LongChair wrote on March 10 2014, 8:18 PM: »

    2 - yeah server-side bitrate limitations will be set to 20 mbits video / 1 Mbit audio.

    Most DTS audio tracks are 1.5 mbits

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

  • LongChairLongChair Plex Dev Team Posts: 669Members, Plex Pass, Plex Ninja Plex Ninja

    I kind of agree on that, just wondering how to proceed :)

    Plex Dev Team

  • treboR2RoberttreboR2Robert Posts: 252Members, Plex Pass Plex Pass

    yeah i know where your coming from.

    that my 2 cents anyway :unsure:

    treboR2Robert    AKA    Mr. Grumpy


    PMS ( FreeNAS 9.10.2-U5 ) ( manual jail )    Rasplex ( Raspberry Pi 3 model B ) ¦ ( Raspberry Pi 2 model B x2¦ ( Raspberry Pi model B x2 )     PS3 & PS4

Sign In or Register to comment.