Commit Graph

65 Commits (313921b50fda6bfd2942e45e3c9a0547ff01880b)

Author SHA1 Message Date
Girish Ramakrishnan 313921b50f Fix transcoding errors in readonly docker containers
ffmpeg seems to create some temporary files in the cwd. When PeerTube
is run in a read-only docker container, this causes all transcoding
to fail. As a workaround, we set the cwd to the configured tmp dir.
2020-10-23 14:51:44 +02:00
Chocobozzz dca0fe12ec
Fix resolution for portrait videos 2020-08-03 16:03:52 +02:00
Chocobozzz 1878224214
Handle webp images from youtube-dl 2020-07-10 14:54:11 +02:00
Chocobozzz 1c32067367
Fix HLS audio only transcoding 2020-05-05 16:27:46 +02:00
Chocobozzz a2b6ec7c3f
Fix video codec in HLS playlist 2020-04-03 14:07:00 +02:00
Chocobozzz 7b81edc854
Video file metadata PR cleanup 2020-03-10 16:18:29 +01:00
Rigel Kent 8319d6ae72
Add video file metadata to download modal, via ffprobe (#2411)
* Add video file metadata via ffprobe

* Federate video file metadata

* Add tests for file metadata generation

* Complete tests for videoFile metadata federation

* Lint migration and video-file for metadata

* Objectify metadata from getter in ffmpeg-utils

* Add metadataUrl to all videoFiles

* Simplify metadata API middleware

* Load playlist in videoFile when requesting metadata
2020-03-10 14:39:40 +01:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz c7f36e4f48
Fix transcoding 2020-01-29 16:54:52 +01:00
Rigel Kent 837666fe48 Add tests for video downscale framerate matching 2020-01-29 13:42:15 +01:00
Rigel Kent 06bcfbd9f7 Downsample to the closest divisor standard framerate 2020-01-29 13:42:15 +01:00
Chocobozzz 49c3bf6fa2
Fix duplicate HLS resolution in master playlist 2019-11-26 16:57:51 +01:00
Chocobozzz 52201311e1
Add codec information in HLS playlist 2019-11-26 16:25:36 +01:00
Chocobozzz 3a149e9f8b
Add audio only transcoding tests 2019-11-25 10:59:49 +01:00
frankdelange 5c7d650827
Add audio-only option to transcoders and player
This patch adds an audio-only option to PeerTube by means of a new transcoding configuration which creates mp4 files which only contain an audio stream. This new transcoder has a resolution of '0' and is presented in the preferences and in the player resolution menu as 'Audio-only' (localised). When playing such streams the player shows the file thumbnail as background and disables controls autohide.

Audio-only files can be shared and streamed just like any other file. They can be downloaded as well, the resulting file will be an mp4 container with a single audio stream.

This patch is a proof of concept to show the feasibility of 'true' audio-only support. There are better ways of doing this which also enable multiple audio streams for a given video stream (e.g. DASH) but as this would entail a fundamental change in the way PeerTube works it is a bridge too far for a simple proof of concept.
2019-11-25 10:59:47 +01:00
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00
Chocobozzz f6e0de3f48
Don't quick transcode with the wrong pixel format 2019-10-21 14:08:34 +02:00
Chocobozzz 9b474844e8 Add CLI plugins tests 2019-07-24 10:58:16 +02:00
Chocobozzz ad3405d087
Improve 4K video quality after transcoding 2019-06-06 14:45:57 +02:00
Chocobozzz 536598cfaf
Add audio support in upload 2019-05-16 17:16:47 +02:00
Chocobozzz 1600235a2f
Merge remote-tracking branch 'origin/pr/1785' into develop 2019-05-16 08:58:39 +02:00
Felix Ableitner 7ed2c1a46f fixed formatting, added test case 2019-05-04 13:06:43 +02:00
Felix Ableitner 5ba49f268d Dont transcode videos when it is not required (fixes #1780) 2019-05-04 03:19:49 +02:00
Chocobozzz 2fb5b3a55a
Relax videos list thumbnail api join 2019-04-24 16:26:22 +02:00
Chocobozzz 6dd9de95df
Move config in its own file 2019-04-11 13:45:39 +02:00
Chocobozzz 14aed608f5
Copy video/audio codec for HLS 2019-04-08 10:03:23 +02:00
Chocobozzz 7f8f8bdb4a
HLS is only supported by ffmpeg 4
Because of c8f625f529
2019-02-12 11:14:36 +01:00
Chocobozzz 4c280004ce Use a single file instead of segments for HLS 2019-02-11 09:13:02 +01:00
Chocobozzz 0920929696 Add hls support on server 2019-02-11 09:13:02 +01:00
Chocobozzz ef04ae20fe
Prefer avg_frame_rate to fetch video FPS 2019-01-17 14:03:32 +01:00
Chocobozzz 9ecac97be0
Fix crash regarding video stream issue 2018-12-12 08:55:56 +01:00
Chocobozzz 64e3e27053
Fix broken audio with transcoding 2018-12-11 17:48:14 +01:00
Chocobozzz d175a6f7ab
Cleanup tests imports 2018-11-19 17:08:18 +01:00
Rigel Kent 408f50ebc7
(ffmpeg) force pixel format yuv420p (#1394) 2018-11-12 15:43:51 +01:00
Chocobozzz cdf4cb9eaf
Fix transcoding 2018-10-18 10:44:16 +02:00
Chocobozzz 28e51e831b
Oup's 2018-10-17 17:58:21 +02:00
Chocobozzz 0229b014e0
Fix tests 2018-10-17 13:10:58 +02:00
Felix Ableitner bcf21a376f Set keyframe interval for transcoding (fixes #1147) (#1231)
* Set keyframe interval for transcoding (fixes #1147)

* remove -maxrate and old bitrate setter

* pass fps as parameter

* set type for ffmpeg param

* assign ffmpeg object
2018-10-17 10:15:38 +02:00
Rigel Kent e1d7b98bc7
fix automatic bitrate adjustment
The regression was introduced in
edb4ffc7e0 and forced a fixed bitrate per
resolution
2018-10-08 21:14:21 +02:00
Felix Ableitner edb4ffc7e0 Set bitrate limits for transcoding (fixes #638) (#1135)
* Set bitrate limits for transcoding (fixes #638)

* added optimization script and test, changed stuff

* fix test, improve docs

* re-add optimize-old-videos script

* added documentation

* Don't optimize videos without valid UUID, or redundancy videos

* move getUUIDFromFilename

* fix tests?

* update torrent and file size, some more fixes/improvements

* use higher bitrate for high fps video, adjust bitrates

* add test video

* don't throw error if resolution is undefined

* generate test fixture on the fly

* use random noise video for bitrate test, add promise

* shorten test video to avoid timeout

* use existing function to optimize video

* various fixes

* increase test timeout

* limit test fixture size, add link

* test fixes

* add await

* more test fixes, add -b:v parameter

* replace ffmpeg wiki link

* fix ffmpeg params

* fix unit test

* add test fixture to .gitgnore

* add video transcoding fps model

* add missing file
2018-10-08 16:26:04 +02:00
Chocobozzz e5565833f6
Improve redundancy: add 'min_lifetime' configuration 2018-09-24 13:38:39 +02:00
Chocobozzz 62689b942b
Correctly migrate to fs-extra 2018-08-27 16:23:34 +02:00
Chocobozzz eed24d26db Don't set a bitrate on unknown audio input 2018-08-14 15:53:06 +02:00
Chocobozzz 06215f15e0
Cleanup utils helper 2018-08-14 15:28:30 +02:00
Rigel Kent 7160878c4a adding tests for audio conversions 2018-08-01 10:57:13 +02:00
Jorropo 991feec9a3 ffmpeg auto thread
Set thread count to 0 and ffmpeg will chose automaticaly
2018-08-01 10:57:13 +02:00
Rigel Kent 19ca8ca939 fixing tests to deal with new transcoding parameters 2018-08-01 10:57:13 +02:00
Jorropo 80bc88c133 Nice ffmpeg to 15 and 2
Niceness 15 for video conversionNiceness 2 for image generation
(niceness 2 doesn't make it slower, just don't block servers and other
app)
2018-08-01 10:57:13 +02:00
Rigel Kent 4a5ccac5f1 fixing audio getter when video has no audio 2018-08-01 10:57:13 +02:00
Rigel Kent 4176e227cb Fixing #626 with ffmpeg's low default audio bitrate 2018-08-01 10:57:13 +02:00