howto crop?

This forum is about all development around libVLC.
fishstyc
Blank Cone
Blank Cone
Posts: 40
Joined: 19 Oct 2010 12:39

howto crop?

Postby fishstyc » 17 Mar 2011 14:26

[UPDATE] Crop seems broken since 1.1.x: check progress on ticket 3941


If I use vlc's command-line I can crop a video-file by entering something like

Code: Select all

vlc.exe video.avi --crop='20x20+10+10'
.

I don't seem to get this working when I use libvlc_media_add_option(...)

I have tried this, but since crop is a video-out-filter, I also tried stuff like

Code: Select all

vout-filter=crop{crop-geometry='20x20+10+10'} or vout-filter=crop{geometry='20x20+10+10'} or video-filter=crop
but none of them work. Does anyone know what I am doing wrong, and how I could crop using LibVLC and the add_option functions?

Thanks.
Last edited by fishstyc on 18 Mar 2011 11:51, edited 1 time in total.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: howto crop?

Postby sherington » 17 Mar 2011 16:22

libvlc_video_set_crop_geometry

fishstyc
Blank Cone
Blank Cone
Posts: 40
Joined: 19 Oct 2010 12:39

Re: howto crop?

Postby fishstyc » 17 Mar 2011 23:41

The question was: can I do this using libvlc_media_add_option(...)

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: howto crop?

Postby sherington » 18 Mar 2011 08:48

What difference does it make? It's all just API calls.

fishstyc
Blank Cone
Blank Cone
Posts: 40
Joined: 19 Oct 2010 12:39

Re: howto crop?

Postby fishstyc » 18 Mar 2011 09:24

That I can allow a user to add options before opening the file, without having to build a command line parser from scratch.

It already exists, why would I try to recreate the same thing myself?

(BTW I decode video frames to memory planes using libvlc_video_set_callbacks and libvlc_video_set_format, I don't know if that has an influence)

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: howto crop?

Postby sherington » 18 Mar 2011 09:46

Another post in this forum suggested the following syntax:

Code: Select all

--sout="#transcode{vcodec=h264,deinterlace=1,vfilter=croppadd{cropleft=8,cropright=8},acodec=mp4a,ab=128,channels=2,samplerate=48000}:standard{access=file,dst='${1}'}
You have to change "--sout=" to ":sout=".

See viewtopic.php?f=4&t=76384

Worth a try.

fishstyc
Blank Cone
Blank Cone
Posts: 40
Joined: 19 Oct 2010 12:39

Re: howto crop?

Postby fishstyc » 18 Mar 2011 11:49

Crop seems broken since 1.1.x:
ticket 3941

I hope it will be fixed soon... then I can try again.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 18 guests