Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

640x360 Resolution #50

Open
aaronwardle opened this issue Jul 15, 2017 · 3 comments
Open

640x360 Resolution #50

aaronwardle opened this issue Jul 15, 2017 · 3 comments

Comments

@aaronwardle
Copy link

Hi,

First of all thanks for creating this great library it works super quick compared to a lot of other methods.

With our project we are recording video at 1080p 16:9 so we can make use of some camera features such as stabilisation, however we need to output the video at 640x360 resolution we have managed to get this working with your source code however we are finding that the output video is quite bad and has lots of artefacts unless we set the bitrate very high.

Do you have any suggestions on how we can improve the output quality?

Thanks Aaron

@ypresto
Copy link
Owner

ypresto commented Jul 19, 2017

See #40 (comment) .
Supported resolutions (and combinations of it and bitrate) can be different by devices. And currently, there is no easy way to detect it.
/etc/media_profiles.xml or etc. on each device might be useful for detection.

@ypresto
Copy link
Owner

ypresto commented Jul 19, 2017

For example, my device has below file:
(It seems used by CamcorderProfile)

        ...

        <EncoderProfile quality="high" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="42000000"
                   width="3840"
                   height="2160"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="60">
            <Video codec="h264"
                   bitRate="128000"
                   width="176"
                   height="144"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="512000"
                   width="320"
                   height="240"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="156000"
                   sampleRate="48000"
                   channels="2" />
        </EncoderProfile>

        <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="1200000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

       <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="6000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="12000000"
                   width="1280"
                   height="720"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="17000000"
                   width="1920"
                   height="1080"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="42000000"
                   width="3840"
                   height="2160"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        ...

    <VideoEncoderCap name="h264" enabled="true"
        minBitRate="64000" maxBitRate="100000000"
        minFrameWidth="176" maxFrameWidth="3840"
        minFrameHeight="144" maxFrameHeight="2160"
        minFrameRate="15" maxFrameRate="30" />

    ...

@adrianknight89
Copy link

Unfortunately, 720p is too big for mobile phones and users with low bandwidth connection. I too would like to see the ability to produce 360p videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants