[vlmc-devel] [PATCH] ProjectWizard: Add Audio bitrate and Video bitrate

yikei lu luyikei.qmltu at gmail.com
Sun Apr 10 11:45:02 CEST 2016


MP3[edit]
32 kbit/s – generally acceptable only for speech
96 kbit/s – generally used for speech or low-quality streaming
128 or 160 kbit/s – mid-range bitrate quality
192 kbit/s – medium quality bitrate
256 kbit/s – a commonly used high-quality bitrate
320 kbit/s – highest level supported by the MP3 standard


Video[edit]
16 kbit/s – videophone quality (minimum necessary for a
consumer-acceptable "talking head" picture using various video
compression schemes)
128–384 kbit/s – business-oriented videoconferencing quality using
video compression
400 kbit/s YouTube 240p videos (using H.264)[20]
750 kbit/s YouTube 360p videos (using H.264)[20]
1 Mbit/s YouTube 480p videos (using H.264)[20]
1.15 Mbit/s max – VCD quality (using MPEG1 compression)[21]
2.5 Mbit/s YouTube 720p videos (using H.264)[20]
3.5 Mbit/s typ – Standard-definition television quality (with bit-rate
reduction from MPEG-2 compression)
3.8 Mbit/s YouTube 720p (at 60fps mode) videos (using H.264)[20]
4.5 Mbit/s YouTube 1080p videos (using H.264)[20]
6.8 Mbit/s YouTube 1080p (at 60 fps mode) videos (using H.264)[20]
9.8 Mbit/s max – DVD (using MPEG2 compression)[22]
8 to 15 Mbit/s typ – HDTV quality (with bit-rate reduction from MPEG-4
AVC compression)
19 Mbit/s approximate – HDV 720p (using MPEG2 compression)[23]
24 Mbit/s max – AVCHD (using MPEG4 AVC compression)[24]
25 Mbit/s approximate – HDV 1080i (using MPEG2 compression)[23]
29.4 Mbit/s max – HD DVD
40 Mbit/s max – 1080p Blu-ray Disc (using MPEG2, MPEG4 AVC or VC-1
compression)[25]

>From Wikipedia. Are those fine?

2016-04-10 18:16 GMT+09:00 yikei lu <luyikei.qmltu at gmail.com>:
> Alright, where can I get the list, or can you give one?
>
> 2016-04-10 18:06 GMT+09:00 Hugo Beauzée-Luyssen <hugo at beauzee.fr>:
>>
>>> On 10 Apr 2016, at 07:04, Yikai Lu <luyikei.qmltu at gmail.com> wrote:
>>>
>>> ---
>>> src/Gui/wizard/ProjectWizard.cpp |   2 +
>>> src/Gui/wizard/VideoPage.cpp     |   2 +
>>> src/Gui/wizard/ui/VideoPage.ui   | 284 ++++++++++++++++++++++-----------------
>>> 3 files changed, 166 insertions(+), 122 deletions(-)
>>>
>>> diff --git a/src/Gui/wizard/ProjectWizard.cpp b/src/Gui/wizard/ProjectWizard.cpp
>>> index 7354da5..5607b29 100644
>>> --- a/src/Gui/wizard/ProjectWizard.cpp
>>> +++ b/src/Gui/wizard/ProjectWizard.cpp
>>> @@ -112,7 +112,9 @@ ProjectWizard::accept()
>>>         projectPreferences->setValue( "video/VideoProjectHeight", field( "height" ) );
>>>         projectPreferences->setValue( "video/VideoProjectWidth", field( "width" ) );
>>>         projectPreferences->setValue( "video/AspectRatio", field( "aspectratio" ) );
>>> +        projectPreferences->setValue( "video/VideoBitRate", field( "vbitrate" ) );
>>>         projectPreferences->setValue( "audio/AudioSampleRate", field( "samplerate" ) );
>>> +        projectPreferences->setValue( "audio/AudioBitRate", field( "abitrate" ) );
>>>         projectPreferences->setValue( "audio/NbChannels", field( "samplerate" ) );
>>>     }
>>>     QDialog::accept();
>>> diff --git a/src/Gui/wizard/VideoPage.cpp b/src/Gui/wizard/VideoPage.cpp
>>> index c49dfea..1700f5c 100644
>>> --- a/src/Gui/wizard/VideoPage.cpp
>>> +++ b/src/Gui/wizard/VideoPage.cpp
>>> @@ -43,6 +43,8 @@ VideoPage::VideoPage( QWidget* parent ) :
>>>     registerField( "aspectratio", ui.lineEditVideoAspectRatio );
>>>     registerField( "samplerate", ui.comboBoxAudioSamplerate );
>>>     registerField( "channels", ui.spinBoxAudioChannels );
>>> +    registerField( "abitrate", ui.spinBoxAudioBitrate );
>>> +    registerField( "vbitrate", ui.spinBoxVideoBitrate );
>>> }
>>>
>>> void
>>> diff --git a/src/Gui/wizard/ui/VideoPage.ui b/src/Gui/wizard/ui/VideoPage.ui
>>> index 90f6848..fe50563 100644
>>> --- a/src/Gui/wizard/ui/VideoPage.ui
>>> +++ b/src/Gui/wizard/ui/VideoPage.ui
>>> @@ -30,6 +30,153 @@
>>>      </property>
>>>     </widget>
>>>    </item>
>>> +   <item row="4" column="0" colspan="2">
>>> +    <widget class="QGroupBox" name="groupBox_2">
>>> +     <property name="title">
>>> +      <string>Audio</string>
>>> +     </property>
>>> +     <layout class="QGridLayout" name="gridLayout_3">
>>> +      <item row="1" column="0">
>>> +       <widget class="QLabel" name="label_6">
>>> +        <property name="text">
>>> +         <string>Number of channels</string>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="1" column="2">
>>> +       <widget class="QSpinBox" name="spinBoxAudioChannels">
>>> +        <property name="minimum">
>>> +         <number>1</number>
>>> +        </property>
>>> +        <property name="maximum">
>>> +         <number>2</number>
>>> +        </property>
>>> +        <property name="value">
>>> +         <number>2</number>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="0" column="1" colspan="2">
>>> +       <widget class="QComboBox" name="comboBoxAudioPresets">
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>Custom</string>
>>> +         </property>
>>> +        </item>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>Stereo</string>
>>> +         </property>
>>> +        </item>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>Mono</string>
>>> +         </property>
>>> +        </item>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="3" column="0">
>>> +       <widget class="QLabel" name="label_4">
>>> +        <property name="text">
>>> +         <string>Sample rate</string>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="3" column="2">
>>> +       <widget class="QComboBox" name="comboBoxAudioSamplerate">
>>> +        <property name="currentIndex">
>>> +         <number>0</number>
>>> +        </property>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>48000 Hz</string>
>>> +         </property>
>>> +        </item>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>44100 Hz</string>
>>> +         </property>
>>> +        </item>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>22050 Hz</string>
>>> +         </property>
>>> +        </item>
>>> +        <item>
>>> +         <property name="text">
>>> +          <string>11025 Hz</string>
>>> +         </property>
>>> +        </item>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="2" column="0">
>>> +       <widget class="QLabel" name="label_9">
>>> +        <property name="text">
>>> +         <string>Audio bitrate (kbps)</string>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>> +      <item row="2" column="2">
>>> +       <widget class="QSpinBox" name="spinBoxAudioBitrate">
>>> +        <property name="minimum">
>>> +         <number>8</number>
>>> +        </property>
>>> +        <property name="maximum">
>>> +         <number>512</number>
>>> +        </property>
>>> +        <property name="value">
>>> +         <number>256</number>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>> +     </layout>
>>> +    </widget>
>>> +   </item>
>>> +   <item row="1" column="0" colspan="2">
>>> +    <spacer name="verticalSpacer">
>>> +     <property name="orientation">
>>> +      <enum>Qt::Vertical</enum>
>>> +     </property>
>>> +     <property name="sizeType">
>>> +      <enum>QSizePolicy::Maximum</enum>
>>> +     </property>
>>> +     <property name="sizeHint" stdset="0">
>>> +      <size>
>>> +       <width>20</width>
>>> +       <height>30</height>
>>> +      </size>
>>> +     </property>
>>> +    </spacer>
>>> +   </item>
>>> +   <item row="3" column="0" colspan="2">
>>> +    <spacer name="verticalSpacer_2">
>>> +     <property name="orientation">
>>> +      <enum>Qt::Vertical</enum>
>>> +     </property>
>>> +     <property name="sizeType">
>>> +      <enum>QSizePolicy::Maximum</enum>
>>> +     </property>
>>> +     <property name="sizeHint" stdset="0">
>>> +      <size>
>>> +       <width>20</width>
>>> +       <height>30</height>
>>> +      </size>
>>> +     </property>
>>> +    </spacer>
>>> +   </item>
>>> +   <item row="5" column="0" colspan="2">
>>> +    <spacer name="verticalSpacer_3">
>>> +     <property name="orientation">
>>> +      <enum>Qt::Vertical</enum>
>>> +     </property>
>>> +     <property name="sizeHint" stdset="0">
>>> +      <size>
>>> +       <width>20</width>
>>> +       <height>40</height>
>>> +      </size>
>>> +     </property>
>>> +    </spacer>
>>> +   </item>
>>>    <item row="2" column="0" colspan="2">
>>>     <widget class="QGroupBox" name="groupBox">
>>>      <property name="title">
>>> @@ -120,6 +267,13 @@
>>>         </property>
>>>        </widget>
>>>       </item>
>>> +      <item row="4" column="2">
>>> +       <widget class="QLineEdit" name="lineEditVideoAspectRatio">
>>> +        <property name="text">
>>> +         <string>16/9</string>
>>> +        </property>
>>> +       </widget>
>>> +      </item>
>>>       <item row="3" column="0">
>>>        <widget class="QLabel" name="label_5">
>>>         <property name="text">
>>> @@ -143,10 +297,10 @@
>>>         </property>
>>>        </widget>
>>>       </item>
>>> -      <item row="4" column="2">
>>> -       <widget class="QLineEdit" name="lineEditVideoAspectRatio">
>>> +      <item row="5" column="0">
>>> +       <widget class="QLabel" name="label_8">
>>>         <property name="text">
>>> -         <string>16/9</string>
>>> +         <string>Video bitrate (kbps)</string>
>>>         </property>
>>>        </widget>
>>>       </item>
>>> @@ -157,136 +311,22 @@
>>>         </property>
>>>        </widget>
>>>       </item>
>>> -     </layout>
>>> -    </widget>
>>> -   </item>
>>> -   <item row="4" column="0" colspan="2">
>>> -    <widget class="QGroupBox" name="groupBox_2">
>>> -     <property name="title">
>>> -      <string>Audio</string>
>>> -     </property>
>>> -     <layout class="QGridLayout" name="gridLayout_3">
>>> -      <item row="1" column="0">
>>> -       <widget class="QLabel" name="label_6">
>>> -        <property name="text">
>>> -         <string>Number of channels</string>
>>> -        </property>
>>> -       </widget>
>>> -      </item>
>>> -      <item row="1" column="2">
>>> -       <widget class="QSpinBox" name="spinBoxAudioChannels">
>>> +      <item row="5" column="2">
>>> +       <widget class="QSpinBox" name="spinBoxVideoBitrate">
>>>         <property name="minimum">
>>> -         <number>1</number>
>>> +         <number>8</number>
>>>         </property>
>>>         <property name="maximum">
>>> -         <number>2</number>
>>> +         <number>8192</number>
>>>         </property>
>>>         <property name="value">
>>> -         <number>2</number>
>>> -        </property>
>>> -       </widget>
>>> -      </item>
>>> -      <item row="0" column="1" colspan="2">
>>> -       <widget class="QComboBox" name="comboBoxAudioPresets">
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>Custom</string>
>>> -         </property>
>>> -        </item>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>Stereo</string>
>>> -         </property>
>>> -        </item>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>Mono</string>
>>> -         </property>
>>> -        </item>
>>> -       </widget>
>>> -      </item>
>>> -      <item row="2" column="0">
>>> -       <widget class="QLabel" name="label_4">
>>> -        <property name="text">
>>> -         <string>Sample rate</string>
>>> +         <number>4000</number>
>>>         </property>
>>>        </widget>
>>>       </item>
>>> -      <item row="2" column="2">
>>> -       <widget class="QComboBox" name="comboBoxAudioSamplerate">
>>> -        <property name="currentIndex">
>>> -         <number>0</number>
>>> -        </property>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>48000 Hz</string>
>>> -         </property>
>>> -        </item>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>44100 Hz</string>
>>> -         </property>
>>> -        </item>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>22050 Hz</string>
>>> -         </property>
>>> -        </item>
>>> -        <item>
>>> -         <property name="text">
>>> -          <string>11025 Hz</string>
>>> -         </property>
>>> -        </item>
>>> -       </widget>
>>> -      </item>
>>>      </layout>
>>>     </widget>
>>>    </item>
>>> -   <item row="1" column="0" colspan="2">
>>> -    <spacer name="verticalSpacer">
>>> -     <property name="orientation">
>>> -      <enum>Qt::Vertical</enum>
>>> -     </property>
>>> -     <property name="sizeType">
>>> -      <enum>QSizePolicy::Maximum</enum>
>>> -     </property>
>>> -     <property name="sizeHint" stdset="0">
>>> -      <size>
>>> -       <width>20</width>
>>> -       <height>30</height>
>>> -      </size>
>>> -     </property>
>>> -    </spacer>
>>> -   </item>
>>> -   <item row="3" column="0" colspan="2">
>>> -    <spacer name="verticalSpacer_2">
>>> -     <property name="orientation">
>>> -      <enum>Qt::Vertical</enum>
>>> -     </property>
>>> -     <property name="sizeType">
>>> -      <enum>QSizePolicy::Maximum</enum>
>>> -     </property>
>>> -     <property name="sizeHint" stdset="0">
>>> -      <size>
>>> -       <width>20</width>
>>> -       <height>30</height>
>>> -      </size>
>>> -     </property>
>>> -    </spacer>
>>> -   </item>
>>> -   <item row="5" column="0" colspan="2">
>>> -    <spacer name="verticalSpacer_3">
>>> -     <property name="orientation">
>>> -      <enum>Qt::Vertical</enum>
>>> -     </property>
>>> -     <property name="sizeHint" stdset="0">
>>> -      <size>
>>> -       <width>20</width>
>>> -       <height>40</height>
>>> -      </size>
>>> -     </property>
>>> -    </spacer>
>>> -   </item>
>>>   </layout>
>>>  </widget>
>>>  <resources/>
>>> --
>>> 1.9.1
>>>
>>> _______________________________________________
>>> Vlmc-devel mailing list
>>> Vlmc-devel at videolan.org
>>> https://mailman.videolan.org/listinfo/vlmc-devel
>>
>>
>> I think it would make more sense to expose a list of presets rather than allowing some arbitrary value for the audio samplerate.
>>
>> Regards,
>>
>> _______________________________________________
>> Vlmc-devel mailing list
>> Vlmc-devel at videolan.org
>> https://mailman.videolan.org/listinfo/vlmc-devel


More information about the Vlmc-devel mailing list