Alldayvideo Quality Adjustment FAQ

I have been playing with adjusting the quality of the .wmv file that is output by WD and most of it figured out. I put together the below FAQ and if suitable it can be added to the WD FAQs if there is a need for it. Here goes!

Changing alldayvideo output quality

You can modify the .wmv file that is output by alldayvideo by adding a few parameters to your encodenew.bat and encodenew2.bat files. You may want to do this to produce a better quality video, to reduce the size of the screen or to reduce the file size. Below is a list of allowable parameters available:

[-wme]
Loads an existing Windows Media Encoder session file.
[-input]
The file or directory to be encoded.
Specify a file or directory name. If you specify a directory, supported
files in the directory will be encoded to the output directory, using
the same encoding settings.
Enclose file and directory names that have spaces in quotations.
For example: -input “c:\my sample.wmv”
[-adevice]

Usage for profiles.
You can override parameters in a profile by appending arguments to a
command.

[-profile]
Specifies a predefined profile to use in the session.

Codes and basic descriptions for the predefined profiles:
Audio/Video:
av20: Profile_AudioVideo_Modem_28K (actual rate: 20Kbps)
av32: Profile_AudioVideo_Modem_56K (32 Kbps)
av100: Profile_AudioVideo_LAN_100K (100 Kbps)
av225: Profile_AudioVideo_LAN_256K (225 Kbps)
av350: Profile_AudioVideo_LANDSL_384K (350 Kbps)
av450: Profile_AudioVideo_LANDSL_768K (450 Kbps)
av700: Profile_AudioVideo_NearBroadcast_700K (700 Kbps)
av1400: Profile_AudioVideo_NearBroadcast_1400K (1400 Kbps)
av350pal: Profile_AudioVideo_Broadband_PAL_384K (350 Kbps)
av700pal: Profile_AudioVideo_NearBroadcast_PAL_700K (700 Kbps)
av100_2p: Profile_AudioVideo_LAN_100K_2Pass (100 Kbps)
av350_2p: Profile_AudioVideo_LANDSL_384K_2Pass (350 Kbps)
av600vbr: Profile_AudioVideo_FilmVBR_600K (600 Kbps)
avq97vbr: Profile_AudioVideo_FilmVBR_Quality97 (Quality 97)

Audio-only:
a20_1: Profile_AudioOnly_FMRadioMono_28K (20 Kbps)
a20_2: Profile_AudioOnly_FMRadioStereo_28K (20 Kbps)
a32: Profile_AudioOnly_Modem_56K (32 Kbps)
a48: Profile_AudioOnly_NearCDQuality_48K (48 Kbps)
a64: Profile_AudioOnly_CDQuality_64K (64 Kbps)
a96: Profile_AudioOnly_CDAudiophileQuality_96K (96 Kbps)
a128: Profile_AudioOnly_CDAudiophileQuality_128K (128 Kbps)

Video-only:
v20: Profile_VideoOnly_Modem_28K (20 Kbps)
v32: Profile_VideoOnly_Modem_56K (32 Kbps)

[-loadprofile]
Specifies a Windows Media Encoder or custom profile to use.

Usage for audio settings.

[-a_codec]
Audio codec to be used. Use -a_codecs to list available codecs.
Specify codec index:
WMA9STD: Windows Media Audio 9 (default).
WMA9PRO: Windows Media Audio 9 Professional
WMSP9: Windows Media Audio 9 Voice
WMA9LSL: Windows Media Audio 9 Lossless; -a_mode 2 required
PCM: No compression
[-a_codecs]
Lists all audio codecs.
[-a_content]
Audio content mode for the Windows Media Audio v9 Voice codec.
0 = No special mode for the audio content (default)
1 = Speech mode
2 = Mixed (speech and music) mode (also requires -a_contentedl)
You must also specify the Windows Media Audio v9 Voice codec.
[-a_contentedl]
Specifies the places in audio content where music starts and ends. To do
this, you must first create an optimization definition file. You
must specify the Windows Media Audio Voice codec and -a_content 2 when
when you use the -a_contentedl option.
[-a_folddown6to2]
Fold-down coefficients for multichannel audio. Use whole numbers only.
Values will be converted to negative numbers. Valid numbers are 0 to 144.
For example, -a_folddown6to2 10 3 3
[-a_formats]
Lists all audio formats for each codec.
[-a_mode] <mode_number>
Audio encoding to be used.
0: 1-pass CBR (default).
1: 2-pass CBR.
2: Quality-based VBR.
3: Bit rate-based VBR (two-pass).
4: Bit rate-based peak VBR (two-pass).
[-a_peakbitrate]
Specifies the peak bit rate in bits per second for peak bit rate-based
VBR for audio. If not specified, the peak bit rate is 1.5 times the
audio bit rate.
[-a_peakbuffer]
Buffer in msec for audio with peak bit rate-based VBR. If not specified,
the default of 3000 msec is used.
[-a_setting]
Specifies the formats for audio setting.
Use -a_formats to list supported audio formats for each codec.

