PDA

View Full Version : VLC iPad transcoding & AC3 audio



dafunk60
07-13-2015, 09:59 AM
Hello,

I have a new housemate with some iOS devices with whom I am trying to share my library. It looks like AC3 & DTS audio codecs have been removed from VLC for iOS recently due to licensing issues. I've tried creating a custom device profile based upon the VLC iPad profile, deleting the <format id="ac3"></format> tags within the various avcontainer > audio tags but the video content is not being transcoded. Transcoding is enabled for the device & in the global Transcoding Settings". Can someone point me in the right direction to get videos transcoding without AC3 & DTS audio?

Thanks

Paul
07-13-2015, 10:50 AM
Make sure you restart your Mezzmo server after making changes to device profiles. This will force Mezzmo server to re-load the device profiles so your changes take effect.

If still no success, then right-click on a video that is not transcoding (when you think it should) and click 'Get FFmpeg Information'. Post that information here and we'll advise the changes required to your device profile.

dafunk60
07-13-2015, 11:12 AM
Thanks for the info. I ended up starting from scratch with the VLC iPad profile & making my changes again. I must have removed something by mistake. Transcoding is now working as expected (still need a faster pc!) with one exception, HDHomeRun Prime streams. I can see the video but VLC for iOS provides a warning that the a52 (AC3) codec is not supported. Of course, the audio is not heard.

Is transcoding of streams from network media supported? In the event this should work, the ffmpeg info is below.

ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 16:23:51 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-static --disable-shared --enable-zlib --disable-postproc --prefix=/home/peter/ffmpeg/build/gpl64 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect --extra-cflags=-I/home/peter/cc32/include --extra-ldflags=-L/home/peter/cc64/lib --pkg-config=pkg-config --disable-w32threads --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
[http @ 0000000001eaf240] HTTP error 406 Not Acceptable
http://10.0.0.248:5004/auto/v802?dlna: Input/output error

<MEZZMO>: Child process ended with code: 109, ExitCode=1


---> DB Level Info: 0, -99
---> Frame rate:
---> Aspect ratio:
---> Duration: -

Thanks

Paul
07-13-2015, 11:29 AM
Glad you got the VLC iPad device profile working now.

For the network media streams, right-click on one of them in Mezzmo and click Properties. On the Properties dialog, go to the Video tab. Does the information (video codec, audio codec, etc.) appear to be correct? The FFmpeg information is not correct that you posted, so that may explain why your network media streams are not being transcoded. Let us know and we'll provide some more guidance.

dafunk60
07-13-2015, 11:47 AM
It does not appear to be correct.

835

I believe the HDHomeRun Prime DLNA source is providing MPEG2 1920x1080 with AC3 6CH 384kbs audio.

dafunk60
07-13-2015, 12:19 PM
If I open the url for the stream from VLC on a Win 7 x64 PC this is file info.

836

Perhaps that is helpful.

Paul
07-13-2015, 12:21 PM
Thanks for the confirmation. Your HDHomeRun Prime is refusing to provide the URL stream (http://10.0.0.248:5004/auto/v802?dlna:) in the correct manner to FFmpeg, and that's the cause of the problems. A quick search of the web shows other HDHomerun owners possibly with the same problem. A few owners suggested that you will get the 406 error if you do not have the latest HDHomeRun firmware. Can you check if you have the latest firmware and then try again? (i.e. right-click on the video in Mezzmo and click 'Get FFmpeg Information' again). Let us know how you go.

dafunk60
07-13-2015, 12:31 PM
The HDHomeRun Prime firmware is 20150615, which is the most recent available. The information provided in previous posts was obtained while running this firmware. I'll do some searching on that 406 error. I am able to play the stream from a variety of PC's in both Windows Media Player & VLC, including on the PC running Mezzmo. I am also able to play the stream in VLC for Android via BubbleUPNP.

Paul
07-13-2015, 01:04 PM
OK - try this:


From the Windows Start menu, type 'cmd.exe' and press Enter to run a command window
Change directory to your Mezzmo program folder (e.g. cd c:\Program Files\Conceiva\Mezzmo)
Change directory to Mezzmo's ffmpeg sub-folder (i.e. cd ffmpeg32)
Type 'ffmpeg -loglevel trace -i <URL>' (where <URL> is one of the URLs you see in the Network Media pane for your videos from the HDHomeRun Prime)

Post that information here or email it to us at support [at] conceiva [dot] com.

dafunk60
07-13-2015, 01:34 PM
Thanks Paul,

"trace" does not appear to be a valid log level in ffmpeg.

C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg32>ffmpeg -loglevel trace http://10.0.0.249:5004/auto/v802?dlna
Invalid loglevel "trace". Possible levels are numbers or:
"quiet"
"panic"
"fatal"
"error"
"warning"
"info"
"verbose"
"debug"

Here is the output of the "debug" trace level, which appears to be the most verbose, for ffmpeg32

C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg32>ffmpeg -loglevel debug http://10.0.0.249:5004/auto/v802?dlna
ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 15:22:34 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-static --disable-shared --enable-zlib --d
ild/gpl32 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-pthreads --enable-runtime-cpudetect --extra-cflags=-I
me/peter/cc32/lib --pkg-config=pkg-config --disable-w32threads --enable-zlib --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option 'http://10.0.0.249:5004/auto/v802?dlna' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: output file http://10.0.0.249:5004/auto/v802?dlna.
Successfully parsed a group of options.
Opening an output file: http://10.0.0.249:5004/auto/v802?dlna.
[NULL @ 003dfa60] Unable to find a suitable output format for 'http://10.0.0.249:5004/auto/v802?dlna'
http://10.0.0.249:5004/auto/v802?dlna: Invalid argument


Here is the output of the "debug" trace level for ffmpeg64

C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg64>ffmpeg -loglevel debug http://10.0.0.249:5004/auto/v802?dlna
ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 16:23:51 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-static --disable-shared --enable-zli
eg/build/gpl64 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect --extra-cflags=-I/home/peter/c
/lib --pkg-config=pkg-config --disable-w32threads --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option 'http://10.0.0.249:5004/auto/v802?dlna' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: output file http://10.0.0.249:5004/auto/v802?dlna.
Successfully parsed a group of options.
Opening an output file: http://10.0.0.249:5004/auto/v802?dlna.
[NULL @ 00000000002de9a0] Unable to find a suitable output format for 'http://10.0.0.249:5004/auto/v802?dlna'
http://10.0.0.249:5004/auto/v802?dlna: Invalid argument

Paul
07-13-2015, 01:49 PM
Try adding single quotes around the URL and try running the ffmpeg command line again. Also don't forget to add the -i option. i.e. ffmpeg -loglevel debug -i 'http://10.0.0.249:5004/auto/v802?dlna'

dafunk60
07-13-2015, 02:24 PM
Sorry about that! FFmpeg didn't like the quotes around the url but that -i flag is important ;) You are likely aware of this already but the 406 error is a standard http error code indicating that the target device doesn't accept the http request headers sent. I've been playing around with the developer tools in firefox and the HDHomeRun doesn't seem too picky about the http requests. However the HDHomeRun does not appear to like the request headers sent by FFMpeg.

I can send this request from Firefox:
GET /auto/v802?dlna HTTP/1.1
Host: 10.0.0.249:5004
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive

And receive these http response headers along with a video stream
HTTP/1.1 200 OK
Server: HDHomeRun/1.0
Connection: close
Content-Type: video/mpeg
Cache-Control: no-cache
Pragma: no-cache
transferMode.dlna.org: Streaming



FFmpeg32

C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg32>ffmpeg -loglevel debug -i http://10.0.0.249:5004/auto/v802?dlna
ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 15:22:34 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-static --disable-shared --enable-zlib --
ild/gpl32 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-pthreads --enable-runtime-cpudetect --extra-cflags=-
me/peter/cc32/lib --pkg-config=pkg-config --disable-w32threads --enable-zlib --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'http://10.0.0.249:5004/auto/v802?dlna'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://10.0.0.249:5004/auto/v802?dlna.
Successfully parsed a group of options.
Opening an input file: http://10.0.0.249:5004/auto/v802?dlna.
[http @ 03ad0060] request: GET /auto/v802?dlna HTTP/1.1
User-Agent: Lavf/56.4.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1


[http @ 03ad0060] header='HTTP/1.1 406 Not Acceptable'
[http @ 03ad0060] http_code=406
[http @ 03ad0060] HTTP error 406 Not Acceptable
http://10.0.0.249:5004/auto/v802?dlna: Input/output error

FFmpeg64
C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg64>ffmpeg -loglevel debug -i http://10.0.0.249:5004/auto/v802?dlna
ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 16:23:51 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-static --disable-shared --enable-zlib --d
eg/build/gpl64 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect --extra-cflags=-I/home/peter/cc32/i
/lib --pkg-config=pkg-config --disable-w32threads --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'http://10.0.0.249:5004/auto/v802?dlna'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://10.0.0.249:5004/auto/v802?dlna.
Successfully parsed a group of options.
Opening an input file: http://10.0.0.249:5004/auto/v802?dlna.
[http @ 000000000033efa0] request: GET /auto/v802?dlna HTTP/1.1
User-Agent: Lavf/56.4.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1


[http @ 000000000033efa0] header='HTTP/1.1 406 Not Acceptable'
[http @ 000000000033efa0] http_code=406
[http @ 000000000033efa0] HTTP error 406 Not Acceptable
http://10.0.0.249:5004/auto/v802?dlna: Input/output error

dafunk60
07-13-2015, 02:42 PM
Paul,

Simply removing the ?dlna variable from the end of the url produces this output from ffmpeg64 along with a playable mpg file.

C:\Program Files (x86)\Conceiva\Mezzmo\ffmpeg64>ffmpeg -loglevel debug -i http://10.0.0.249:5004/auto/v802 test.mpg
ffmpeg version N-66094-gbb8b752 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 16:23:51 with gcc 4.8.2 (GCC)
configuration: --enable-memalign-hack --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-static --disable-shared --enable-zlib --d
eg/build/gpl64 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect --extra-cflags=-I/home/peter/cc32/i
/lib --pkg-config=pkg-config --disable-w32threads --enable-libvpx --enable-libvorbis
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'http://10.0.0.249:5004/auto/v802'.
Reading option 'test.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://10.0.0.249:5004/auto/v802.
Successfully parsed a group of options.
Opening an input file: http://10.0.0.249:5004/auto/v802.
[http @ 000000000200f000] request: GET /auto/v802 HTTP/1.1
User-Agent: Lavf/56.4.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1


[http @ 000000000200f000] header='HTTP/1.1 200 OK'
[http @ 000000000200f000] http_code=200
[http @ 000000000200f000] header='Server: HDHomeRun/1.0'
[http @ 000000000200f000] header='Connection: close'
[http @ 000000000200f000] header='Content-Type: video/mpeg'
[http @ 000000000200f000] header='Cache-Control: no-cache'
[http @ 000000000200f000] header='Pragma: no-cache'
[http @ 000000000200f000] header='transferMode.dlna.org: Streaming'
[http @ 000000000200f000] header=''
[mpegts @ 000000000200ea00] Format mpegts probed with size=2048 and score=99
[mpegts @ 000000000200ea00] stream=0 stream_type=2 pid=1177 prog_reg_desc=
[mpegts @ 000000000200ea00] stream=1 stream_type=81 pid=1178 prog_reg_desc=
[mpegts @ 000000000200ea00] stream=2 stream_type=81 pid=1179 prog_reg_desc=
[mpegts @ 000000000200ea00] Before avformat_find_stream_info() pos: 0 bytes read:9212 seeks:0
[mpegts @ 000000000200ea00] All programs have pmt, headers found
[mpeg2video @ 000000000030be40] Invalid frame dimensions 0x0.
Last message repeated 24 times
[mpegts @ 000000000200ea00] All info found
[mpegts @ 000000000200ea00] After avformat_find_stream_info() pos: 1874924 bytes read:1875300 seeks:0 frames:62
Input #0, mpegts, from 'http://10.0.0.249:5004/auto/v802':
Duration: N/A, start: 35549.582100, bitrate: 512 kb/s
Program 101
Stream #0:0[0x1177], 26, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 1001/60000, max. 18000 kb/s,

Stream #0:1[0x1178](eng), 16, 1/90000: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0x1179](spa), 20, 1/90000: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 128 kb/s
Successfully opened the file.
Parsing a group of options: output file test.mpg.
Successfully parsed a group of options.
Opening an output file: test.mpg.
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'time_base' to value '1/90000'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0000000004aa12e0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1 sws_param:flags=2
[format @ 0000000004aa22a0] compat: called with args=[yuv420p]
[format @ 0000000004aa22a0] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 0000000000399fa0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[graph 1 input from stream 0:1 @ 0000000002006980] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 0:1 @ 0000000002006980] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 0:1 @ 0000000002006980] Setting 'sample_fmt' to value 'fltp'
[graph 1 input from stream 0:1 @ 0000000002006980] Setting 'channel_layout' to value '0x60f'
[graph 1 input from stream 0:1 @ 0000000002006980] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[audio format for output stream 0:1 @ 0000000002006b00] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 0000000002006b00] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000'
[audio format for output stream 0:1 @ 0000000002006b00] Setting 'channel_layouts' to value '0x4|0x3'
[audio format for output stream 0:1 @ 0000000002006b00] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'a
[AVFilterGraph @ 000000000039a420] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
0.414214 0.000000 0.292893 0.000000 0.292893 0.000000
0.000000 0.414214 0.292893 0.000000 0.000000 0.292893
[auto-inserted resampler 0 @ 0000000002006bc0] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[mpeg1video @ 0000000000310240] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0000000004cb00a0] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'test.mpg':
Metadata:
encoder : Lavf56.4.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1001/30000, q=2-31, 200 kb/s, 29.97 fps, 90k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.1.100 mpeg1video
Stream #0:1(eng), 0, 1/90000: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc56.1.100 mp2
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg1video (native))
Stream #0:1 -> #0:1 (ac3 (native) -> mp2 (native))
Press [q] to stop, [?] for help
[mpegts @ 000000000200ea00] Correcting start time by 6533
*** 34 dup!
[mpeg @ 0000000004cb00a0] First SCR: 0 First DTS: 45000
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=233676 size=2865424.5kbits/s dup=34 drop=0
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=233676 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=235705 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=235705 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=237746 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=237746 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=239787 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=239787 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=241828 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=241828 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=243869 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=243869 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=245910 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=245910 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=247951 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=247951 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=249992 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=249992 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=252033 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=252033 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=254074 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=254074 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=256115 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=256115 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=258156 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=258156 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=260197 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=260197 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=262238 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=262238 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=264279 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=264279 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=266320 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=266320 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=268361 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=268361 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=270402 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=270402 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=272443 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=272443 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=274484 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=274484 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=276525 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=276525 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=278566 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=278566 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=280607 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=280607 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=282648 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=282648 size=286542
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=284689 size=286542
[mpeg @ 0000000004cb00a0] packet too large, ignoring buffer limits to mux it
[mpeg @ 0000000004cb00a0] buffer underflow st=0 bufi=284689 size=286542
frame= 374 fps= 33 q=31.0 Lsize= 6112kB time=00:00:12.44 bitrate=4023.0kbits/s dup=34 drop=0
video:5515kB audio:564kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.544290%
Input file #0 (http://10.0.0.249:5004/auto/v802):
Input stream #0:0 (video): 368 packets read (22407096 bytes); 341 frames decoded;
Input stream #0:1 (audio): 376 packets read (577536 bytes); 376 frames decoded (577536 samples);
Input stream #0:2 (audio): 20 packets read (10240 bytes);
Total: 764 packets (22994872 bytes) demuxed
Output file #0 (test.mpg):
Output stream #0:0 (video): 374 frames encoded; 374 packets muxed (5647655 bytes);
Output stream #0:1 (audio): 501 frames encoded (577152 samples); 501 packets muxed (577152 bytes);
Total: 875 packets (6224807 bytes) muxed
745 frames successfully decoded, 0 decoding errors
[AVIOContext @ 00000000048f7c60] Statistics: 0 seeks, 3056 writeouts
[AVIOContext @ 000000000200f380] Statistics: 23848420 bytes read, 0 seeks
Received signal 2: terminating.

Paul
07-13-2015, 02:43 PM
Thanks for the information. I think we're getting closer now. Your HDHomerun is certainly rejecting FFmpeg's HTTP GET headers for some reason. Use the following FFmpeg documentation (https://www.ffmpeg.org/ffmpeg-protocols.html#http) to tweak the FFmpeg command line so that FFmpeg's HTTP GET is accepted by your device. Hopefully you can isolate what header attribute is causing the problem. Let us know how you go.

Paul
07-13-2015, 02:55 PM
Based on your last post (where you removed ?dlna and it worked), then I want to double-check that the URLs that Mezzmo is collecting from your HDHomeRun Prime are correct (and not possibly truncated for some strange reason). We'd like a set of WireShark logs from you. I'm not sure if you are familiar with Wireshark (Ethereal as it used to be called), but it's very simple to use. Download it from http://www.wireshark.org and follow these steps:


Turn off your HDHomeRun
Exit Mezzmo (Windows) app
Run Wireshark
Go to Capture -> Interfaces
In the dialog that pops up click the Start button opposite your network card (if you have multiple, please choose the one that's connected to the device)
Turn on your HDHomeRun
Run Mezzmo (Windows) app and use the Network media pane to browse your HDHomeRun. Browse into a folder/playlist and drag/drop a video URL into Mezzmo library.
Click on Capture -> Stop in Wireshark
Click on File -> Save in Wireshark and save the file as a Wireshark/tcpdump format (default)
Zip it up and email it to us at support [at] conceiva [dot] com

dafunk60
07-13-2015, 03:53 PM
Wireshark logs have been sent via email. Thanks

Paul
07-13-2015, 04:22 PM
Thanks for the logs. They show that the URLs delivered by your HDHomeRun to Mezzmo's Network media pane are (for example) http://10.0.0.249:5004/auto/v190?dlna. So they look exactly like what Mezzmo is asking FFmpeg to get information for. So Mezzmo is collecting the URLs correctly from your HDHomeRun. This eliminates Mezzmo from being the cause of the problem, and leaves the cause being the HDHomeRun's firmware returning a HTTP 406 error when certain HTTP GET header attributes are present or when "?dlna" is present in the URL.

The FFmpeg HTTP GET looks like:

GET /auto/v802?dlna HTTP/1.1
User-Agent: Lavf/56.4.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1

I have bolded the two header attributes that are probably causing your HDHomeRun to become confused. In Firefox developer tools, please add each of these bolded header attributes to try an replicate the 406 error. Let us know how you go.

dafunk60
07-13-2015, 04:40 PM
Thanks Paul,

Making a HTTP request with Firefox to 10.0.0.249:5004/auto/v802?dlna with the response headers provided failed with a HTTP 406 status.

User-Agent: Lavf/56.4.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1


Making a HTTP request with the following headers (Range: bytes=0- removed) returns a HTTP 200 status & a playable file stream.

User-Agent: Lavf/56.4.100
Accept: */*
Connection: close
Host: 10.0.0.249:5004
Icy-MetaData: 1

Hope that helps.

Paul
07-13-2015, 05:10 PM
Thanks. It tells us that the range request attribute ("Range: bytes=0-") is the HTTP GET header attribute that your HDHomeRun's firmware rejects. There's no reason for this rejection, so I think it's a firmware bug/issue for the HDHomeRun folks to consider fixing. I suggest you jump onto their forums (https://www.silicondust.com/forum/) and post details about the problem. It will be easy for them to reproduce using ffmpeg.exe and the command line that we've been using above. Let us know if you need help and/or let us know the results.

dafunk60
07-14-2015, 04:46 AM
Thanks Paul. I'll follow up with Silicon Dust & see what they say. In the interim, is there any way I can manually add a stream address to my Mezzmo library? Or are you aware of any way to adjust the default headers sent by FFmpeg?

Paul
07-14-2015, 09:42 AM
Thanks Paul. I'll follow up with Silicon Dust & see what they say.
OK - let us know their thoughts.


In the interim, is there any way I can manually add a stream address to my Mezzmo library?
The upcoming Mezzmo v5.0 has URL streaming and you can manually add your own URLs into your Mezzmo library. However, Mezzmo still interrogates the URL stream using FFmpeg to determine it's codecs, resolution, bitrate, attributes, etc. So you will still have the same problem as you have now due to the HDHomeRun's firmware response.


Or are you aware of any way to adjust the default headers sent by FFmpeg?
You can adjust FFmpeg's HTTP headers. See this documentaion - https://www.ffmpeg.org/ffmpeg-protocols.html#http. However, Mezzmo's use of FFmpeg to interrogate audio/video files is internal within Mezzmo's application code and (at the moment) cannot be modified externally by users.

dafunk60
07-14-2015, 11:08 AM
Paul,

Silicondust support responded with the following:


DLNA requires for certification that the prime reject the request if the range tag is set as the content is not seekable (live) so to be a DLNA certified device the prime is behaving as it should

you may wish to see nicks original comment about this to the kodi crew http://trac.kodi.tv/ticket/14204

You may view the thread I created with them at https://www.silicondust.com/forum/viewtopic.php?f=47&t=21402. They seem to be of the opinion that it is Mezzmo that is not following the DLNA spec.

I guess I'm waiting for Mezzmo v5! Thanks again for your assistance.

Paul
07-14-2015, 11:29 AM
Thanks for the follow-up. We understand SiliconDust's comments as to why they reject the FFmpeg request for their DLNA certification. We think we can get around this problem. Email us at support [at] conceiva [dot] com and we'll provide a patch for you to try.

dafunk60
07-14-2015, 12:47 PM
I'll give a patch a try, email sent. Thanks!

Edit Below:
Simply dropping the ?dlna from the HDHomeRun url will allow the HDHomeRun to respond as a upnp device which is not bound to the strict dlna spec. Without the dlna variable the http request will be accepted & the stream delivered even with the ffmpeg http range header.

Paul
07-14-2015, 03:33 PM
Understand. Try the patch we sent you and let us know how it goes.

dafunk60
07-14-2015, 04:06 PM
Tested the patch, video properties can now be read but transcoding fails. Details & logs sent via email. Thanks

Paul
07-14-2015, 04:22 PM
OK - try the new patch that we just sent you & let us know how it goes.

dafunk60
07-14-2015, 05:44 PM
Using 41337, videos are now transcoding & the transcoded stream delivered to the playback device. Playback quality varies but I suspect that's mostly due to the cpu capabilities of the hardware running the Mezzmo server. There are a couple issues I noticed that I don't think are due to my hardware & config to consider for future releases.

- The Get FFmpeg Information option returns a HTTP status of 406 & fails for the HDHomeRun stream.
- The "Get Properties From File" action must be used before transcoding will be triggered. If the file properties are not retrieved prior to playback the stream is delivered to the playback device in its original format. Transcoding does not occur.
- If playback is started, then stopped, then started again, playback will resume at the start of the transcoded file created by the initial playback. Playback will continue slightly past the point where the initial playback was stopped, perhaps to when transcoding was stopped. A new transcoding session is not displayed when the second playback is started. The expected operation would be that playback is always started at the current time in the live TV stream. Deleting the transcode files allows playback to start at the current time as expected.

It's getting late here. I'll likely take some new logs tomorrow and send them your way.

Paul
07-14-2015, 06:20 PM
Glad it's mostly working now :). Thanks for noting the remaining issues. We'll fix these after we get your new set of logs.

dafunk60
07-15-2015, 12:43 PM
Hi Paul,

Additional logs have been sent via email.

Thanks

Paul
07-15-2015, 01:06 PM
Thanks, dafunk60. We'll work through them shortly and report back via email.