MP4 encoding for Samsung TV

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

MP4 encoding for Samsung TV

Post by marcjero »

Hi all,

I'm trying to convert some DVD I have to MP4/H264 movies that I can play on my TV. The Samsung TV is supporting video playback (wiselink pro feature) using an USB stick or DLNA protocol.

So far I had some success. I found that the Optimize for web option is mandatory because DLNA is using HTTP streaming. I also noticed a very strange problem as the output video frame rate was 13 fps instead of 25fps. So I had to set the video framerate manually to fix that. (input source is 16:9 720x576 25 fps PAL DVD)

I used the HP film and animation pressets. I disabled the "detelecined" option that seems to work with NTSC sources only. I also had to rescale the movie frames to 1024x576 (using -l 576 option) because Samsung player doesn't support anamorphic video so I had to use the CLI interface.

The result is excellent now. I just wonder if my pressets (HP) are really optimized for DVD sources. I would like to know if I can reduce the bitrates for DVD sources ?

Forgot to mention I use handbrake CLI 0.9.3 on Debian Squeeze.

Thanks for input and advices.

Jerome
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: MP4 encoding for Samsung TV

Post by nightstrm »

Moved to Devices.
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

Hi,

thank you for moving in the right section.

I did few changes to my encoding settings. First I applied the latest High Profile presets submitted for the next version of HB. I set the quality flag to 0.59 (instead of 20.0) but I'm not sure to be ok there. I also set the --maxWidth parameter to 1024 (--height was already set to 576). This is useful when I rip widescreen DVD because this forces HB to stay pretty close to the original frame height after cropping. For instance I can get 1024x432 frames for some widescreen movies when the original height after cropping is 438.

Isn't it just possible to ask to HB to keep the original frame height or to change the default resize policy (default is use 720 width and scale height to keep aspect ratio) ?

Thanks in advance for advices.

Jerome
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: MP4 encoding for Samsung TV

Post by jbrjake »

You're not using anamorphic because...?
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

Because Samsung TV just ignores the anamorphic ratio... Interesting to know that before buying.

I ended using constant 1024x576 frames. I'm loosing some storage space but not so much. A 2h long DVD movie (MP4/H264/AC3) weights about 2GB with quality set to 0.59. Resulting quality is good enough for me. Good point is H264/AC3 is working fine on Samsung TV :D
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: MP4 encoding for Samsung TV

Post by jbrjake »

Okay, well I guess that's reason #2 to start supporting greater-than-source resolutions in the GUIs.

For the CLI, just use --width 1024 for widescreen anamorphic sources. Don't set a height or max anything.
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

Why not just set the height to 576 ? Doing this Handbrake will set width to 1024 for 16:9 and 768 for 4:3 right ? Is it something I'm missing ?
Yes the limitation of the GUI was close to make me going to another encoding software until I read that I was able to increase resolution using CLI.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: MP4 encoding for Samsung TV

Post by jbrjake »

marcjero wrote:Why not just set the height to 576 ? Doing this Handbrake will set width to 1024 for 16:9 and 768 for 4:3 right ?
....because not all widescreen movies are 16x9?
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

No I found at least an old DVD with widescreen encoded in 4:3 format... But I won't encode this one I will look for a better source. I have some 4:3 DVD (old animations for my daughter or music shows) that I have to convert also. Using 576 as height works for them.

Argh I discovered today that Samsung player doesn't work with stereo AC3. (TV reboots, you know this a computer with en embedded Linux system)
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: MP4 encoding for Samsung TV

Post by TedJ »

I don't think you understood jbrjake's comment... forcing 576 height is a bad idea because while both 4:3 and 16:9 (PAL) frames are 576 pixels in height, this includes any additional matting or letterboxing. For example, a 2.35:1 feature on a 16:9 frame would have a height (after cropping) of ~436 pixels - expanding this to 576 pixels would severely distort the aspect ratio.

That aside, it would break any NTSC sources you have. :)
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

Well I disabled cropping for now and I don't have any NTSC DVD sorry :D

If I could submit a feature enhancement it could be to offer greater than source scaling after cropping. Actually the default is about 720x400 for 16:9 movies and this makes me loose more than 100 lines of definition. Default could be something like 1024x576 and after cropping (for widescreen movies) the result could be about 1024x400 without quality loose.

Maybe this is already possible today using CLI ?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: MP4 encoding for Samsung TV

Post by TedJ »

Hard scaling is certainly possible using the current CLI.
pmhstar
Posts: 2
Joined: Fri Jun 19, 2009 9:23 pm

Re: MP4 encoding for Samsung TV

Post by pmhstar »

I am also trying to rip DVDs in order to play on Samsung LCD TV under Wiselink Pro via a flashdrive. Also trying to stay as close to the AppleTV preset as possible. I cannot get TV to accept full movie rip but it will play rips of short trailers/features and mp4 file with roughly half of the movie.

I have been successful with trailers and special features on DVD but not with full length movie. With full length movie TV (wiselink pro) scans flashdrive and then states - Unsupported Codec. Trials have been with movie - The Duchess. Most recently I have ripped first part of movie (~58 minutes) and successfully played on TV. Also able to rip remainder of movie (~51 minutes) and successfully play on TV. But when entire movie (1:49) ripped with same settings I get the unsupported message on TV.

Samsung will not accept m4v and I have played with other suggestions here and elsewhere (AVForum) on settings.

I have used the standard Apple TV preset (we hope to purchase Apple TV for another location) modified as follows:

Large File - uncheck
Web Optimized - checked

Audio - Track 1 only - English (AC3) - AAC - stereo

Create Chapter markers - uncheck

FYI - unlike reported by others, in my earlier trials with short trailers/features files I could get TV to playback mp4 files with and without anamorphic and with and without Web Optimized checked.

Any suggestions or insight on getting full length movie to play are appreciated.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: MP4 encoding for Samsung TV

Post by rhester »

How large (filesize-wise) are the full movies? You may be crossing the 4GB threshold.

Rodney
pmhstar
Posts: 2
Joined: Fri Jun 19, 2009 9:23 pm

Re: MP4 encoding for Samsung TV

Post by pmhstar »

Re: 4 GB limit - at the 59% quality Apple TV setting the full movie is about 666MB and the half movie files are in the 300 - 350 MB range. So this is not the reason that the full movie will not load under wiselink pro on the Samsung TV. FYI - the full movie plays on my MacBook under QuickTime.

Any other thoughts or suggestions from anyone - particularly those with Wiselink experience?
marcjero
Posts: 7
Joined: Thu Jun 04, 2009 9:10 am

Re: MP4 encoding for Samsung TV

Post by marcjero »

First check if you have the Samsung latest firmware.

Try to rename m4v to mp4. My A856 accepts MP4 with AC3 soundtracks using DLNA server. i'm using cli to do that, I can provide you my command line options if needed.

But I never tried to use the USB storage ... Is it possible for you to try a DLNA server ?
JKJudgeX
Posts: 1
Joined: Wed Dec 09, 2009 5:51 am

Re: MP4 encoding for Samsung TV

Post by JKJudgeX »

I have the same setup, and I have named my files .mp4.

I have tested a couple of my DVDs as H264's, encoded via handbrake, and here are the results:

Star Trek - Perfect, shining example of how handbrake should work. I selected high profile. I gave it a name. I clicked go, and I got a 1.5 gigabyte mp4 that works flawlessly on my Samsung TV and fills up the whole screen, in just about as near to DVD quality as I could imagine.

The Ring - Not so good, same settings as Star Trek, but, ended up with black bars on the sides of the screen. The quality is good, but, it just doesn't want to fill up the whole 16:9 surface, not even close.

Cloverfield - Same as the Ring. These are both 1.85:1 movies, so I'm not really sure what the difference is between these and Star Trek, nor am I well versed in the usage of handbrake enough to really get them to convert correctly.

Is there a foolproof way to go from DVD -> 16:9 widescreen without losing a bunch of video?

I am currently trying to convert Cloverfield again, by manually setting the display width to 1024 in handbrake, and I'm not yet comfortable with the CLI stuff. Has anyone had similar problems and could help me out? All my DivX and XVID movies seem to understand pretty well that it's a 16:9 surface...

Thanks in advance.
Deleted User 11865

Re: MP4 encoding for Samsung TV

Post by Deleted User 11865 »

1.85:1 movies are very close to 16:9 aspect ratio and should fill a properly configured 16:9 TV.
2.35:1 or 2.40:1 movies, on the other hand, are wider than 16:9 and therefore should fill a 16:9 TV's width, but display with letterboxing at the top and bottom. Either way, you should not see any pillarboxing on the sides with either format; only fullscreen 1.33:1 footage should be pillarboxed on a 16:9 TV.

So on a 16:9 TV, Star Trek should be letterboxed whereas The Ring and Cloverfield should fill the screen (more or less). From your description, it sounds like you either have one of those new wider-than-widescreen TVs, or that your TV is misconfigured somehow.

Either way, we can only guess until you provide the encode logs for your movies (see the red banner at the top of the forums).
miked
Posts: 1
Joined: Sat May 15, 2010 6:23 am

Re: MP4 encoding for Samsung TV

Post by miked »

I have played long and hard to make files for wiselink. The bes t i have come up testing is to make the width 720 with height 400. Set to loose and type in 720 as well and untick Keep aspect ratio. I also set framerate to 25 fps. and rename file extension to mp4. my handbrake always changes it to m4v... grrrr.. but just means every time i just reset it. AND, do not trust the saved default. Always check the presets before converting. STILL, some movies just will not work on my samsung, and some make it reboot after tryin to play file from stick. But these settings give me the largest degree of confidence in success. All conversions run on my pc's. VlC being my favorite player.
The 720 x 400 gives almost complete screen without the side bars on samsungLA46. Some dvd's run different framerates and resolutions, so YOU have to force to conform as shown above. I also make sure no set in captions.

hope thi shelps, good luck
mike
sleepycol
Posts: 1
Joined: Wed Jul 07, 2010 8:02 am

Re: MP4 encoding for Samsung TV

Post by sleepycol »

I found that setting anamorphic to none and selecting keep aspect ratio works for all movie aspect ratios. They play fine on the pc, portable device and my samsung TV.
craigminah
Posts: 6
Joined: Tue Dec 22, 2009 4:28 pm

Re: MP4 encoding for Samsung TV

Post by craigminah »

Could someone please post their command line or preset for us? Thanks!
seventhsamurai
Posts: 7
Joined: Fri Jul 23, 2010 3:31 am

Re: MP4 encoding for Samsung TV

Post by seventhsamurai »

clasqm
Posts: 1
Joined: Fri Jul 30, 2010 6:13 pm

Re: MP4 encoding for Samsung TV

Post by clasqm »

craigminah wrote:Could someone please post their command line or preset for us? Thanks!
After reading this and other forums, and experimenting a fair bit, I've settled on the following as an acceptable compromise:

Start with the AppleTV preset. Select H.264 video and aac audio. MP4 as the destination format. Turn anamorphic off and select "keep aspect ratio". Don't try to set width and height manually, let HB do the calculations. Toggle web-optimized ON and set Ipod 5G and Large File Support OFF (You'll see why in a minute). Save this preset as "Samsung".

When I actually get to encoding, I am prepared to allow 1024 MB per hour of video, so a hour-and-a-half movie will be limited to 1536 MB with the Target Size toggle. This is a value I have very scientifically sucked out of my thumb - a thousand hours of video on a terabyte USB HD sounds reasonable to me and my tired old eyes can't see the difference when I allow bigger filesizes. You can squeeze it a little for cartoons and allow a little extra for action movies with lots of complicated battle scenes, but try to find a figure that works for you and stick to it. So unless you routinely encode four-hour movies you won't need the Large File Support. Don't try to get fancy with extra sound tracks and subtitles. If you really must have a movie with its original Turkish soundtrack, just encode another copy. When the encode is done, change the file's .m4v extension to .mp4. This really should not make a difference, but it does.

Look, this is all very personal. Your eyes might insist on higher quality and you might care less about file size. What I will say is that everything I've had HB encode like this definitely plays on my Samsung 32" Series 5 TV. Experiment, find the sweet spot for your TV and your eyes, then stick to it, save the preset and start ripping and encoding. What will drive you nuts is having a collection in 20 different formats.

Once a movie is running, press Tools on the Samsung remote and experiment with the Mode1 and Mode2 screen settings. I leave mine in Mode 2 most of the time, but there are a few movies, mostly old 4:3 ones, that look better in Mode1.

Despite everything, a movie may still stop playing for no observable reason. When that happens just restart it and immediately once it is running hit the blue D button on the Samsung remote. It goes to the point where it crashed and plays on like nothing is wrong.
bacca246
Posts: 2
Joined: Tue Aug 03, 2010 11:09 am

Re: MP4 encoding for Samsung TV

Post by bacca246 »

Thanks alot for this Jerome, I had the issue of when encoding and then playing on my samsung 32" it would go to 4:3, with this I have successfully ripped toy story 2 and it looks fantastic. However I have come across the issue of non animated movies look quite blurry whenever there is motion in the movie. Its not even fast paced but things like just when someone is walking or the camera pans around it seems quite blurry, yet when i play the same video on my macbook its not blurry at all. Just wondering if you have ever encountered this and if you know a way around it?
Any help would be much appreciated.

Cheers, Cam
craigminah
Posts: 6
Joined: Tue Dec 22, 2009 4:28 pm

Re: MP4 encoding for Samsung TV

Post by craigminah »

craigminah wrote:Could someone please post their command line or preset for us? Thanks!
This one works:

-f mp4 -O --encoder x264 --vb 2500 --strict-anamorphic --two-pass --turbo --maxWidth 720 --aencoder faac --ab 192 --arate 48 --mixdown 6ch -x ref=3:bframes=2:subq=8:mixed-refs=0:weightb=0:8x8dct=0:trellis=2:no-fast-pskip=1:weightp=0
Post Reply