-a_setting Bitrate_SamplingRate_Channels. For example, -a_setting 48_44_2
specifies 48 Kbps, 44 kHz, and two channels. The default is 64_44_2.

If you use quality-based VBR: -a_setting Qxx_SamplingRate_Channels.
For example, -a_setting Q90_44_2 specifies a quality level of 90, 44 kHz,
and 2 channels.

If you use the Windows Media Audio Professional 9:
-a_setting Bitrate_SamplingRate_Channels_BitDepth.
For example, -a_setting 250_44_2_24 specifies 250 Kbps, 44 kHz,
two channels, and 24-bit encoding. Use either 16- or 24-bit encoding.
24-bit is the default.

If you use the Windows Media Audio 9 Lossless codec:
-a_setting Qxx_SamplingRate_Channels_BitDepth. For example,
-a_setting Q100_44_2_24 specifies VBR Quality 100, 44 kHz, two channel,
24-bit encoding. (Quality-based VBR and a quality level of 100 is
required with this codec.)

[-audioonly]
Encodes the audio portion of the stream only.

Usage for video settings.

[-v_codec]
Video codec to be used. Use -v_codecs to list available video codecs.
Specify codec index:
WMV7: Windows Media Video 7.
WMV8: Windows Media Video 8.1.
WMV9: Windows Media Video 9 (default).
WMS9: Windows Media Video Screen 9.
MP41: ISO MPEG-4 Video v1
UNCOMP: Full frames (uncompressed)
[-v_width]
Video frame width in pixels to be encoded. Default: Source video width.
[-v_height]
Video frame height in pixels to be encoded. Default: Source video height.
[-v_framerate]
Video frame rate in floating point to be encoded. Default: 30 fps.
[-v_keydist]
Key frame distance in seconds for video. Default: 10 seconds.
[-v_preproc]
Video preprocessing for certain input sources.
0: None (for progressive video input).
1: Deinterlace but preserve the size.
For example, 640x480x30 interlace to 640x480x30 progressive.
2: Deinterlace but halve the size.
For example, 640x480x30 interlace to 320x240x30 progressive.
3: Deinterlace, halve the size, and double the frame rate.
For example, 640x480x30 interlace to 320x240x60 progressive.
4: Deinterlace, halve vertical size, and double frame rate.
For example, 320x480x30 interlace to 320x240x60 progressive.
5: Inverse telecine from 30fps to 24fps.
6: Inverse telecine - First field is top field with AA telecine pattern.
7: Inverse telecine - First field is top field with BB telecine pattern.
8: Inverse telecine - First field is top field with BC telecine pattern.
9: Inverse telecine - First field is top field with CD telecine pattern.
10:Inverse telecine - First field is top field with DD telecine pattern.
11:Inverse telecine - First field is bottom field with AA telecine
pattern.
12:Inverse telecine - First field is bottom field with BB telecine
pattern.
13:Inverse telecine - First field is bottom field with BC telecine
pattern.
14:Inverse telecine - First field is bottom field with CD telecine
pattern.
15:Inverse telecine - First field is bottom field with DD telecine
pattern.
16:Interlaced encoding.
17:Interlaced encoding - First field is top field.
18:Interlaced encoding - First field is bottom field.
Default: 0: None.
[-v_clip]
The region of the image (with respect to source) to be clipped/encoded.
If the right is 0 or greater than width, it is ignored and re-assigned
to width. If the bottom is 0 or greater than height, it is ignored and
re-assigned to height.
[-v_mode]
Video encoding to be used.
0: 1-pass CBR (default).
1: 2-pass CBR.
2: Quality-based VBR.
3: Bit rate-based VBR (two-pass).
4: Peak bit rate-based VBR (two-pass).
[-v_bitrate]
Video bit rate in bits per second to be encoded. Default: 250000 bps.
Set this to 0 for audio-only coding.
[-v_buffer]
Delay buffer in milliseconds for video. Default: 5000 msec.
[-v_quality]
CBR: Quality/smoothness tradeoff. 0 to 100, 0 being the smoothest.
Default: 75.
Quality-based VBR: Image quality for the video. Encode video to the
specified quality, regardless of bit rate. Default: 95
[-v_peakbitrate]
Peak bit rate in bits per second for peak bit rate-based VBR for video.
If not specified, the peak bit rate is 1.5 times the video bit rate.
[-v_peakbuffer]
Buffer in msec for video, with peak bit rate-based VBR. If not specified,
the default of 5000 msec is used.
[-v_performance]
Use to adjust hardware performance settings. Possible values: 0, 20, 40,
60, 80, and 100, with 100 representing the highest quality. If you do not
specify a value, codec defaults are used.
[-v_profile]
Specifies the category of complexity of the encoded content. Use if you
are targeting your content for playback on a hardware device other than
a computer. Some hardware devices only support certain categories. (Refer
to the documentation for your device for more information.) If you do not
add the -v_profile option to a command, the correct complexity setting is
selected automatically during encoding. Possible values are SP (Simple),
MP (main), or CP (complex).
[-duration]
Amount of time in seconds to encode. Use when sourcing from devices.
[-saveprofile]
Saves current settings to a file for later reuse. Default file name
extension is .prx.
[-devices]
Lists audio and video capture devices.
[-v_codecs]
Lists all video codecs.
[-videoonly]
Encodes video stream only.
[-pixelratio]
Specifies the video pixel aspect ratio.
[-pixelformat]
Specifies the video pixel format. Possible values:
I420
IYUV
RGB24
RGB32
RGB555
RGB565
RGB8
UYVY
YUY2
YV12
YVU9
YVYU
[-maxpacket]
Specifies the maximum packet size in bytes.
[-minpacket]
Specifies the minimum packet size in bytes.

[-title]
Title of the content. Enclose strings with spaces in quotations. For
example: -title “Windows Media Sample”
[-author]
[-copyright]
[-description]
[-rating]
NOTE: The maximum string length for each one is 255.

The normal command used in the encodenew.bat and encodenew2.bat files is:

cscript.exe wmcmd.vbs -input “C:\wdisplay\alldayvideo\videolastday.mpg” -output “C:\wdisplay\alldayvideo\videolastday.wmv”

This outputs a video file with the default settings of 200kbps bitrate (v_bitrate) and 75 quality (v_quality).

To increase the quality you can increase the bitrate and/or quality parameters. Be aware that increasing the bitrate will increase the size of the file. An example of this is:

cscript.exe wmcmd.vbs -input “C:\wdisplay\alldayvideo\videolastday.mpg” -output “C:\wdisplay\alldayvideo\videolastday.wmv” -v_quality 100 -v_bitrate 1000000

You can also decrease the file size and increase the video quality by decreasing the width and height of the output file. (-v_width & -v_height). An example of this is:

cscript.exe wmcmd.vbs -input “C:\wdisplay\alldayvideo\videolastday.mpg” -output “C:\wdisplay\alldayvideo\videolastday.wmv” -v_width 240 -v_height 180

Note: You need to change the width and height the same percentage to keep the same aspect ratio of the original file.

You will just need to play with different settings and recreate the video to find the right mix of settings to achieve the desired results.

Wow - thanks for sharing this HobbyTalk.

I have added a little blurb at the end of the all day video FAQ with a link pointing to this thread.

http://discourse.weather-watch.com/p/87498

Thanks for the tips.

After some long time learning this I found some settings that really help cut the size down.

-v_width 352 -v_height 240 -v_framerate 8 -v_quality 100 -videoonly

This is what I use and about 1/2 a day is only 4MB the big saver I found was the -videoonly No reason to do audio if I do not have it.

Hope this helps.
:smiley: