Page 1 of 1

MP4 Files Not Served Up

Posted: Fri Sep 19, 2014 1:27 am
by wagb278
This is my first post to the forum, please be gentle.
The symptom I observe is that Plex media server installed on my NetGear ReadyNAS model 102 will not serve up MP4 files produced by Handbrake. I fully understand that the NAS model is a low powered ARM processor and thus does not support transcoding. But it should serve up MP4 files on the LAN and to a DLNA enabled smart TV which supports MP4 format. I am suspecting Handbrake is doing something to the files it produces to prevent them being sent from the NAS to devices over the LAN. The Plex software on the NAS reports it can not transcode the files; but it shouldn't have to do any transcoding on the fly.

I was at a loss as to why my MP4 files would not play over the LAN from the NAS so i searched the Internet to find sample MP4 files to use for testing. Two such MP4 files I found work perfectly over the LAN from the NAS. So I deduced it must be something I'm telling Handbrake to do/not do, or that Handbrake is not doing what it should.

I used the media file Info inspection feature of Plex to compare the files that work and those that don't work and came up with one significant constant setting difference between the files. The files that I downloaded from the Internet and work both have the Web optimized setting (in both the Media and Part sections of Plex information) set to Yes; while MP4 files I create using Handbrake always have those fields set to No. I always set (enable) the Web optimized check box in Handbrake; but that does not seem to impact the setting for Web optimized in Plex. This is just an observation. My understanding of that setting in Handbrake is that it should not impact the validity of the MP4 files, it might just take a little longer for them to start playing. Unless the Plex software on the NAS is using that setting differently. The only other thing that is different between the files that work and those that don't is the length, but that shouldn't matter, should it? The sample MP4 files are only a few seconds long while the files I pass through Handbrake are longer.

Another user of the same NAS model I have with the same Plex software has no problem with MP4 files being sent - they work for him. I am using MakeMKV (version 1.8.13) to read a DVD and create MKV files. Then use Handbrake 6380svn (x86_64) to produce MP4 files. I experimented with some settings in Handbrake but have settled on just using the Normal Preset, then enable the Web Optimized check box. The MP4 files produced by Handbrake all play on the same computer just fine using VLC. I am running a 64-bit Linux Mint version 17 system for MakeMKV & Handbrake.

Here is the Activity Log contents of converting a short extra feature (deleted scenes) from a MKV title off a DVD.

Code: Select all

[14:32:23] CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
[14:32:23]  - logical processor count: 4
[14:32:23] OpenCL: library not available
[14:32:23] hb_scan: path=/data/dvdrip-data/Sahara-MKV/title04.mkv, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /data/dvdrip-data/Sahara-MKV/title04.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /data/dvdrip-data/Sahara-MKV/title04.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/data/dvdrip-data/Sahara-MKV/title04.mkv) failed
[14:32:23] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.0
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:32:23] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/data/dvdrip-data/Sahara-MKV/title04.mkv':
  Duration: 00:04:51.95, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 52.385667
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 52.385667, end 145.512033
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 145.512033, end 214.847967
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 214.847967, end 291.958333
    Metadata:
      title           : Chapter 04
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9800 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
    Stream #0.2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.3(eng): Subtitle: dvdsub (default)
[14:32:23] scan: decoding previews for title 1
[14:32:23] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround)
[14:32:23] scan: audio 0x2: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround)
[14:32:23] scan: 10 previews, 720x480, 29.970 fps, autocrop = 60/64/0/0, aspect 16:9, PAR 32:27
[14:32:23] libhb: scan thread found 1 valid title(s)

** (ghb:6215): WARNING **: Inhibit failed: The name org.freedesktop.PowerManagement was not provided by any .service files
[14:33:03] CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
[14:33:03]  - logical processor count: 4
[14:33:03] OpenCL: library not available
[14:33:03] hb_scan: path=/data/dvdrip-data/Sahara-MKV/title04.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /data/dvdrip-data/Sahara-MKV/title04.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /data/dvdrip-data/Sahara-MKV/title04.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/data/dvdrip-data/Sahara-MKV/title04.mkv) failed
[14:33:03] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.0
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:33:03] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/data/dvdrip-data/Sahara-MKV/title04.mkv':
  Duration: 00:04:51.95, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 52.385667
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 52.385667, end 145.512033
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 145.512033, end 214.847967
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 214.847967, end 291.958333
    Metadata:
      title           : Chapter 04
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9800 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
    Stream #0.2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.3(eng): Subtitle: dvdsub (default)
[14:33:03] scan: decoding previews for title 1
[14:33:03] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround)
[14:33:03] scan: audio 0x2: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround)
[14:33:03] scan: 10 previews, 720x480, 29.970 fps, autocrop = 60/64/0/0, aspect 16:9, PAR 32:27
[14:33:03] libhb: scan thread found 1 valid title(s)
[14:33:05] gtkgui: Modified Preset: Regular->Normal
[14:33:05] 1 job(s) to process
[14:33:05] starting job
[14:33:05] sync: expecting 8749 video frames
[14:33:05] job configuration:
[14:33:05]  * source
[14:33:05]    + /data/dvdrip-data/Sahara-MKV/title04.mkv
[14:33:05]    + title 1, chapter(s) 1 to 4
[14:33:05]    + container: matroska,webm
[14:33:05]  * destination
[14:33:05]    + /data/dvdrip-data/Sahara-Handbrake/Saraha Deleted Scenes.mp4
[14:33:05]    + container: MPEG-4 (libavformat)
[14:33:05]      + optimized for HTTP streaming (fast start)
[14:33:05]      + chapter markers
[14:33:05]  * video track
[14:33:05]    + decoder: mpeg2video
[14:33:05]      + bitrate 9800 kbps
[14:33:05]    + filters
[14:33:05]      + Framerate Shaper (0:27000000:900900)
[14:33:05]        + frame rate: same as source (around 29.970 fps)
[14:33:05]      + Crop and Scale (720:356:60:64:0:0)
[14:33:05]        + source: 720 * 480, crop (60/64/0/0): 720 * 356, scale: 720 * 356
[14:33:05]    + loose anamorphic
[14:33:05]      + storage dimensions: 720 * 356, mod 2
[14:33:05]      + pixel aspect ratio: 32 / 27
[14:33:05]      + display dimensions: 853 * 356
[14:33:05]    + encoder: H.264 (libx264)
[14:33:05]      + preset:  veryfast
[14:33:05]      + profile: main
[14:33:05]      + level:   4.0
[14:33:05]      + quality: 20.00 (RF)
[14:33:05]  * audio track 1
[14:33:05]    + decoder: English (AC3) (2.0 ch) (Dolby Surround) (track 1, id 0x1)
[14:33:05]      + bitrate: 192 kbps, samplerate: 48000 Hz
[14:33:05]    + mixdown: Dolby Surround
[14:33:05]    + encoder: AAC (libavcodec)
[14:33:05]      + bitrate: 160 kbps, samplerate: 48000 Hz
[14:33:05] reader: first SCR -2970 id 0x0 DTS -2970
[14:33:05] encx264: min-keyint: 30, keyint: 300
[14:33:05] encx264: encoding at constant RF 20.000000
[14:33:05] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x264 [info]: profile Main, level 4.0
[14:33:06] 2.068000s: Film -> Video
[14:33:14] mpeg2video: "Chapter 2" (2) at frame 1578 time 4717710
[14:33:14] 52.418999s: Video -> Film
[14:33:14] 54.453999s: Film -> Video
[14:33:27] 145.544998s: Video -> Film
[14:33:27] mpeg2video: "Chapter 3" (3) at frame 4372 time 13108050
[14:33:27] 147.580002s: Film -> Video
[14:33:37] mpeg2video: "Chapter 4" (4) at frame 6447 time 19339290
[14:33:37] 214.880997s: Video -> Film
[14:33:37] 216.916000s: Film -> Video
[14:33:46] reader: done. 1 scr changes
[14:33:47] work: average encoding speed for job is 212.661530 fps
[14:33:47] sync: got 8750 frames, 8749 expected
[14:33:47] render: lost time: 0 (0 frames)
[14:33:47] render: gained time: 0 (0 frames) (0 not accounted for)
[14:33:47] mpeg2video-decoder done: 8750 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:184   Avg QP:18.36  size: 13556
x264 [info]: frame P:3990  Avg QP:21.15  size:  5247
x264 [info]: frame B:4576  Avg QP:23.29  size:  1060
x264 [info]: consecutive B-frames: 23.4% 15.7% 15.0% 45.9%
x264 [info]: mb I  I16..4: 58.2%  0.0% 41.8%
x264 [info]: mb P  I16..4: 20.9%  0.0%  3.4%  P16..4: 30.7% 13.3%  7.1%  0.0%  0.0%    skip:24.6%
x264 [info]: mb B  I16..4:  0.7%  0.0%  0.1%  B16..8: 10.8%  3.3%  0.4%  direct: 6.2%  skip:78.5%  L0:27.7% L1:45.9% BI:26.3%
x264 [info]: coded y,uvDC,uvAC intra: 32.6% 37.8% 10.6% inter: 12.9% 9.0% 0.3%
x264 [info]: i16 v,h,dc,p: 32% 38% 18% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 46% 16%  3%  3%  3%  3%  3%  3%
x264 [info]: i8c dc,h,v,p: 55% 24% 18%  3%
x264 [info]: Weighted P-Frames: Y:5.2% UV:2.0%
x264 [info]: kb/s:774.91
[14:33:47] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[14:33:47] mux: track 0, 8750 frames, 28279709 bytes, 774.90 kbps, fifo 4096
[14:33:47] mux: track 1, 13685 frames, 5582196 bytes, 152.96 kbps, fifo 8192
[14:33:47] libhb: work result = 0
So, does anyone have a suggestion as to what to try to resolve this? I understand my symptom is indicating Plex software on a NAS and not Handbrake which seems to br producing valid MP4 files that a more powerful computer can handle. But that Plex software is not seeing the Web Optimized setting in files produced by Handbrake. Even if that is not my problem, why is the setting not being enabled in MP4 files produced by Handbrake?

Thanks

Re: MP4 Files Not Served Up

Posted: Mon Sep 22, 2014 3:51 am
by TedJ
It's entirely possible that the issue is neither your NAS nor HandBrake, but rather the television you're serving to. Many televisions, while supporting MP4, do not like variable frame rate (VFR) encodes... I would try setting constant frame rate and see if that helps.

Re: MP4 Files Not Served Up

Posted: Mon Sep 22, 2014 4:27 pm
by wagb278
Thanks TedJ,

I passed a short MKV file through Handbrake again configured with constant frame rate and the TV liked it. I will experiment with longer files with the hope this resolves my more pressing issue.

Accessing other videos from the NAS in a Web Browser from computers on the LAN, including the test short with constant frame rate still fail with Plex server on the NAS stating the server cannot transcode. I am guessing the Web browser is telling the Plex server something which means the server needs to transcode the MP4 which the server is not capable of due to its lack of horsepower. I have tried only two browsers (Firefox and Chromium) getting the same results from both. Are there any settings in the Firefox browser that control what MP4 files will be accepted?

Thanks again, this is a major step in the right direction.