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!

AVI XviD to MP4

I was under the impression that the Roku was only able to consistently stream an MP4 (H.264).  However, to my surprise, I was able to use MKVAVI2MP4 and remux an AVI XviD to an MP4 that streamed without issues on the Roku.  Given that this was a remux and not an encode, the XviD codec, I would assume, was still being used but in an MP4 container.  Anyone have any idea why this worked?

«1

Comments

  • streammonkeystreammonkey Posts: 104Members

    Here's the video information.  The interesting thing is that the Codec ID changed from XVID to 20.  Again, this was not re-encoded as the entire process took just a couple minutes.  However, the MP4 surprisingly streams without problems to my Roku 2 XS HD.  If anyone can give me some idea of why a non-H.264 MP4 is able to successfully stream, I would greatly appreciate it.

    AVI XviD

    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 743 MiB
    Duration                                 : 52mn 58s
    Overall bit rate                         : 1 959 Kbps
    Writing application                      : VirtualDubMod 1.5.10.2 (build 2540/release)
    Writing library                          : VirtualDubMod build 2540/release

    Video
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L5
    Format settings, BVOP                    : 2
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (H.263)
    Muxing mode                              : Packed bitstream
    Codec ID                                 : XVID
    Codec ID/Hint                            : XviD
    Duration                                 : 52mn 58s
    Bit rate                                 : 1 758 Kbps
    Width                                    : 688 pixels
    Height                                   : 384 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.266
    Stream size                              : 666 MiB (90%)
    Writing library                          : XviD 1.1.2 (UTC 2006-11-01)

    AVI muxed to MP4 using MKVAVI2MP4

    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42
    File size                                : 731 MiB
    Duration                                 : 52mn 59s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 1 930 Kbps
    Encoded date                             : UTC 2013-04-19 16:33:04
    Tagged date                              : UTC 2013-04-19 16:33:04
    Writing application                      : mkvavi2mp4 [http://sourceforge.net/projects/mkvavi2mp4]

    Video
    ID                                       : 201
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L5
    Format settings, BVOP                    : Yes
    Format settings, QPel                    : No
    Format settings, GMC                     : No warppoints
    Format settings, Matrix                  : Default (H.263)
    Codec ID                                 : 20
    Duration                                 : 52mn 59s
    Bit rate mode                            : Variable
    Bit rate                                 : 1 757 Kbps
    Maximum bit rate                         : 8 415 Kbps
    Width                                    : 688 pixels
    Height                                   : 384 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.266
    Stream size                              : 666 MiB (91%)
    Title                                    : Imported with GPAC 0.4.6-DEV (internal rev. 5)
    Writing library                          : XviD 1.1.2 (UTC 2006-11-01)

  • schuylerschuyler Plex Dev Team Posts: 3,787Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    Some mpeg4 video can also be direct played inside an MP4 container. The support for H.264 tends to be better and it's simpler to provide a consistent message about what has the best support, but MP4/MPEG4/AAC is supported. If you don't mind reading BrightScript you can see more complete details in the code.

  • streammonkeystreammonkey Posts: 104Members
    schuyler wrote on April 22 2013, 3:58 PM: »

    Some mpeg4 video can also be direct played inside an MP4 container. The support for H.264 tends to be better and it's simpler to provide a consistent message about what has the best support, but MP4/MPEG4/AAC is supported. If you don't mind reading BrightScript you can see more complete details in the code.

    Thanks!  Any idea why the Codec ID changed from XVID to 20 after running MKVAVI2MP4?

  • schuylerschuyler Plex Dev Team Posts: 3,787Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    I think it's probably just a quirk of MediaInfo.

  • streammonkeystreammonkey Posts: 104Members
    schuyler wrote on April 22 2013, 3:58 PM: »

    Some mpeg4 video can also be direct played inside an MP4 container. The support for H.264 tends to be better and it's simpler to provide a consistent message about what has the best support, but MP4/MPEG4/AAC is supported. If you don't mind reading BrightScript you can see more complete details in the code.

    Would you agree that it's probably better to just use H.264 rather than wasting time remuxing an MPEG-4 video into an MP4 as it may or may not work?

  • schuylerschuyler Plex Dev Team Posts: 3,787Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    streammonkey wrote on April 23 2013, 12:07 AM: »

    Would you agree that it's probably better to just use H.264 rather than wasting time remuxing an MPEG-4 video into an MP4 as it may or may not work?

    My two cents, yeah. Unless I'm misremembering, it's not even documented that Roku supports MPEG-4 video, and H.264 video is supported by just about everything. If you're taking the time to muck with a file anyway, I'd use H.264 for the video.

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass
    edited April 2013
    streammonkey wrote on April 23 2013, 12:07 AM: »

    Would you agree that it's probably better to just use H.264 rather than wasting time remuxing an MPEG-4 video into an MP4 as it may or may not work?

    Remuxing a MPEG-4 video file to an mp4 container is not a waste of time. Why re-encode and lose picture quality if you don't have to? Remuxing is extremely efficient and takes minutes to complete as opposed to re-encoding which is time consuming and is a detriment to picture quality. I have never had a remuxed MPEG-4 video file to an mp4 container that needed Plex to transcode the stream to the Roku. 

  • techmattrtechmattr Posts: 221Members, Plex Pass Plex Pass
    mjbxx wrote on April 25 2013, 4:16 PM: »

    Remuxing a MPEG-4 video file to an mp4 container is not a waste of time. Why re-encode and lose picture quality if you don't have to? Remuxing is extremely efficient and takes minutes to complete as opposed to re-encoding which is time consuming and is a detriment to picture quality. I have never had a remuxed MPEG-4 video file to an mp4 container that needed Plex to transcode the stream to the Roku. 

    Because you can cut 30~40% off your file size without any noticeable loss of quality and create a much more universally compatible file at the same time.

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 4:16 PM: »

    Remuxing a MPEG-4 video file to an mp4 container is not a waste of time. Why re-encode and lose picture quality if you don't have to? Remuxing is extremely efficient and takes minutes to complete as opposed to re-encoding which is time consuming and is a detriment to picture quality. I have never had a remuxed MPEG-4 video file to an mp4 container that needed Plex to transcode the stream to the Roku. 

    It's a waste of time as the MPEG-4 video inside of an MP4 container may not always Direct Play on the Roku.  So, I might as well just do the time consuming re-encode to MP4 (H.264) as I know that that will consistently work on the Roku when using Direct Play.  I do not like to transcode as my PMS is not a very powerful machine.

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass

    I have never had a problem doing it this way. XMedia Recode will always let me know if an MPEG-4 video file can be remuxed to an mp4 container. If not, I then proceed to re-encoding. If the file can be remuxed, it should be Roku ready with no need for Plex transcoding.

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 7:50 PM: »

    I have never had a problem doing it this way. XMedia Recode will always let me know if an MPEG-4 video file can be remuxed to an mp4 container. If not, I then proceed to re-encoding. If the file can be remuxed, it should be Roku ready with no need for Plex transcoding.

    Is not a matter of whether or not the MPEG-4 video can be in the MP4 container, it's a matter of whether or not the Roku will have a problem with MP4 (MPEG-4) vs. MP4 (H.264).

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass

    And I am trying to tell you that in my experience, the Roku has zero issues with MPEG-4 video files that can be remuxed into an mp4 container. It just works.

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 8:14 PM: »

    And I am trying to tell you that in my experience, the Roku has zero issues with MPEG-4 video files that can be remuxed into an mp4 container. It just works.

    Ok, I'll give that a shot.  Will save me time and possibly keep some quality that might be lost converting from MPEG-4 to H.264.

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass

    Just remember that the audio will in all likelihood need to be remuxed as well to prevent Plex from transcoding. I personally use AAC low complexity because my hearing is off, so I do not use AC3 for surround sound. 

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 9:20 PM: »

    Just remember that the audio will in all likelihood need to be remuxed as well to prevent Plex from transcoding. I personally use AAC low complexity because my hearing is off, so I do not use AC3 for surround sound. 

    Actually, that brings up another point.  Let's say that the video file contains one 5.1 audio track and I need to turn that into track1: AAC Stereo and track2: AC3 5.1 passthrough.  I believe that that would be re-encoding, not remuxing the audio, correct?  Also, are you saying that AAC 5.1 would be supported by the Roku?

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass

    In that scenario you would be remuxing the video and re-encoding the audio. It takes minutes this way. AAC 5.1 is definitely not supported on the Roku.

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 8:14 PM: »

    And I am trying to tell you that in my experience, the Roku has zero issues with MPEG-4 video files that can be remuxed into an mp4 container. It just works.

    I know that you have confirmed that MP4 (MPEG-4) can use Direct Play on the Roku without issues and we all know that MP4 (H.264) can.  Have you had success with any other codecs in an MP4 for Direct Play on the Roku?

  • streammonkeystreammonkey Posts: 104Members
    mjbxx wrote on April 25 2013, 7:50 PM: »

    I have never had a problem doing it this way. XMedia Recode will always let me know if an MPEG-4 video file can be remuxed to an mp4 container. If not, I then proceed to re-encoding. If the file can be remuxed, it should be Roku ready with no need for Plex transcoding.

    Do you use XMedia Recode?  If so, did you notice that if you take a 5.1 stream and convert it into an AAC Stereo track that the Kbps is at 0 even though you selected a non-zero Kbps prior to encoding?  Do you know why this is?  Mediainfo doesn't even show the Kbps for the audio track.  However, you can hear the sound.  So, it must not be at 0 Kbps.

  • mjbxxmjbxx Dedicated Member Posts: 919Members, Plex Pass Plex Pass

    Of course I am using XMedia Recode as my entire focus on this thread relates to using it. I utilize MediaInfo to determine the audio Bitrate and Sample Rate as in this example we have an avi file that is mp3 having a Bitrate of 128kbps and a Sample Rate of 48KHZ that would be converted to AAC, LC 128kbps and 48HZ.

  • techmattrtechmattr Posts: 221Members, Plex Pass Plex Pass

    @mjbxx, Which Roku do you have? I have a Roku 2 XD and a Roku 3 and neither of them will direct play of MP4(mpeg4). Even with a single 2 channel AAC audio track.

«1
Sign In or Register to comment.