asciinema-server icon indicating copy to clipboard operation
asciinema-server copied to clipboard

Audio support discussion

Open ku1ik opened this issue 12 years ago • 27 comments

Possibly uploaded by user and played through html5 audio tag.

ku1ik avatar Apr 04 '12 21:04 ku1ik

I don't think this is a good idea. asciiio should do one thing, do it simply, and do it well. If people want audio then asciiio is beyond the scope of what they need. Imo audio is just adding adding unnecessary complication.

icholy avatar Jun 07 '12 14:06 icholy

Thank you for stating your opinion. In my opinion it will complicate code, I agree with you. How much code it will require depends on the way it would be implemented. There are several ways this can be achieved, I'm not convinced by any of them yet.

I'm leaving this issue open to have a place for discussion about this feature.

ku1ik avatar Aug 15 '12 18:08 ku1ik

+1 for audio support. I would use ascii.io to create screencasts, but without audio it's useless for me.

tjeden avatar Oct 22 '12 11:10 tjeden

There are 2 options for this:

  1. allow user to upload any mp3/ogg with voiceover to his already recorded asciicast
  2. record microphone during recording of asciicasts, encode to mp3/ogg, send mp3 together with text data

Both have upsides and downsides.

Option 1: Upside: user can record voiceover any number of times, remove noise etc. Downside: it's too much hassle for someone who just wants to do some quick recording, who doesn't want to deal with this additional "audio work".

Option 2: Upside: recording simplicity stays the same for the user. Downsides: it limits options of editing/preparing audio. Also it adds dependencies on cross-platform audio recording lib (for example pyaudio) and on mp3/ogg encoding tool.

ku1ik avatar Nov 18 '12 18:11 ku1ik

This may warren its own issue/discussion, but what about integrating with popcorn.js? Also, the fact that long pauses are zipped to 5 seconds may become an issue if we want people talking over their presentation. Using popcorn.js we might allow the to record the audio after... and could even provide an option for if they wanted the time zipped up or not.

losingkeys avatar Feb 23 '13 02:02 losingkeys

i want it support audio

wxianfeng avatar Mar 18 '13 14:03 wxianfeng

I had add mp3 support. And I will support picture next time.

asmcos avatar Mar 26 '13 00:03 asmcos

I would love audio support so I could use it for screencasts as well. I think it should not be the responsibility of the client, as that sounds too complicated to add.

Uploading mp3/ogg (or even just providing a link to an audio file hosted elsewhere so you don't have to host it) would definitely work.

If you don't want to add all that to your codebase, at the very least it would be nice if the embedded player exposed hooks so I could sync it with an audio player myself.

mattboehm avatar Jan 24 '14 22:01 mattboehm

Audio support would be pretty cool. Most importantly, I think:

  • Hooks in the player to sync starting audio and the cast. This would make it possible the play audio on a blog even if not directly supported on asciinema.org.
  • A granular way to speed up portions of the cast to synchronize with audio, and reduce long pauses (or create pauses/stretch out the cast as needed).

My vote would be for option 1, upload audio later. This more closely matches how screencasts are made and doesn't make the recorder more complicated. Those that don't want to be bothered with audio could just add a textual transcript.

nathany avatar Mar 02 '15 23:03 nathany

I like what @mattboehm and @nathany suggest. Let's go this way.

I have added "hooks" to the TODO list of the player (https://github.com/asciinema/asciinema-player) and will prioritize this work.

ku1ik avatar Apr 24 '15 13:04 ku1ik

I just came here looking for some sort of sound syncing ability for the product (which I love BTW). Vimeo has JS hooks to enable actions to take place external to the player. I like the simplicity of the player, and it should stay true to that simplicity, but if the users want to do something fancy, the player should be able to output where it is at, what it is doing and whether it should be playing or not. These features enable far more functionality than sound alone!

kordless avatar Apr 24 '15 16:04 kordless

@sickill, after adding hooks to the player, would the next step be integrating with some audio hosting service, like soundcloud?

Or, do you think hosting the audio through asciinema.org would be best?

rharriso avatar Aug 10 '15 20:08 rharriso

@rharriso so the first step is to add hooks to the player ("on-start", "on-pause" etc), so you can control the audio playback yourself. For example you'll be able to add html5 audio tag and play/pause the audio file in sync with terminal playback.

Once the player has this, I'll be able to use it on asciinema.org. As for hosting the files, I don't plan to host them. asciinema.org is a free service, and while hosting the recordings doesn't cost me much, audio files would make it more expensive. So my current idea for this is to just let people specify audio file URL which will be used directly by audio tag. If soundcloud provides direct audio file URLs then you'll be able to use them.

ku1ik avatar Aug 11 '15 08:08 ku1ik

@sickill, Is this being worked on already? Or is it an open item?

rharriso avatar Aug 12 '15 03:08 rharriso

@rharriso atm I'm (slowly) working on the new version of the player here: https://github.com/asciinema/asciinema-player/tree/next I expect to finish this in the next couple of weeks, then I'll be working on the hooks.

ku1ik avatar Aug 12 '15 08:08 ku1ik

I'm in the process of moving, so I don't have any free time to contribute. But after I get where I'm going, I'll check in.

rharriso avatar Aug 14 '15 15:08 rharriso

@sickill, I'm settling in after my move, and have a little more time to work on side stuff. How are you doing on this? Do you want some help implementing it?

rharriso avatar Sep 01 '15 01:09 rharriso

@rharriso let's move the discussion about hooks to https://github.com/asciinema/asciinema-player/issues/12, as it needs to be done before we can add audio support to the site.

ku1ik avatar Sep 07 '15 08:09 ku1ik

As an update, https://github.com/asciinema/asciinema-player/issues/12 added the js events needed for for synching audio. So, we're not there yet but its getting close.

weitzman avatar May 05 '17 12:05 weitzman

@weitzman awesome! (and hi - fancy seeing you here :)) - does that mean there is a way to setup an audio feed next to asciinema now?

i mean i'm fine with recording audio using a separate tool and slapping it in there somehow, i just don't feel it's even possible with the current implementation...

anarcat avatar Oct 31 '17 19:10 anarcat

Hi. @anarcat. Fancy indeed.

It looks possible, but there isn't an example anywhere that I've found. The starting point would be the JS docs at https://github.com/asciinema/asciinema-player#controlling-the-player-programmatically

weitzman avatar Oct 31 '17 19:10 weitzman

riiight... so i guess it would probably be simpler to just code a audio player straight into the normal asciinema right here... otherwise you end up replicating the whole thing.

in other words, it's probably easier to pass in asciinema an audio file than try to extract the asciinema player out of asciinema and implement a separate audio player, considering the latter is basically standard HTML5...

anarcat avatar Oct 31 '17 19:10 anarcat

https://github.com/dhobsd/castty is an asciinema-compatible recorder and player with audio support. Demo: https://9vx.org/%7Edho/term/index.html

pfalcon avatar Jan 16 '18 22:01 pfalcon

@weitzman can you manually set the position/time of the player with javascript'?

F1LT3R avatar Oct 26 '18 19:10 F1LT3R

Guys, what is the status of this issue? Are you going to support this feature, any road map?

Bikraji avatar Jun 24 '19 07:06 Bikraji

https://github.com/dhobsd/castty is an asciinema-compatible recorder and player with audio support. Demo: https://9vx.org/%7Edho/term/index.html

For people looking into this alternative, my own findings are that Casttly is less advanced than asciinema with respect to the recording options. Also, I was not able to play a Casttly-cast with the Asciinema player (while the webpage says it is valid v1-format, so probably, I did something wrong). Last but not least, my audio recording on MacOS BigSur is unfortunately not playing at all.

Bottom line, Casttly doesn't seem an alternative for folks like me who like to annotate their recordings with audio.

If I'm not mistaken, this is the only asciinema-issue related to audio/voice-support that is still open. I would love to hear if there are any updates or users that managed to add audio to their recordings

data-harmonization avatar Jul 24 '21 20:07 data-harmonization

while indeed is best to keep asciinema simple and fast,

how about providing some placeholder code so that when we play the recording on a webpage, we'd get an audio track started at the same time. recording audio should be outside the scope of asciinema, as semi-pro's would like to edit, cut, refine, adjust the sound levels before going live with the track.

thanks 💯

cipy avatar Jan 28 '22 19:01 cipy