VLC command line to open webcam and crop to specific size?


Recommended Posts

Could anyone help me create a VLC shortcut to automatically open the capture device /dev/video0 at 1024x576, and then crop and resize said video to a specific size, say 800x450?  

 

I have this security webcam set up, and whenever I bring my laptop home, I like to plug the camera into the laptop's USB port, fire up VLC, and use the laptop as the webcam monitor.  But because the webcam is super-wide-angle, I then also have to use ALT-R, ALT-C, ALT-D, and ALT-F, to manually crop the video one pixel at a time from each edge.  Then, because VLC automatically resizes the cropped video to full screen, this is effectively like having a 'digital zoom', to zoom in on the important bits in the center of the video feed.

 

While I don't know the exact dimensions of what I end up cropping the video to, I can find them out by trial and error.  But once I do figure out the exact dimensions, I would like to have a VLC shortcut on my desktop to automatically launch VLC, play the webcam fullscreen, and crop it to the specified dimensions, so I don't have to do it manually every time, one pixel at a time.

 

Any help would be greatly appreciated!  I tried googling, but I couldn't figure out how to combine a crop command with playing the /dev/video0 capture device.

I've tried this:

 

 

Basically, it's using the vfilter to subtract 100 pixels from all 4 sides, and it works, sort of.  When I manually use the alt-d/r/f/c keys to crop one pixel at a time, VLC automatically stretches the remaining video to full screen, while maintaining aspect ratio.  When I use vfilter=cropadd in the command line, I'm left with the small, cropped video at original size at the top left of the screen, and weird stretched out lines/graphical glitches filling the bottom and right sides of the screen.

 

I also tried this:

 

 

Which instead of using vfilter=cropadd in the transcode section, it uses V4L2's crop feature on the capture-device-input side of things.  :vout-filter=crop loads the crop filter into V4L2, and :crop-geometry="626x288+10+94" tells it to crop the 1024x576 video feed into 626x288, starting from (10,94).  

 

But it doesn't do a damn thing.  I must have the code wrong or something.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Hundreds of printer models with weak password algorithms exposed, no firmware patch possible by Usama Jawad Many people don't think or care about it, but printer security is a pretty important avenue when it comes to evaluating your cybersecurity posture. Last month, it was found that the companion software for Procolored printers was distributing malware. Now, it has been revealed that hundreds of printer models all over the globe are susceptible to attacks targeting their admin credentials. Bleeping Computer has reported that CVE-2024-51978 is a one of the eight printer vulnerabilities recently discovered by security researchers. Combined, these allow authenticated and unauthenticated attackers to discover the default admin password, perform remote code execution (RCE), crash the printer, and leak other sensitive information. Severity ratings go from a score of 5.3 (medium) to 9.8 (critical), indicating that these are pretty severe vulnerabilities. The most dangerous vulnerability in there exposes the default admin password, and primarily affects Brother printers. This is because Brother utilizes a rather weak password generation algorithm that is highly dependent upon the device's serial number and a static salt table. Analysis of the code revealed that the first 16 characters of the serial number are appended with eight bytes from a static salt table, with the results being hashed with SHA256 and Base64-encoded. Finally, the first eight characters are then taken and some of them are replaced with special characters to form the password. The static nature of the password generation algorithm means that an attacker can chain various existing vulnerabilities to get access to your serial number and eventually your default admin password. It is important to note that not all printer models are affected by all of these flaws, but the default admin password exposure does affect 695 models. The breakdown for the number of printer model affected by the eight vulnerabilities is as follows: Brother: 689 Fujifilm: 46 Konica Minolta: 6 Ricoh: 5 Toshiba: 2 Brother has informed the security researchers that it cannot fully remediate the password generation vulnerability through a firmware patch. It can only fix the issue in its next printer models by patching the problem during the manufacturing process. This makes it crucial for customers of affected models to change their default admin password as soon as possible, which is good practice anyway.
    • Win11 being 2.3x faster than Win10, so that means without changing any hardware, Doom Eternal will run at over 2x the framerate? Or that any computational stuff will be done 2x faster just because of OS? Press X for doubt. I wonder where they pulled these metrics out of coz they make no sense. Not to mention my laptop with Ryzen 2500U that used to run Windows 11 simply CAN'T anymore because of BS arbitrary requirements Microsoft has imposed in Win11 that weren't there intiially. So, that laptop is now running Ubuntu or Fedora and runs at 1000000000000000000000x faster speeds because Windows 11 just doesn't work at all so it gets DNF.
    • “Ask Photos” is coming to more Google Photos users in the US by Paul Hill Google has announced several improvements to a Gemini-powered Google Photos feature called Ask Photos. The feature launched last year in early access and it was great for longer search requests, however, when users typed “Dog” or “Beach” looking for those types of pictures, Ask Photos underperformed. Now, Google has addressed this and is bringing the feature to more eligible users in the United States. The search giant said that users enjoyed asking queries such as “suggest photos that’d make great phone backgrounds” or “what did I eat on my trip to Barcelona?” and getting Gemini-powered responses to these complex questions. Unfortunately, simple searches like “beach” or “dogs” were generating less than optimal results and people complained. To remedy the situation, Google has brought the best of Google Photos’ classic search feature to Ask Photos to improve latency. Easy, short requests will be dealt with by the old search mechanism and when you ask complex queries, it will switch over to the Gemini-powered search results. Now that Google has addressed this main issue of simple searches by integrated functionality from the previous search model, the company feels more confident to open up beyond early access and deliver it to more users in the United States. To be eligible, you must be 18+, be in the US, have your Google Account language set to English (United States), and have Face Groups turned on. This feature is only available on Android and iOS. To start using it, open Google Photos and tap on Ask at the bottom, then press Try now and agree to the terms. If you do not see the Ask button, it means you’re not yet eligible. The feature also can’t be used on computers yet. Hopefully, Google will quickly expand this feature outside the US so that international users can try it out too.
    • When are MS going to learn. Traditional home users who email, watch cat videos and perform basic tasks don't care if W11 is slightly faster...assuming it's true. Few home users care about faster speed and more secure claims. In any event, it's irrelevant. MS stopped caring about home users years ago as evident by their hostile, anti choice home user policies.
    • They have. https://www.xda-developers.com...-25h2-update-kind-of-small/
  • Recent Achievements

    • Week One Done
      suprememobiles earned a badge
      Week One Done
    • Week One Done
      Marites earned a badge
      Week One Done
    • One Year In
      runge100 earned a badge
      One Year In
    • One Month Later
      runge100 earned a badge
      One Month Later
    • One Month Later
      jfam earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      567
    2. 2
      +FloatingFatMan
      177
    3. 3
      ATLien_0
      169
    4. 4
      Michael Scrip
      127
    5. 5
      Xenon
      119
  • Tell a friend

    Love Neowin? Tell a friend!