You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm new in ws.schild. I want to do it like use ffmpeg -filter:v "setpts=0.5*PTS", but when I use SetPtsFilter() to VideoAttributes().addFilter() method, it doesn't work. This is my code, can you help me?
public class VideoTranscoder {
public static void main(String[] args) throws EncoderException {
String inputPath = "/home/user/video.mp4";
String outputPath = "/home/user/output.mp4";
SetPtsFilter setPtsFilter = new SetPtsFilter();
setPtsFilter.addInputLabel("0.5*PTS");
VideoAttributes video = new VideoAttributes();
video.setCodec("libx264");
video.setFrameRate(30);
video.addFilter(setPtsFilter);
EncodingAttributes attrs = new EncodingAttributes();
attrs.setOutputFormat("mp4");
attrs.setVideoAttributes(video);
Encoder encoder = new Encoder();
MultimediaObject mediaObject = new MultimediaObject(new File(inputPath));
encoder.encode(mediaObject, new File(outputPath), attrs);
System.out.println("Video transcoding complete.");
}
}
The text was updated successfully, but these errors were encountered:
Hello,
I'm new in ws.schild. I want to do it like use ffmpeg -filter:v "setpts=0.5*PTS", but when I use SetPtsFilter() to VideoAttributes().addFilter() method, it doesn't work. This is my code, can you help me?
The text was updated successfully, but these errors were encountered: