CMD convert and crop

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
mysticJay
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2011 17:30

CMD convert and crop

Postby mysticJay » 08 Dec 2013 18:18

Hi,

I'm giving up...
I tried to find out all the day how to convert an AVI into MP4 (or other format) and have the crop-filter applied at the same time.

I manage to display the wanted output, but I can not find a option to activate the filters in the convert dialogues.

Digging into the Wiki also was useless. I was unable to find a single example that would work.
(pages have typos in the options (croppadd, cropttop, some are meant for Linux, some for Windows, some a commented "old information VLC 2 does it different") I know this is a voluntary project but shouldn't it be possible to find a simple way to achieve the above without going into advanced VLC programming?

Your advice is highly welcome.
- Mystic -

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: CMD convert and crop

Postby Jean-Baptiste Kempf » 12 Dec 2013 00:44

Try to do that:

Preferences, all, Stream out, stream out, and add the cropadd filter.

Then go to video, filters, crop and specify it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

mysticJay
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2011 17:30

Re: CMD convert and crop

Postby mysticJay » 13 Dec 2013 17:36

Hi,
I have no clue where to add what.
Is thatfilter now croppadd or cropadd?
(edit: It is indeed CROPPADD with two "p". This typo is in several dialogues of the UI and in the forum e.g. in examples. It might help to fix these everywhere. I also found "cropttop" instead of "croptop")

Can't I do it using a commandline?
I want to convert AND crop an AVI to MPG (MP4)

5 hours later: In the meantime I tried a complete reinstall of VLC but now FFMPEG no longer works. What the hack is going on?

Thanks
M.

mysticJay
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2011 17:30

Re: CMD convert and crop

Postby mysticJay » 14 Dec 2013 23:35

Some more news:
1) the settings in stream output/sout stream have no effect
2) setting in video/filters have effect and change the output. BUT
the picture turns blue.

May I also suggest that the filter is named the same in all sections? "Video scaling filter" for "croppadd" and "video scaling filter" for "swscale"
Where are the setting for the filters named in stream output/sout stream/transcode?

in the end I would still like to have a commandline.

M.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: CMD convert and crop

Postby mederi » 15 Dec 2013 14:45

Playback:

Code: Select all

--video-filter=croppadd{cropright=10,croptop=20}
Within transcode chain:

Code: Select all

vfilter=croppadd{cropright=10,croptop=20}
Media > Stream... > ...
https://forum.videolan.org/viewtopic.ph ... 71#p389133
and related posts/links there.

mysticJay
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2011 17:30

Re: CMD convert and crop

Postby mysticJay » 15 Dec 2013 22:29

Thanks, but would you mind tio give a complete commandline with an AVI as input and MP4 as output?
I tried to figure out during the weekend what I do wrong, but a complete syntax would be great.

Thanks
M.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: CMD convert and crop

Postby mederi » 16 Dec 2013 13:36

Use cropping tool on your film to find out cropping parameters:
Tools > Effects and Filters > Video Effects tab > Crop tab

Check/set parameters of croppadd video filter in VLC preferences:
Tools > Preferences > ( Show settings = All ) > Video \ Filters \ Cropadd: check/set values here

Use Stream wizard:
Media > Stream... > Add...; Stream > follow the steps there...
Select&edit or create&select a transcoding profile > check/set audio/video codecs and parameters; enable croppadd video filter (VLC-2.1.x): Video codec tab > Filters tab > [v] Video scaling filter
(or in VLC preferences: Tools > Preferences > ( Show settings = All ) > Stream output \ Sout stream \ Transcode: [v] Video scaling filter)
Final step: check/edit Generated stream output string

Code: Select all

:sout=#transcode{vcodec=h264,vb=1000,vfilter=croppadd,acodec=mpga,ab=128,channels=2,samplerate=44100}:file{mux=mp4,dst=D:\\film.mp4}
Use vfilter=croppadd{croptop=20,cropbottom=10,cropleft=16,cropright=0} to overcome default settings in VLC preferences.

Use the string in your batch files:

Code: Select all

"path to your\vlc.exe" "path to\input.avi" :sout=#transcode{vcodec=h264,vb=1000,vfilter=croppadd{croptop=20,cropbottom=10,cropleft=16,cropright=0},acodec=mpga,ab=128,channels=2,samplerate=44100}:file{mux=mp4,dst="path to\output.mp4"}

mysticJay
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2011 17:30

Re: CMD convert and crop

Postby mysticJay » 23 Dec 2013 12:06

Hi,
the above actually did what I expected. Thanks.
BUT it did not using 2.1.2!! Downgrading to 2.0.6 resolved my problems.

Background: FFMPEG does not seem to be correctly addressed in 2.1.2:
"It seems your Libav/FFmpeg (libavcodec) installation lacks the following encoder: H264 - MPEG-4 AVC (part 10)."

Yes, it also tells: complain at your distribution vendor (who ever that would be vor Windows7-x64)

I will open a new thread on this...
Thanks.

eyeland
Blank Cone
Blank Cone
Posts: 10
Joined: 23 Oct 2012 21:31

Re: CMD convert and crop

Postby eyeland » 09 Mar 2014 08:40

So, is it possible to transcode with filters now?
A while back, I tried working how to do this using CMD.
Specifically, I need to transcode a stream (lossless or as close as possible) with the motion blur filter active.
I assume that this still can't be done purely from the GUI?
Anyone feel like helping me out with this? :)
EDIT: I can easily transcode a stream where the picture is rotated 180 degrees as described here but I can't figure out how to save the stream with the motionblur filter.

EDIT2!: Heureka! Resetting my VLC settings somehow made it work, great :D Apart from that, I just followed the simple instructions in the above link and checked "motion blur filter" instead of "transform" - This is surely easier than the CMD approach I tried learning a year ago!

On to the next issue, bitrate and data size. I am currently testing on a clip that I exported from premiere using h.264 in a .mov container. As I will need to re-import the clip for further editing, I exported it without any limit on bitrate. Thus, the 22second clip is 200mb but after the vlc transcode, the new clip is 10mb. When I change the bitrate setting in "sout-stream-transcode" strange things happen. I know that VLC is not a video FX utility but I have some nice fringe uses for it. Any chance I can squeeze a higher data rate out somehow?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 22 guests