PDA

View Full Version : Default transcoding video format?



Misiak
09-19-2013, 09:46 AM
Hi Paul,

as you may know, I have Samsung F8000 serie TV. By default videos are transcoded into following format: matroska h264(30fps) ac3. However, for some of my videos transcoding is very slow - appx. 10fps so this cannot be used for on-the-fly transcoding. Where and how is possible to change default transcoding format and it's framerate ? For me mpeg2video would be fine instead of h264.

Thx in advance, Michal

Paul
09-19-2013, 05:18 PM
Hi Michal,

Please post the FFmpeg information for a few of the files that transcode on-the-fly slowly.

Paul
09-19-2013, 05:49 PM
Also, you can see if the files will stream natively to your Samsung F8000 by turning off transcoding for your device (go to the Media Devices dialog and edit your device. On the Device Settings dialog, go to the Transcoding tab and turn off transcoding). When transcoding is turned off, Mezzmo server will deliver your files natively without any transcoding. After testing this, let us know what streams natively and we can tweak the device profile. Remember to turn transcoding back on again.

Misiak
09-20-2013, 03:37 AM
Hi Michal,

Please post the FFmpeg information for a few of the files that transcode on-the-fly slowly.

Hi Paul, for example this. It is full 1080p video from my camera with 50fps. TV is able to play only up to 30fps. Therefore transcoding is required, however, transcoding into h264 is really slow - only 10fps on average (i3@4.6GHz). Would be great if I could define desired encoding format and framerate, because encoding into mpeg2 is much faster - appx. 30fps.

Here's ffpmpeg info:

ffmpeg version N-50460-g393dcbf Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 27 2013 17:20:20 with gcc 4.6.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/cc64/include --extra-ldflags=-L/home/peter/cc64/lib --pkg-config=pkg-config --disable-w32threads --enable-zlib
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.102 / 54. 63.102
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 41.100 / 3. 41.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Input #0, mpegts, from 'E:\00016.mts':
Duration: 00:00:14.42, start: 0.801678, bitrate: 25700 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
At least one output file must be specified

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


---> DB Level Info: 42, 100
---> Frame rate: 50,00
---> Aspect ratio: 16:9 PAR=1:1

p.s. you have already implemented my updated profile so native streaming works perfect now ;) The only problem is that encoding some sources with h264 is very slow... Therefore my question...

Btw, with your last change regarding thumbnail, the aspect ration is correct now, but there are ugly black stripes which I personally don't like. Previous implementation with stretched thumbnails was better imho :) It's a matter of personal taste but maybe you could introduce some switch in Mezzmo UI to enable/disable stretching.

Thanks, Michal

Paul
09-20-2013, 09:01 AM
Hi Michal,

The reason for the slow transcoding is the video bitrate is very high for your camera videos (>25Mbps). You can try reducing the encoding bitrate and it may speed up transcoding. I'll email you a tweaked device profile to try.

Regarding thumbnail artwork, I think the majority of people want their artwork displayed non-stretched with the correct aspect ratio. If you really want stretched thumbnails, then you can turn off the padding="1" setting in the device profile, like this:


<avcontainer id="jpeg" name="jpeg_sm" mimetype="image/jpeg" encode="1" baseline="1" dlnaprofile="JPEG_SM" supportschunked="0" padded="1" preferredthumbnail="1">
...

<avcontainer id="jpeg" name="jpeg_tn" mimetype="image/jpeg" encode="1" baseline="1" dlnaprofile="JPEG_TN" supportschunked="0" padded="0" preferredthumbnail="1">
...

You will need to restart your Mezzmo server and delete your transcoded files after changing this setting.

Misiak
09-20-2013, 09:20 AM
Hi Michal,

The reason for the slow transcoding is the video bitrate is very high for your camera videos (>25Mbps). You can try reducing the encoding bitrate and it may speed up transcoding. I'll email you a tweaked device profile to try.

Regarding thumbnail artwork, I think the majority of people want their artwork displayed non-stretched with the correct aspect ratio. If you really want stretched thumbnails, then you can turn off the padding="1" setting in the device profile, like this:


<avcontainer id="jpeg" name="jpeg_sm" mimetype="image/jpeg" encode="1" baseline="1" dlnaprofile="JPEG_SM" supportschunked="0" padded="1" preferredthumbnail="1">
...

<avcontainer id="jpeg" name="jpeg_tn" mimetype="image/jpeg" encode="1" baseline="1" dlnaprofile="JPEG_TN" supportschunked="0" padded="0" preferredthumbnail="1">
...

You will need to restart your Mezzmo server and delete your transcoded files after changing this setting.

Hi Paul, thanks, you know, there is one problem with thumbnails and F series. Now it is not stretched in video folders, but it is stretched in last watched media list. And for me it is better to not have it stretched in this list, because it is one of the big 3 pages of SmartHub and doesn't look very good if stretched here. But I did exactly as you suggested, turned the padding off.

For that encoding problem. You right bitrate is pretty high, but mpeg2 encoding is much faster so why not to transcode into this format? And also in this case I would need only to reduce framerate as bitrate is acceptable for the device so I don't know if really re-encoding is necessary in this case. Anyway, it is possible to change default encoding format in config file or not?

In any case waiting for your tweak to test. I've also emailed you an updated F profile supporting native streaming of mjpeg videos ;)

Best, Michal

Paul
09-20-2013, 09:31 AM
Thanks for the further information.

Can you take a smartphone photo of the last watched list and the video folders list (with padding turned on and turned off)? I'd like to see the difference. Email the photos to us at support [at] conceiva [dot] com. We may be able to improve it.

The MPEG-2 format can be problematic with Samsung TVs since we've found that FF/REW/Time Search is disabled for MPEG-2 files in the TV's firmware. I'll send you a device profile with MPEG-2 encoding turned on for default transcoding and you can confirm this for us for the newer Samsung F-series TVs.

Misiak
09-21-2013, 09:13 AM
Thanks for the further information.

Can you take a smartphone photo of the last watched list and the video folders list (with padding turned on and turned off)? I'd like to see the difference. Email the photos to us at support [at] conceiva [dot] com. We may be able to improve it.

The MPEG-2 format can be problematic with Samsung TVs since we've found that FF/REW/Time Search is disabled for MPEG-2 files in the TV's firmware. I'll send you a device profile with MPEG-2 encoding turned on for default transcoding and you can confirm this for us for the newer Samsung F-series TVs.

Hi Paul, in attachment you can see how it looks like with padding on and off. I like the non-padded version in last watched list more.

For encoding, I've found that using h264 with superfast profile can do a perfect job. My transcoding speed jumped from 8fps to 42fps which is superb for on-the-fly transcoding. I've sent you email with more details.

Best, Michal

574575576577

Paul
09-21-2013, 10:29 AM
Thanks for the photos, Michal. I understand better now. Glad the device profile works :)

Misiak
09-21-2013, 06:12 PM
Thanks for the photos, Michal. I understand better now. Glad the device profile works :)

Sorry I did not say that profile works, that mpeg is faster but it misses rewind functionality. So it is not good to use it. I've tried manual transcoding outside mezzmo (ffmpeg) with superfast profile and this work fast, but I don't know how to tell mezzmo to use such profile... Please see more details in email I've sent you...

Best, Michal

Peter
09-23-2013, 10:15 AM
Hi Michal,
we got your email, I have sent you instructions for editing the FFmpegAdditional.xml file in order to add your extra parameter to the transcoding.