[
http://opencast.jira.com/browse/MH-6384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23369#action_23369
]
Robert Robere commented on MH-6384:
-----------------------------------
Woo.
import org.gstreamer.Bin;
import org.gstreamer.Gst;
import org.gstreamer.Pipeline;
import org.gstreamer.State;
import org.gstreamer.Bus;
import org.gstreamer.GstObject;
/*
gst-launch -e --gst-debug=2 -v filesrc location="tmp.mp4" ! qtdemux name=demux
demux.audio_00 ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 !
mux. demux.video_00 ! decodebin ! videocrop right=480 ! x264enc ! queue
max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! mp4mux name=mux !
filesink location=out2.mp4
*/
public class VideoSplitter {
public static void main(String[] args) {
Gst.init();
Bin bin = Bin.launch("filesrc location=\"tmp.mp4\" ! qtdemux name=demux
demux.audio_00 ! tee name=split1 ! queue max-size-buffers=0 max-size-time=0
max-size-bytes=0 ! mux. demux.video_00 ! decodebin ! tee name=split ! videocrop
right=480 ! x264enc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0
! mp4mux name=mux ! filesink location=out2.mp4 split. ! videocrop left=200 !
x264enc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! mp4mux
name=mux1 ! filesink location=out3.mp4 split1. ! queue max-size-buffers=0
max-size-time=0 max-size-bytes=0 ! mux1.", false);
Pipeline pipeline = new Pipeline();
pipeline.getBus().connect(new Bus.EOS() {
public void endOfStream(GstObject source) {
System.out.println("Finished ripping file");
Gst.quit();
}
});
pipeline.add(bin);
System.out.println(bin.getElements());
pipeline.play();
System.out.println("YO");
Gst.main();
pipeline.setState(State.NULL);
Gst.deinit();
}
}
> Write a gstreamer cli to split a single video into multiple videos and encode
> in h264
> -------------------------------------------------------------------------------------
>
> Key: MH-6384
> URL: http://opencast.jira.com/browse/MH-6384
> Project: Matterhorn Project
> Issue Type: Sub-Task
> Components: Architecture & Services
> Affects Versions: 1.2
> Reporter: Christopher Brooks
> Assignee: Robert Robere
> Priority: Critical
> Fix For: 1.2
>
>
> post result to this ticket, just using testsrc is fine
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opencast.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn
To unsubscribe please email
[email protected]
_______________________________________________