Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From where recorder is getting the images or Frames to be recorded i found no link with preview to the recorder. #62

Closed
qaisbayabani opened this issue Jan 29, 2022 · 7 comments
Labels

Comments

@qaisbayabani
Copy link

Its working nice if added with permission nice means 100% correct. but i cant find out that from where recorder is getting the Frames from preview and where is connection between them. thanx in anticipation.

initRecorder()

    images[i] = new Frame(imageWidth, imageHeight, Frame.DEPTH_UBYTE, 2); ? or somewhere else

recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);

    recorder.setFormat("mp4");
    recorder.setSampleRate(sampleAudioRateInHz);
    // Set in the surface changed method
    recorder.setFrameRate(frameRate);
    audioRecordRunnable = new AudioRecordRunnable();
    audioThread = new Thread(audioRecordRunnable);
    runAudioThread = true;
@saudet
Copy link
Member

saudet commented Jan 30, 2022

FFmpeg supports a variety of protocols. Just put your URL in ffmpeg_link and see if it works or not.

@saudet saudet added the question label Feb 2, 2022
@saudet
Copy link
Member

saudet commented Feb 2, 2022

BTW, it's also possible to use FFmpeg or OpenCV to capture video on Android now, see bytedeco/javacv#1692.

@saudet saudet closed this as completed Feb 2, 2022
@qaisbayabani
Copy link
Author

            ((ByteBuffer) yuvImage.image[0].position(0)).put(data); is the line i think i  have to understand and i just want single image not video?

@saudet
Copy link
Member

saudet commented Feb 4, 2022

That uses the old deprecated Camera Preview API, but yes that's how it's doing it.

@qaisbayabani
Copy link
Author

qaisbayabani commented Feb 5, 2022

FFmpeg supports a variety of protocols. Just put your URL in ffmpeg_link and see if it works or not.

direct stream from android phone cam :) . Is a URL can attain it?

@saudet
Copy link
Member

saudet commented Feb 5, 2022

Yes, something like this: bytedeco/javacv#1692 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants