Results 1 to 8 of 8

Thread: Change display aspect ratio without changing width and height

  1. #1
    Join Date
    Oct 2013
    Posts
    3

    Default Change display aspect ratio without changing width and height

    Hello,

    We are streaming with Adobe Flash Media Live Encoder into our wowza server a PAL video with 720x756 pixels anamorphic (16:9).

    We configured the transrate.xml file like this:

    -----------------------------------
    <Encode>
    <Enable>true</Enable>
    <Name>test</Name>
    <StreamName>mp4:${SourceStreamName}_test</StreamName>
    <Video>
    <Codec>H.264</Codec>
    <Transcoder>default</Transcoder>
    <GPUID>-1</GPUID>
    <FrameSize>
    <FitMode>match-source</FitMode>
    <Width>720</Width>
    <Height>576</Height>
    <Crop>0,0,0,0</Crop>
    </FrameSize>
    <Profile>high</Profile>
    <Bitrate>1500000</Bitrate>
    <KeyFrameInterval>
    <FollowSource>true</FollowSource>
    <Interval>5</Interval>
    </KeyFrameInterval>
    <Overlays>
    </Overlays>
    <Parameters>
    </Parameters>
    </Video>
    <Audio>
    <Codec>PassThru</Codec>
    <Bitrate>${SourceAudioBitrate}</Bitrate>
    <Parameters>
    </Parameters>
    </Audio>
    <Properties>
    </Properties>
    </Encode>
    -----------------------------------

    We get an output stream from wowza media server like this:

    -----------------------------------
    General
    ID : 1 (0x1)
    Complete name : media.ts
    Format : MPEG-TS
    File size : 2.67 MiB
    Duration : 9s 960ms
    Overall bit rate mode : Variable
    Overall bit rate : 2 239 Kbps

    Video
    ID : 256 (0x100)
    Menu ID : 1 (0x1)
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : 27
    Duration : 10s 0ms
    Bit rate mode : Variable
    Maximum bit rate : 1 980 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 5:4
    Frame rate : 25.000 fps
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive

    Audio
    ID : 257 (0x101)
    Menu ID : 1 (0x1)
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Muxing mode : ADTS
    Codec ID : 15
    Duration : 9s 891ms
    Bit rate mode : Variable
    Minimum bit rate : 85.1 Kbps
    Maximum bit rate : 139 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Compression mode : Lossy
    Delay relative to video : 19ms
    -----------------------------------

    We would like to get this parameters:

    -----------------------------------
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 16:9 (instead of 5:4)
    Frame rate : 25.000 fps
    Standard : PAL (instead of NTSC)
    -----------------------------------

    Is there a way to obtain these results changing some parameters of the transrate.xml file?

    Thanks for advance,

    Moisès

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Moisès,

    The Wowza Transcoder does not support anamorphic squeeze encoding. It does support decode of video with anamorphic squeeze, but not encode. So the Display aspect ratio is only a function of Width and Height

    You will have to verify following this guide but you can probably set the encode to PAL by adding this Parameter to each Transcoder template /Encode /Video Parameters container:

    <Parameter>
        <Name>mainconcept.video_format</Name>
        <Value>1</Value>
        <Type>Long</Type>
    </Parameter>
    Look for this output in the access log with the logVideoEncodingParameters Property enabled to verify your system has this feature.
    INFO server comment - # long: vui parameters: 1: PAL, 2: NTSC
    INFO server comment - mainconcept.video_format: 2
    Richard
    Last edited by rrlanham; 10-31-2013 at 12:14 PM.

  3. #3
    Join Date
    Oct 2013
    Posts
    3

    Default

    Richard,

    Many thanks for your help.

    Regards,

    Moisès

  4. #4
    Join Date
    Oct 2013
    Posts
    3

    Default

    Hi again,

    Finally, we achieved everything we needed.

    The output of the access log was very helpfull:

    -----------------------------------
    INFO 200 - # long: vui parameters: sample aspect ratio: horizontal size in arbitrary units
    INFO 200 - mainconcept.sar_width: 1

    INFO 200 - # long: vui parameters: sample aspect ratio: vertical size in arbitrary units
    INFO 200 - mainconcept.sar_height: 1
    -----------------------------------

    So we modified the transrate template to also obtain 16:9 aspect ratio with a 720x576 video resolution. We configured the pixel ratio as 16:11 (for an anamorphic wide screen; 16:9 => http://en.wikipedia.org/wiki/Pixel_aspect_ratio):

    -----------------------------------
    <Parameter>
    <Name>mainconcept.video_format</Name>
    <Value>1</Value>
    <Type>Long</Type>
    </Parameter>
    <Parameter>
    <Name>mainconcept.sar_width</Name>
    <Value>16</Value>
    <Type>Long</Type>
    </Parameter>
    <Parameter>
    <Name>mainconcept.sar_height</Name>
    <Value>11</Value>
    <Type>Long</Type>
    </Parameter>
    -----------------------------------

    So we got this:

    -----------------------------------
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Standard : PAL
    -----------------------------------

    Regards,

    Moisès
    Last edited by mpanisello; 11-13-2013 at 01:32 AM.

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Thanks for the update, Moisès. Glad it's working

    Richard

  6. #6
    Join Date
    Aug 2014
    Posts
    2

    Default

    You may also refer to this step by step guide on how to change video aspect ratio among 4:3, 16:9, 2.35:1, 1.85:1, 1:1, 21:9 etc

  7. #7
    Join Date
    Aug 2014
    Posts
    2

    Default

    Just google search Step by Step Guide on How to Change Video Aspect Ratio with iDealshare VideoGo, you will find a detailed guide.

  8. #8
    Join Date
    Sep 2015
    Posts
    1

    Default

    HI, I think the best and simple way is use some kind of software, don't need the coding staffs. I usually use the HD Video Converter Factory Pro to change aspect ratio of video to solve this kind of things. Hope it will help you.

    Best
    Last edited by timmdd; 09-22-2015 at 07:31 PM.

Similar Threads

  1. Replies: 8
    Last Post: 08-13-2013, 04:41 AM
  2. changing aspect ratio, GOP size and frame rate
    By manojprasath in forum AddOn: Transcoder
    Replies: 3
    Last Post: 07-08-2013, 06:35 AM
  3. Get video resolution (height & width) in the onPublish event
    By Sweleck in forum Server-side Modules and Code Samples Discussion
    Replies: 9
    Last Post: 09-10-2012, 09:12 AM
  4. video width and height problem
    By dmitriy.kirakosyan in forum Live Streaming and Encoder Discussion
    Replies: 7
    Last Post: 03-16-2012, 06:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •