Extracting Video Clip to file

This forum is about all development around libVLC.
JDPile
New Cone
New Cone
Posts: 1
Joined: 29 Apr 2014 17:57

Extracting Video Clip to file

Postby JDPile » 29 Apr 2014 18:16

I am fairly new to LibVLC development, and I am sure this topic has come up before, but I am creating a custom video player using LibVLC (v2.1.3).
I am trying to create an interface that allows users to extract a portion of a video, and save it to a file. I have been able to sucessfully save video to a file by instantiating a new media and player instance with a file output type. My problem is that I usually want to start the file output sometime after the start of the original video, and stop it before the end of the original video with at least a few seconds of accuracy. It appears that the position and time of the media player can only be set when it is playing. So I have to start the media player playing, set the position, and monitor the position until it reaches the desired stop position. This has the fundamental flaw that it likely writes a few frames to the file before I can set the player to the desired starting position. Is there any way to position the media player to a desired position before outputting the video to file?

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Extracting Video Clip to file

Postby Rémi Denis-Courmont » 29 Apr 2014 21:16

In the VLC debug logs, look messages of the form: using TYPE module "NAME"
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 16 guests