-
-
Notifications
You must be signed in to change notification settings - Fork 332
Capture Audio with Video Recording #147
Comments
Good point @danielrasmuson , I haven't considered this use case. I'm at SeleniumConf and after that on vacations so might not take a look at this within the next 2 weeks. If you find how to add audio support and make it optional through config params, like an environment variable passed to |
Okay did some more investigation this evening. When I run
When I list the audio drivers it reports no soundcards.
Any ideas on how to add a soundcard to this image? |
Thanks for investigating, can you check http://stackoverflow.com/questions/28985714/run-apps-using-audio-in-a-docker-container |
Hi @elgalu, I wanted to let you know I started a $50 bounty for this issue. https://www.bountysource.com/issues/43724935-capture-audio-with-video-recording |
@danielrasmuson I am interested to see how the tests for audio look like :) |
Hi @diemol, I'm interested in recording audio so I can record my google hangout meetings. Here is how I have my project setup package.json {
"name": "somename",
"version": "1.0.0",
"main": "index.js",
"repository": {},
"license": "MIT",
"dependencies": {
"selenium-webdriver": "^3.3.0"
}
} run.sh # Startup Selenium server
docker run --rm -d --name=grid -p 4444:24444 -p 5920:25900 \
--shm-size=1g -e VNC_PASSWORD=hola \
-e VIDEO=true elgalu/selenium
docker exec grid wait_all_done 30s
# Run selenium to capture video
node record-youtube-example.js
# Save the captured video
docker exec grid stop-video
docker cp grid:/videos/. videos
docker stop grid record-youtube-example.js
Running
Wait for run.sh to finish and open the completed |
I think @diemol was referring to how do you automate the audio testing, or you check it manually by actually listening to it? |
@danielrasmuson do you have Linux or Mac? Ubuntu? |
I have a Mac, but I will be running Linux in production. I can run on a virtual machine if solution is OS dependent. |
FYI I was able to get sound working on a fresh ubuntu image.
Then in a separate session
And |
@danielrasmuson managed to get this working, for anyone that needs this please follow his code. I'll close this here as, for now, we don't intend to support this feature. |
Hi, I know this is closed, but I tried to follow those steps with selenium-recorder and I didn't get any luck. Things that I have noticed:
I was wondering if the reason is the environment I'm working on? I'm working on mac with docker (virtualbox). Finally, @elgalu , I actually think it would be good to have this as a feature of this docker image 👍 Cheers |
Hi! thanks for your interest. This feature in particular is difficult to support, For instance, I wouldn't know how to add tests for it. A PR is welcome to add this, it should contain some test that works in TravisCI. |
I could try to create a PR if I find out how to make it work first 😅 Re tests, I understand that we could play a sound using selenium on Chrome and Firefox, record it with Ffmpeg and compare its fingerprint with the expected one? |
I know this is old and closed. I recently hit this issue myself and for everyone ever finding this place. I made a fork with video + audio recording support: https://github.com/v0idp/docker-selenium If you record a test. It will also record the audio now. |
thanks @v0idp great work! Could you send a PR ? just make it optional to activate, through an environment variable like the other existing options |
Hi @v0idp , this is error message:
Thanks to any help |
I'll take a look. Thanks |
@v0idp Thank you, I'm waiting for your answer ... |
The latest merge of my proposed PR fixes the "Cannot open display default, error 5" reported by @mohammadsaleh in #147 (comment) Hopefully, a workaround is to get the mkv video and perform the conversion outside of the docker container. Avoiding the conversion can be done using the Will probably file another issue for that specific problem. Hth, |
@olberger |
@v0idp I'm afraid I don't see where exactly to change to use libx265.... and could you elaborate on how precisely that would help ? I'm almost clueless wrt video codecs. |
@olberger I'm pretty new to ffmpeg myself and it's black magic to me. specially all the different codecs with all these different results. I was trying around different ones and libx265 seemed to work best for this case. |
Ok. Isee, @v0idp. All I could see is a size factor (4x) gain, but appart from that, I'm not sure that makes a significant change. Thx anyway. |
@olberger for me it fixed the conversion from mkv to mp4. but forwhatever reason it doesnt work anymore. It seems like I also have issues recording audio at all. anyone can confirm audio is working fine for you ? if yes what video and audio codecs are you using ? |
Can captured audio + video be transcoded to HLS? |
I'm interested in saving the audio played during a recording.
I've tried removing the
-an
argument whenffmpeg
is invoked, but didn't have any success.https://github.com/elgalu/docker-selenium/blob/master/video-rec/bin/start-video-rec.sh#L46
Any suggestions on how to accomplish this?
The text was updated successfully, but these errors were encountered: