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

Upload audio file #170

Closed
Aluriak opened this issue Jan 5, 2018 · 29 comments
Closed

Upload audio file #170

Aluriak opened this issue Jan 5, 2018 · 29 comments

Comments

@Aluriak
Copy link

Aluriak commented Jan 5, 2018

Considering that:

  • some videos are mostly sound with a finite number of images (sometimes, none or just 1)
  • that user may want to only listen to a video, not watch the image
  • that transmitting only the sound may be bandwith saving

What about allowing user to disable/enable image, while keeping alive the sound ?
What about auto-disabling/enabling of image based on tab focus ?

@Chocobozzz
Copy link
Owner

I'm sorry I don't understand. What do you mean by "disable a video"? I guess the auto disabling video on tab unfocus is the web browser job.

@Aluriak
Copy link
Author

Aluriak commented Jan 5, 2018

Problem was about the difference of meaning between video and video. Now fixed using video for video as a image + sound media, and image for video as a image alone media.

@Chocobozzz
Copy link
Owner

Chocobozzz commented Jan 5, 2018

I think it would be overkill. Video codecs are very good in compression if the image is static. And I guess web browsers optimize things when the player is on another tab.

If you want to discuss this further, please come on IRC (#peertube on freenode).

@rigelk
Copy link
Collaborator

rigelk commented Mar 22, 2018

Apparently there seems to be some interest on framacolibri around using PeerTube for music - not changing the interface too much but rather providing a way to upload music formats directly.

si tu as un [format] son[ore], il est beaucoup plus simple de le téléverser directement que chercher […] un logiciel qui mette tous ça dans le même conteneur [video].

encoder brièvement une vidéo avec une image fixe ou bien garder juste l’audio et représenter les ondes de manière fixe aussi sur les instances qui implémenteraient l’audio

l’urgence reste malgré tout le dev des fonctionnalités “ordinaires” de peertube : chaîne, playlists

Since YouTube is cracking on music listening, we can expect this practice to move with its userbase.

@steckerhalter
Copy link

I wanted to suggest the addition of plain audio, so I'm glad this is already here. Someone suggested that it could be extended to all kinds of media formats, like images, documents, slide shows etc. What do you think about that?

@rigelk
Copy link
Collaborator

rigelk commented Apr 1, 2018

@steckerhalter I don't think we will extend to all media formats. Plain audio is already a stretch.

@steckerhalter
Copy link

@rigelk hmm, in what way is it a stretch if I may ask? A decentralized network for media, why limit it to just video and not go beyond the youtube model to do what youtube would never imagine? Of course audio is like the most obvious extension, then people could ditch soundcloud etc. From that proceed to images (people can ditch flickr etc.), then documents (start with pdfs maybe, ditch scribd), then slides (ditch slideshare.net) and on and on...

@rigelk
Copy link
Collaborator

rigelk commented Apr 1, 2018

@steckerhalter a reason could be that the interface is centered around videos. Adding other media types will force an interface change to some extent. You won't be ditching soundcloud anytime soon even with audio support in PeerTube, since the interface will only be adapted to videos. We don't have the notion of albums or interprets to group musics together, nor do we have a player bar staying through your browsing for instance.

I'm not saying this isn't possible. Someone might very well come up with a design proposal that fits all use cases, or we might have multiple interface layouts that the user can switch to depending on the media type he's looking for. I'm actually really thinking this is possible, but not anytime soon, and certainly not with our resources.

@steckerhalter
Copy link

You won't be ditching soundcloud anytime soon even with audio support in PeerTube, since the interface will only be adapted to videos. We don't have the notion of albums or interprets to group musics together, nor do we have a player bar staying through your browsing for instance.

Yes, but essential would be that someone can post music. I don't think the rest is that important.

I'm not saying it should happen soon or even that you should do it. It's just something to consider.

@steckerhalter
Copy link

for sound support I think the interface could be left almost as is if the image would be a spectral analysis like mediagoblin does it: https://mediagoblin.org/images/tour/audio_screenshot_cropped.png

@rigelk
Copy link
Collaborator

rigelk commented Apr 1, 2018

I'm not saying it should happen soon or even that you should do it. It's just something to consider.

Definitely.

I had never seen the spectral view of mediagobelin. Looks nice. Either that or putting a predefined image. Any other visualisation ideas?

@Aluriak
Copy link
Author

Aluriak commented Apr 1, 2018

There is some other ways. Here is a usage example for a python lib that is an accidental roadmap around these methods.

@ghost
Copy link

ghost commented Apr 2, 2018

(Sorry for opening another issue)

In our case we just want to benefit because of the webtorrent technology (I think there is no other project with this philosophy)

Use case: community web radios podcasts conscious about descentralization.

Now think about a good podcast of 40 MB becoming viral.

Please, don't stuck this because we don't have a "clear visualization for audio tracks", or because "this is just for videos". Workaround: if it is an audio just show this (or a default image indicating that this is sound):

2018-04-03-001533_896x45_scrot

And we are not proposing anything strange. This is what youtube does. And I'm sure nearly everyone on this room that uses youtube sometimes listens a track. Youtube forces you to put a video. And right now, you are forcing me (and the users in general) to convert a real audio file in a pseudo videos; and this would be an inefficient and silly situation in my opinion (sorry if it sounds disrespectful).

@steckerhalter
Copy link

@rigelk I guess it could work taking an iterative approach:

first just accept audio and put an audio placeholder image (something of this kind: https://openclipart.org/detail/168846/audio-speaker)

later add more possible options:

  • waveform: generate the waveform and put it as image, later evolve the interface and make the waveform interactive like https://wavesurfer-js.org/
  • image: add option to choose custom image
  • waveform + image combined: image is on the left ("cover"), waveform on the right

@PhieF
Copy link
Contributor

PhieF commented Apr 6, 2018

Hi

@yassinphilip has made something interesting about that, a simple script that changes an audio file to a video with waveforms
Resulting in this:
https://exode.me/videos/watch/e78a01ed-bafa-4feb-91c5-59d779e199f3

here is his script

https://framasphere.org/posts/7a1363b01bb001363f8a2a0000053625

If you don't have time to implement it I will have more free time at the end of april/may so I would be happy to have a look at this

@Insoleet
Copy link

Insoleet commented Jul 9, 2018

Ideally, an audio-only player could be cool for dumbphones. On this phone, if you want to listen to a conference, you have to remain with the screen turned on even if you don't watch it but only listen. If you turn off the screen, the video pauses.

NewPipe application has an "audio backend mode" for youtube videos, I think it would be great if it was native to Peertube.

@EmilJacobs
Copy link

I'll add my 2 cents and would love podcast support. I'm making a podcast myself and something like PeerTube looks very interesting.While I have to create a pseudovideo for publication on YouTube and could recycle that video... it would be much more natural to expect an audio-only medium to be audio-only.

@Chocobozzz Chocobozzz changed the title Sound only support Sound only player support Dec 13, 2018
@Chocobozzz Chocobozzz changed the title Sound only player support Upload audio file Dec 26, 2018
@zoalst
Copy link
Contributor

zoalst commented Feb 8, 2019

I'm interested in implementing or helping implement this functionality. I've already got a quick hack that works with mp3 files, tested on Firefox and Chrome.

@Chocobozzz
Copy link
Owner

Hi @zacharystenger,

I prefer to merge the preview file with the audio file uploaded by the user, so we still play videos on the front end. And it will be simpler :)

@zoalst
Copy link
Contributor

zoalst commented Feb 12, 2019

Hey @Chocobozzz,

I will look into the preview file code. If anyone wanted to see how I got it to work by treating the audio file like a video file, check out this branch. As far as I can tell it works just like a video would, there's is just a blank screen instead of images.

Disclaimer: this code was quickly hacked together just to see if this would work.

@Simon-L
Copy link

Simon-L commented Apr 16, 2019

I would also be interested in audio support, I looked at the source code last year.
I'm particularly curious to see how well the torrent-based system would hold up to music : smaller files, arranged in groups (album) based on metadata, even though it would make Peertube very similar to Funkwhale (https://funkwhale.audio/) feature-wise.
That is probably way more changes than what you are initially planning, maybe it could be made into a plugin? (also on the roadmap!)

As for visualization, Soundcloud waveform display is probably what most users are used to.
Also, Moodbar from Amarok/Clementine: https://en.wikipedia.org/wiki/Moodbar

@Chocobozzz
Copy link
Owner

Implemented in 536598c & 7b992a8

It has to be explicitly enabled by the admin. The user can then upload the audio file and peertube will merge the audio with the preview file to create the video.

@bristow
Copy link

bristow commented Jun 18, 2019

Implemented in 536598c & 7b992a8

It has to be explicitly enabled by the admin. The user can then upload the audio file and peertube will merge the audio with the preview file to create the video.

Hi @Chocobozzz

I don't see this button in admin interface. Can we upload audio file in PT v1.3.1 ?

Thanks for your hard job !

@Nutomic
Copy link
Contributor

Nutomic commented Jun 18, 2019

@bristow This seems to be the relevant option: https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example#L200

Edit: it seems to be enabled by default

@bristow
Copy link

bristow commented Jun 18, 2019

hum, i don't have this option :

https://framapic.org/4cJb4tUYNqcl/ZXGfvDB8PdE7.png

@Nutomic
Copy link
Contributor

Nutomic commented Jun 18, 2019

It seems to be only in the config file (see my link above), not in the web interface.

@Chocobozzz
Copy link
Owner

I don't see this button in admin interface. Can we upload audio file in PT v1.3.1?

No it will be in v1.4. We don't release additional features in patch versions, only bug fixes.
The option will be in the config file and the web interface.

@bristow
Copy link

bristow commented Jun 19, 2019

Nice 👍

@Dennis-Volk
Copy link

So Peertube is converting audio to video basically. The question is, how is the bitrate of the audio treated when transcoding. If a video is, say, 144, is the audio quality reduced? thank you.

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

No branches or pull requests