VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. I'm hoping some folks can assist. As with my previous post I attempted to search for answers on here but couldn't find my exact nor a comparable solution.

    I have a Pioneer AVH-4200NEX DVD Head unit that can play videos off of an SD card. According to the manual the unit can only play...

    Compatible Video Files: AVI, ASF, FLV, F4V, MP4, MKV, MOV, WMV, VOB, 3GP
    Max Resolution: 720 x 480
    Max Frame Rate: 30 fps
    Max File Size: 4GB

    Using Handbrake (suggested by folks on another thread) I have encoded a few movies, but when played on the deck the aspect ratio is off. What "appears" to happen is no matter what aspect ratio or resolution is used the deck squashes the image to 4:3, then stretches it again to fit the width of the screen. There are three option for screen adjustments, source (4:3), zoom (zoomed vertical and horizontal to fit the screen) and Full (stretch horizontally to fit screen).

    I know details are usually asked for so here is what I have if I understand the important information correctly.

    The display is 800x600 "Motorized 6.95" Clear Resistive LCD Touchscreen: The Pioneer AVH-4200NEX features a 6.95" clear resistive LCD touchscreen with a display resolution of 800 x 480 (RGB), for a total of 1,152,000 pixels."

    Original video size: 1920x808 MKV, 23 frames/second according to the details.
    Output width target is 720.
    I've attempted many different setting including:
    -I've used the 480p preset in Handbrake,
    -selected "none" under Anamorphic,
    -selected "loose" and left it as 720
    -selected "loose" and adjust width to 800
    -selected "none" and "kept aspect ratio"
    -selected "none" and custom cropping of 0 on all 4 sides

    I figured I need to hard code the black bars into the video and then just zoom on the deck to fill the screen, but no matter what I try handbrake removes the black bars and the deck squashes to 4:3.

    Do I need to find a way stretch my output on the vertical so when it gets squashed its returns it to the proper "feel." I'm a bit at a loss and hope I've provided enough information.

    NOTE: There are no settings in the deck to adjust from 4:3 to 16:9. There is for DVDs but not sure the SD card videos. There is not adjustments I can make in the setting of the deck/head unit.

    This is the link to the head unit on crutchfield if anyone is interested. https://www.crutchfield.com/p_1304200NEX/Pioneer-AVH-4200NEX.html?tp=20217&awcp=1t1&aw...g&awug=9001828


    Any help would be appreciated. Thanks.
    Quote Quote  
  2. Seems this info is requested often. This data is for the version I set custom crop to 0. I'm sure I'm doing something wrong I just have no idea what it might be. Thanks.

    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42 (isom/iso2/avc1/mp41)
    File size : 730 MiB
    Duration : 2 h 27 min
    Overall bit rate mode : Variable
    Overall bit rate : 691 kb/s
    Encoded date : UTC 2017-03-12 23:06:14
    Tagged date : UTC 2017-03-12 23:06:14
    Writing application : HandBrake 1.0.3 2017022500

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 2 h 27 min
    Bit rate : 524 kb/s
    Width : 720 pixels
    Height : 304 pixels
    Display aspect ratio : 2.35:1
    Frame rate mode : Variable
    Frame rate : 23.976 (24000/1001) FPS
    Minimum frame rate : 23.974 FPS
    Maximum frame rate : 23.981 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.100
    Stream size : 553 MiB (76%)
    Writing library : x264 core 148 r2708 86b7198
    Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=9 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=14000 / vbv_bufsize=14000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Encoded date : UTC 2017-03-12 23:06:14
    Tagged date : UTC 2017-03-12 23:06:14
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709
    Menus : 3

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 2 h 27 min
    Bit rate mode : Variable
    Bit rate : 160 kb/s
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 kHz
    Frame rate : 46.875 FPS (1024 spf)
    Compression mode : Lossy
    Stream size : 169 MiB (23%)
    Title : Stereo / Stereo
    Language : English
    Default : Yes
    Alternate group : 1
    Encoded date : UTC 2017-03-12 23:06:14
    Tagged date : UTC 2017-03-12 23:06:14
    Menus : 3

    Menu
    ID : 3
    Codec ID : text
    Duration : 2 h 27 min
    Language : English
    Encoded date : UTC 2017-03-12 23:06:14
    Tagged date : UTC 2017-03-12 23:06:14
    Bit rate mode : CBR
    Menu For : 1,2
    00:00:00.000 : 00:00:00.000
    00:09:02.000 : 00:09:01.958
    00:13:04.993 : 00:13:04.993
    00:21:03.345 : 00:21:03.345
    00:27:53.380 : 00:27:53.380
    00:31:57.290 : 00:31:57.290
    00:35:08.398 : 00:35:08.398
    00:42:58.451 : 00:42:58.451
    00:52:04.622 : 00:52:04.621
    01:05:39.185 : 01:05:39.102
    01:16:41.639 : 01:16:41.639
    01:22:28.777 : 01:22:28.777
    01:29:29.489 : 01:29:29.489
    01:34:09.769 : 01:34:09.769
    01:45:38.582 : 01:45:38.582
    01:55:54.448 : 01:55:54.322
    02:02:35.056 : 02:02:35.056
    02:12:14.260 : 02:12:14.176
    02:18:29.468 : 02:18:29.384
    Quote Quote  
  3. If the head unit is retarded and assumes everything must be 4:3 or 16:9 and needs to fill the screen accordingly, you'll have to encode it as 4:3 or 16:9, but unfortunately there's no way to add black bars with Handbrake. You'd need to use Avisynth for that. I assume your 1920x808 source has no black bars or it'd be 1920x1080 (16:9), so Handbrake isn't removing them as such.

    Other than adding black bars yourself, the only other way to output 16:9 would be to crop picture from the width until what's left is 16:9. Don't be scared. I do it quite a bit.

    808 * 16 / 9 = 1436 (rounded).
    (1920 - 1436) / 2 = 242

    So you need to crop 242 pixels from each side and resize to a 16:9 square pixel resolution (Anamorphic None) with a width of 720 or less.
    720x404, 704x396, 640x360....

    Cropping 242 pixels from each side is something I'd probably do for a portable device anyway, to fill as much of the small screen as possible. It sometimes offends the "not as the directed intended" purists, but about the only time I remember I've cropped picture is if there's opening credits close enough to the left or right side to be cut off a bit. I'm fairly certain watching a movie on a small screen in a car wouldn't be what the director intended anyway.

    Without cropping, HandBrake's "Anamorphic None" should output something around 720x304 for your 1920x808 source if the "keep aspect ratio" option is checked. As a general rule, for a video such as that, which isn't 16:9, the player will simply add black bars on playback. The same applies regardless of the video or display's aspect ratio. The player should add black bars as required to make up the difference between the video's aspect ratio and the display's aspect ratio. If none of your player's stretch options do that you'll have to crop from the sides so the video you're encoding can be resized to a 16:9 resolution such as 704x396 without distorting it, rather than encode it without cropping at 720x304 which is around 2.35:1.

    Aside from cropping the width for 16:9 the only other option is to add black bars top and bottom, but that'd be another story.....

    None of the other Anamorphic options will help. They're really intended for encoding non square pixel sources such as DVDs where the resolution and display aspect ratios are different. (720x480 16:9 NTSC DVD displaying as 854x480 etc). The other anamorphic options encode the source in the same manner, whereas "Anamorphic None" resizes to square pixel dimensions and the output resolution and display aspect ratio will be the same (keep aspect ratio checked), but if the player expects everything to be 16:9 you'll have to crop the source so you're only encoding 16:9 worth of picture no matter which anamorphic method you use.

    Hopefully that makes sense.
    Last edited by hello_hello; 12th Mar 2017 at 22:10.
    Quote Quote  
  4. hello_hello: Everything you said either makes perfect sense or will after I look up some of the terms and ideas (square vs non-square pixels and DVD source different from display) but that is my problem and good place to start to expand my knowledge. I really appreciate your time on the detailed and helpful response.

    I used to be the purist you mentioned regarding aspect ration but I'm over it now that I read your message. It makes a load more sense to optimize for display size then to hold onto a few bits of area on the fringe of the picture.

    ...I sat back and thought for a bit, that since the display is as you stated, insufficiently smart, I believe I may actually have to do a combination of cropping and adding black bars. So either way I will look into adding Avisynth to my toolbox and check out the threads and topics on that program.

    Thanks you very much for your help. Cheers.
    Last edited by dellhop; 13th Mar 2017 at 06:39.
    Quote Quote  
  5. Okay I thought about it for more then 2 seconds. If I crop from each side 242 pixels as suggested the resulting picture when stretched should look correct, no black bars needed. Going to test it out now. Thanks again.
    Quote Quote  
  6. I was just mentioning "square pixels" as regardless of the source, "anamorphic none" resizes so the output resolution and display aspect ratio are the same. ie if you resize to 1280x720, the resolution and aspect ratio are both 16:9, therefore the pixels are generally referred to as being "square".

    Some sources are anamorphic or have non-square pixels. When the height and width of the pixels are different the resolution and display aspect ratio are different. ie a 16:9 NTSC DVD is 720x480 but the display aspect ratio is about 854x480 (16:9). Therefore the pixels are wider than they are tall.... anamorphic. The other Handbrake anamorphic methods retain the shape of the original pixels (as much as possible) so I mentioned "square pixels" a few times to distinguish "anamorphic none" from the other anamorphic choices.

    Normally for non-anamorphic sources (pretty much all HD) you'd keep the pixels square and resize with "anamorphic none".
    When resizing anamorphic sources you can either use an anamorphic option or "anamorphic none' with "keep aspect ratio" checked and resize to square pixels.

    The upshot of it all is, if you use "anamorphic none" you need to make sure the width and height give you 16:9 when "keep aspect ratio" is checked, and if the latest Handbrake is like the older version I have, after you adjust the cropping you need to uncheck and re-check "keep aspect ratio" for Handbrake to update the resizing, and keep adjusting the cropping and checking/unchecking until you have 16:9, unless you've worked out the correct cropping and resizing yourself before hand.
    If you use an anamorphic option, you need to crop until the "display size" calculated by Handbrake is 16:9, even if the resolution/resizing isn't 16:9.

    To complete the anamorphic/non-anamorphic explanation....
    When you resize to square pixels almost every player on the planet, with the possible exception of yours, will display the encode correctly, adding black bars as required. If you use anamorphic encoding, the player needs to be capable of reading the aspect ratio information and resizing it on playback correctly, just as it'd resize a 720x480 to 16:9. Not all players will do this for MKVs or MP4s though and assume the video contains square pixels, so it'll display with the wrong aspect ratio. The media players in the TVs here are like that, so I just resize everything to square pixels and be done with it.

    A couple of links for you. I created an AVIsynth function for automatic cropping and resizing recently. If you decide to try Avisynth at some stage (or an Avisynth based GUI such as MeGUI) you might want to try it. Avisynth will be more of a learning curve than Handbrake, which aside from your particular problem is designed to re-encode a video correctly without too much knowledge. I'm currently working on a version of the script that'll automatically add black borders instead of cropping the picture, if I can ever get my head around it so it works correctly. https://forum.videohelp.com/threads/382601-CropResize-Script

    I'm not sure how much info the latest Handbrake displays when it comes to cropping and resizing. You might want to play with Yoda's Resize Calculator. You could use it to work out the required cropping and resizing beforehand and add them to Handbrake manually, if it's easier..
    Quote Quote  
  7. Thank you hello_hello again for such a clear and comprehensive explanation. I'm feeling more dangerous now with what I need to do Also thank you the links and options for going forward.

    You are absolutely correct regarding my players. This thing is absolutely ridiculous. The details say it present in 800x600, which is an aspect ratio of 1.5. But when you measure the screen itself it is 6.125" x 3.125" which is a 1.96 ratio. I'm now trying to figure out what the heck it is exactly doing. I was wondering if there was a video clip available on here somewhere that has a method to help determine aspect ration and/or resolution/screen size of a display. Something that is just a plain square or circle that you can encode/crop/adjust and then tell if the display is messing with it in some fashion and determine how.....Although I'm guessing not since I seem to be the only one having the problem.

    I am of course not ruling out ignorance as being my problem. I'll keep measuring, adjusting and encoding until I figure it out.

    The rub is I have the head unit outputting to headrest screens which are a different aspect ratio (straight 16:9) then what ever the silly head unit is.

    Off to test some more. Thanks again.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!