No audio on Windows using branch osx-and-win
fransschreuder opened this issue · 5 comments
Hello,
I am trying to get ofxVideoRecorder to work in Windows (works great on Ubuntu).
I am using the branch osx-and-win which has no issue tracker.
The application output looks ok to me though... any ideas? Thanks
edit:
There seems to be some sound in the video, but I am only getting a little zap sound in the first few milliseconds of the movie. Could there be something wrong with the samplerate?
***** VIDEOINPUT LIBRARY - 0.2000 - TFW2013 *****
SETUP: Setting up device 0
SETUP: Logitech Webcam C930e
SETUP: Couldn't find preview pin using SmartTee
SETUP: Default Format is set to 640 by 480
SETUP: trying requested format RGB24 @ 1280 by 720
SETUP: trying format RGB24 @ 1280 by 720
SETUP: trying format RGB32 @ 1280 by 720
SETUP: trying format RGB555 @ 1280 by 720
SETUP: trying format RGB565 @ 1280 by 720
SETUP: trying format YUY2 @ 1280 by 720
SETUP: Capture callback set
SETUP: Device is setup and ready to capture.
[notice ] ofSoundStream::listDevices:
[0] Default Device [in:2 out:2] (default in) (default out)
[1] Speakers (Realtek High Definition Audio) [in:0 out:2]
[2] Microfoon (Logitech Webcam C930e) [in:2 out:0]
[3] Microphone (Realtek High Definition Audio) [in:2 out:0]
[0] Default Device [in:2 out:2] (default in) (default out)
[1] Speakers (Realtek High Definition Audio) [in:0 out:2]
[2] Microfoon (Logitech Webcam C930e) [in:2 out:0]
[3] Microphone (Realtek High Definition Audio) [in:2 out:0]
[notice ] FFMpeg Command1: ffmpeg -y -f s16le -acodec mp3 -ar 44100 -ac 2 -i \\.\pipe\videoPipe505 -b:a 192k C:\Users\Frans\Desktop\movie2016-11-26-15-26-49-267.mp4_atemp.m4a
[notice ] Audio Pipe:
==========================
Audio Pipe Connected Successfully
==========================
[notice ] FFMpeg Command2: ffmpeg -y -r 30 -s 1280x720 -pix_fmt rgb24 -f rawvideo -i \\.\pipe\videoPipe46 -pix_fmt yuv420p -vcodec mpeg4 -b:v 2000k C:\Users\Frans\Desktop\movie2016-11-26-15-26-49-267.mp4_vtemp.mp4
[notice ] Video Pipe:
==========================
Video Pipe Connected Successfully
==========================
[verbose] Recording.
[verbose] ofxVideoRecorder: recDelta = 0.0147846. Not enough video frames for desired frame rate, copied this frame 6 times.
(...)
[verbose] ofxVideoRecorder: recDelta = 0.0258503. Not enough video frames for desired frame rate, copied this frame 2 times.
[warning] ofxAudioDataWriterThread: 15:26:53:867 - The thread is not running anymore let's get out of here!
[warning] ofxVideoDataWriterThread: 15:26:53:867 - The thread is not running anymore let's get out of here!
[notice ] FFMpeg Merge:
==============================================
Merge Command
==============================================
[notice ] FFMpeg Merge: ffmpeg -y -i C:\Users\Frans\Desktop\movie2016-11-26-15-26-49-267.mp4_vtemp.mp4 -i C:\Users\Frans\Desktop\movie2016-11-26-15-26-49-267.mp4_atemp.m4a -c:v copy -c:a copy -strict experimental C:\Users\Frans\Desktop\movie2016-11-26-15-26-49-267.mp4.mp4
[notice ] ofxVideoRecorder:
==============================================
Closed ffmpeg
==============================================
SETUP: Disconnecting device 0
SETUP: freeing Grabber Callback
SETUP: freeing Grabber
SETUP: freeing Control
SETUP: freeing Media Type
SETUP: removing filter NullRenderer...
SETUP: filter removed NullRenderer
SETUP: removing filter Sample Grabber...
SETUP: filter removed Sample Grabber
SETUP: removing filter AVI Decompressor...
SETUP: filter removed AVI Decompressor
SETUP: removing filter Smart Tee...
SETUP: filter removed Smart Tee
SETUP: removing filter Logitech Webcam C930e...
SETUP: filter removed Logitech Webcam C930e
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 0 disconnected and freed
@galsasson committed to the mentioned branch, but he has no bug tracker
Here is the resulting audio (m4a) file.
movie2016-11-26-16-16-06-576.mp4_atemp.zip
Hi @fransschreuder,
osx-and-win, except working on both mac and windows (apparently only video), is a terrible branch. It is basically a copy of almost the entire code with one version working on windows and one on mac with a giant #ifdef.
I didn't need sound so I'm not sure whats going on. One thing I did add is the option to separate input and output color spaces so you can ask for a yuv420 as the output. To do that I changed the order of some parameters, maybe that's the issue.
If I'll have some time in the next few days I will check it.
Hi @galsasson, thanks for your quick reply. I agree that this is not a final solution, but I don't think it's a terrible thing to do; this #ifdef. Later when everything works you can use a diff tool to merge the two parts, but for now you make sure you don't break the linux code.
I will be awaiting your changes, however before your input / output color format commit I also didn't get audio.
Anyway thanks for looking into it.
Closing as a duplicate of #16