Page 1 of 1

How to use VLC Media Player to save only part of video (crop image or time)

Posted: 05 Aug 2023 15:38
by DIV
Can anyone please advise on how to use VLC Media Player to save only part of video: specifically to crop the picture and/or to include only a portion of the time?

So far I have received information about various methods that don't work, but (as interesting as that is), I'd rather know if there are some methods that work.

Re: How to use VLC Media Player to save only part of video (crop image or time)

Posted: 05 Aug 2023 15:42
by Rémi Denis-Courmont
You need to transcode, which makes this a rather unappealing idea. But if you still want to do it, you can set up transcoding and crop from the CLI. Refer to tye streaming documentation

Re: How to use VLC Media Player to save only part of video (crop image or time)

Posted: 07 Aug 2023 03:46
by DIV
Hello, Rémi.
Refer to tye streaming documentation
Thanks for the pointer.
Is this the documentation on transcoding through streaming in VLC Media Player that you were referring to?
If so, I would need a bit more explicit guidance, as that documentation doesn't mention cropping the picture or adjusting the time span for the output video.
It looks rather like the approach that I have tried unsuccessfully to use already — chances are that there's some step in the correct process that I may have overlooked.
For example, if I am only modifying the picture information, do I have to transcode the audio too?
Where should I configure the settings (on a per file basis)?
What is the correct sequence of steps?

You need to transcode, which makes this a rather unappealing idea.
Secondly, I am not sure in what way you mean "unappealing".
Do you mean that cropping the picture and/or exporting only a short snippet of a video is always, inherently, unappealing? (Because of file bloat and/or loss of image quality, for instance?)
Or do you mean that VLC Media Player is not expected to be used for such operations (even though the feature is — possibly — available in VLC), and hence it does not perform this task in an optimal way; rather, it would be better to use some other purpose-built software tool or another application?

***UPDATE***
you can set up transcoding and crop from the CLI.
By the way, the streaming documentation (per the link above) makes no mention of "CLI".
Only later I have eventually figured out that you might have been referring to the "Command-line interface".
(I concede that you may be very busy and trying to save time in your responses, but please be aware that not everyone will understand such jargon — especially non-experts who are asking for assistance.)
So are you saying that it cannot (or should not) be done through the GUI?
Furthermore, I cannot find documentation (neither instructions nor examples) of how to apply cropping the picture or adjusting the time span for the output video when using a command-line instruction.
Moreover, if I go to the commandline and enter commands such as

Code: Select all

C:\Program Files (x86)\VideoLAN\VLC>vlc/? C:\Program Files (x86)\VideoLAN\VLC>vlc/help
I do not get any information on syntax.

***UPDATED UPDATE***
OK, I found this VLC command-line help. It looks very complicated.
It looks like it'd be hard to get the syntax right, and easy to get it wrong (e.g. a misplaced comma) without knowing why.

—DIV

P.S. By the way, does that requirement to transcode apply to every type of format/encoding/container?
I have tried on two different MP4 files, with H.264 (avc1) encoding, of different resolutions, and I accept that transcoding would be necessary there. I'm just curious as to whether that's always the case.
If there's a video equivalent of BMP image format, for instance, I could imagine that there should be neither losses/changes in image quality nor (further) file size bloat. Maybe some sort of 'raw' format/encoding. Just curious — it's not the main issue.

Re: How to use VLC Media Player to save only part of video (crop image or time)

Posted: 07 Aug 2023 03:57
by Rémi Denis-Courmont
Transcoding is slow and lossy. That's why it's unappealing.