Results 1 to 2 of 2

Thread: record video from webcam using java gstreamer

  1. #1
    Join Date
    Oct 2013
    Beans
    1

    record video from webcam using java gstreamer

    Hello,

    I'm tring to wirte an application which records video from my web cam to a file using gstreamer for java (working with eclipse on ubuntu). I'm quite new to gstreamer so to begin with, I just built a src element which is my webcam and a sink which is a file I created. Then I added them to a pipeline, linked and played the pipeline for 10 seconds.

    The application "worked fine" and a file was created (pretty large). But, when I try to play the file with VLC (or any other media player) I see nothing. I don't know if it has anything to do with the fact the video wan't encoded or something like that. I wanted to try to encode the video before putting it into the file but I don't know how - I can't seem to find any element in the "gstramer for java" package which encodes video.

    I would be more than glad to get your help to record the video with and without encoding (if possible).

    Thanks in advance,

    Ilan.

    Comment: Please don't tell me to go to "gst-launch" because I did it already and it worked, but I couldn't find a way to translate it to java code.

  2. #2
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,172
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: record video from webcam using java gstreamer

    What does a tool such as 'mediainfo' tell you about the file produced?
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •