VLC command line parameters "--aspect-ratio" AND "--video-filter croppadd" are not working together
= Problem description: If you start VLC by command line with the parameters to crop (remove borders) of a video (--video-filter croppadd ...) and set aspect ratio (--aspect-ratio …) at the same time the aspect ratio option will be ignored and does not work correctly.\ \ To compare: If you start VLC with the parameter to crop the video borders (--video-filter croppadd …) and activate manually the aspect ratio from the menu, it works without any problems!
= Use Cases: 1.) Start vlc by command line with a video file of an aspect ratio of 4:3, crop the video borders and scale it to 16:9
2.) Start vlc by command line with a video capture device, crop the video borders and scale it to 16:9
= Test Conditions:
- Used test system: Windows 7 SP 1 32-bit and 64-bit, Intel Core2Duo with G45 Express integrated graphics
- VLC 32-bit for Windows, Release 2.2.6 and nightly build "vlc-3.0.0-20171021-0256-git-win32.zip" tested
- a mp4 video file with an aspect ratio of 4:3, e.g. a video with a size of 480 x 360 pixel saved as file "video_480x360.mp4" (e.g. "https://www.youtube.com/watch?v=mM5_T-F1Yn4&fmt=18" )
- a USB 2.0 Video Capture device with an analogue PAL/NTSC Composite or S-Video Input (device example name "OEM Device")
- crop values "croptop=10,cropbottom=140,cropleft=10,cropright=160" will be used as example for an asymmetric crop of the borders, other values can also be used
= Test Cases:
== Test Case 1 - Video File: Step 1.) Start VLC with the command line:
vlc.exe video_480x360.mp4 --aspect-ratio=16:9 --video-filter=croppadd{croptop=10,cropbottom=140,cropleft=10,cropright=160}
OR
vlc.exe video_480x360.mp4 --aspect-ratio=16:9 --video-filter=croppadd --croppadd-croptop=10 --croppadd-cropbottom=140 --croppadd-cropleft=10 --croppadd-cropright=160
OR
vlc.exe "https://www.youtube.com/watch?v=mM5_T-F1Yn4&fmt=18" --aspect-ratio=16:9 --video-filter=croppadd --croppadd-croptop=10 --croppadd-cropbottom=140 --croppadd-cropleft=10 --croppadd-cropright=160
Step 2.) During the video is playing check the real aspect ratio (e.g. by taking a video snapshot from menu "Video")\ Step 3.) Go to menu "Video" > "Aspect Ratio" > check current setting (it will shown "16:9" but this does not match)\ Step 4.) Go to menu "Video" > "Aspect Ratio" > set again manually to "16:9" \ Step 5.) Check the real aspect ratio (e.g. by taking a video snapshot from menu "Video" > "Take Snapshot")
== Test Case 2 - Capture Device: Step 1.) Start VLC with the command line:
VLC.exe dshow:// :dshow-vdev="OEM Device" --dshow-video-input=1 --aspect-ratio=16:9 --video-filter=croppadd{croptop=10,cropbottom=140,cropleft=10,cropright=160}
OR
VLC.exe dshow:// :dshow-vdev="OEM Device" --dshow-video-input=1 --aspect-ratio=16:9 --video-filter=croppadd,deinterlace --croppadd-croptop=12 --croppadd-cropbottom=12 --croppadd-cropleft=16 --croppadd-cropright=16
Step 2.) During the video is playing check the real aspect ratio (e.g. by taking a video snapshot from menu "Video")\ Step 3.) Go to menu "Video" > "Aspect Ratio" > check current setting (it will shown "16:9" but this does not match) \ Step 4.) Go to menu "Video" > "Aspect Ratio" > set again manually to "16:9"\ Step 5.) Check the real aspect ratio (e.g. by taking a video snapshot from menu "Video" > "Take Snapshot")\
Remarks: \ "OEM Device" is an example of a capture device, please use the name of your own video capture device or the name of your webcam device. See in Windows device manager for the right name.\ The parameter "--dshow-video-input=1" is optional. For Video Capture devices with an analogue PAL/NTSC Composite and S-Video Input this parameter can be used to define which Input shall be used, e.g.\ "--dshow-video-input=1" for the Composite Input\ "--dshow-video-input=2" for the S-Video Input\
== Test Case 3 to compare (optional): Step 1.) Start VLC with the command line:
vlc.exe video_480x360.mp4 --aspect-ratio=16:9
Step 2.) Check aspect ratio (will works without the crop parameter)\ Step 3.) Start VLC with the command line:
vlc.exe video_480x360.mp4 --video-filter=croppadd --croppadd-croptop=10 --croppadd-cropbottom=140 --croppadd-cropleft=10 --croppadd-cropright=160
Step 4.) Go to menu "Video" > "Aspect Ratio" and set aspect ratio manually to "16:9"\ Step 5.) Check aspect ratio (will works if the aspect ratio was set manually)\