LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2020, 01:09 PM   #1
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Rep: Reputation: Disabled
Video-editing software for removing pixels from the top and bottom of a video


Hi,

I need to remove from some videos a few pixels from the top a few from the bottom as well, thus cropping the video.
Could you please suggest an easy to use software that allows me to do that, possibly automatically, to a whole folder full of videos?

Thanks

Grabby

Last edited by Grabby; 01-21-2020 at 04:38 AM.
 
Old 01-20-2020, 03:28 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I would write myself a script with ffmpeg.
First I'd figure out how to crop the video with ffmpeg - through a web search, reading the docs etc.
Then I'd wrap it in a script like this:
Code:
for film in *mp4 *avi *mkv; do
    ffmpeg -i "$film" -doing -things "$film".cropped
done
 
2 members found this post helpful.
Old 01-20-2020, 04:23 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Or if you don't want to re-encode all of them. Crop them as you play them.

Code:
mplayer -really-quiet -identify -frames 0 MyVid1.mp4
ID_VIDEO_ID=0
ID_AUDIO_ID=0
...
ID_CLIP_INFO_N=4
ID_FILENAME=MyVid1.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=1099992
ID_VIDEO_WIDTH=768
ID_VIDEO_HEIGHT=432
ID_VIDEO_FPS=29.970
...
Crop a little off of the top and bottom.
Code:
mplayer -vf crop=768:426:0:4 MyVid1.mp4
 
Old 01-20-2020, 09:00 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Above posts are correct.

If you really do need pixel then I think this will still work. https://video.stackexchange.com/ques...eo-with-ffmpeg
 
1 members found this post helpful.
Old 01-21-2020, 04:38 AM   #5
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Thanks a lot!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Move unity launcher to the bottom with Unity Bottom Launcher | PPA Ubuntu LXer Syndicated Linux News 0 12-19-2011 12:30 AM
removing white pixels from bi-level PDF files (xpdf fails to change the color of scanned documents) libCog Linux - Software 0 12-05-2011 01:31 PM
LXer: Create Side by Side or Top-Bottom 3D Video With ffmpeg and Imagemagick or Mencoder by Converti LXer Syndicated Linux News 0 06-14-2011 04:50 PM
Maximized windows can't overlap the top 40 pixels on a Sam Linux desktop quincy_the_penquin Linux - Desktop 1 07-17-2007 02:14 PM
Strange mouse resolution ? 2 pixels by 2 pixels Creak Linux - General 8 04-18-2004 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration