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

HLS not compatible with ffmpeg 4.4 #3990

Closed
SimplyCorbett opened this issue Apr 19, 2021 · 11 comments
Closed

HLS not compatible with ffmpeg 4.4 #3990

SimplyCorbett opened this issue Apr 19, 2021 · 11 comments
Labels
Component: Transcoding Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor

Comments

@SimplyCorbett
Copy link

Describe the current behavior

HLS videos do not play after transcoding

Steps to reproduce:

  1. Install ffmpeg 4.4
  2. Import a youtube video with HLS only. Selected resolutions of 480p and 1080p.
  3. Try playing, get stuck with a loading circle

Describe the expected behavior

Videos transcode and play correctly

Additional information

  • PeerTube instance:

    • URL: vidrot.com
    • version: 3.1.0
    • NodeJS version: 15
    • Ffmpeg version: 4.4
  • Browser name, version and platforms on which you could reproduce the bug: firefox with ublock and bitwarden

@ghost
Copy link

ghost commented Apr 19, 2021

This might be #3657 coming back

@SimplyCorbett
Copy link
Author

Will this be fixed with the upgraded hls.js v1.0 player?

@Chocobozzz Chocobozzz added Status: To Reproduce Likely a bug but needs reproduction and/or extended log from the issuer Component: Transcoding Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor Status: Blocked ✋ Somehow, somewhere *else*, something has gone very wrong. Until they fix it we're stuck. and removed Status: To Reproduce Likely a bug but needs reproduction and/or extended log from the issuer labels May 5, 2021
@Chocobozzz
Copy link
Owner

This is a bug in ffmpeg. See https://trac.ffmpeg.org/ticket/9205 & https://trac.ffmpeg.org/ticket/9193

@vincib
Copy link

vincib commented May 8, 2021

Hi. I had the same issue, and fixed it by replacing ffmpeg 4.4 with ffmpeg 4.1 ( by clicking "old release" in this page for linux https://johnvansickle.com/ffmpeg/ )

Then removed all HLS playlist (you may want to remove only the broken ones) with rm -f /var/www/peertube/storage/streaming-playlists/hls/* (dangerous command)
and asked for the reencoding of all HLS (you may want to reencode only the broken ones)

cd /var/www/peertube/peertube-latest
for uuid in $(ls /var/www/peertube/storage/videos/|grep 240|sed -e 's/-240.mp4//') ; do echo $uuid; NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v  $uuid ;  done```

@SimplyCorbett
Copy link
Author

This appears to be fixed in the git version of ffmpeg. Closing!

@Chocobozzz
Copy link
Owner

Just reopening to track a new ffmpeg stable version and notify people that subscribed to the issue :)

@ghost
Copy link

ghost commented Oct 24, 2021

Hi. I had the same issue, and fixed it by replacing ffmpeg 4.4 with ffmpeg 4.1 ( by clicking "old release" in this page for linux https://johnvansickle.com/ffmpeg/ )

Then removed all HLS playlist (you may want to remove only the broken ones) with rm -f /var/www/peertube/storage/streaming-playlists/hls/* (dangerous command) and asked for the reencoding of all HLS (you may want to reencode only the broken ones)

cd /var/www/peertube/peertube-latest
for uuid in $(ls /var/www/peertube/storage/videos/|grep 240|sed -e 's/-240.mp4//') ; do echo $uuid; NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v  $uuid ;  done```

On Arch Linux, I compiled ffmpeg with this patch. To fix the broken playlists, running this as root fixed it: (Be careful since this may delete your videos!)

rm -r /var/lib/peertube/storage/hls/*
cd /usr/share/webapps/peertube
for uuid in $(ls /var/lib/peertube/storage/videos/|grep 1080|sed -e 's/-1080.mp4//') ; do echo $uuid; NODE_CONFIG_DIR=/etc/peertube NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v  $uuid ;  done

@KokaKiwi
Copy link

KokaKiwi commented Nov 3, 2021

It seems the latest ffmpeg release (4.4.1) from 9 days ago (2021-10-23) includes the fix
Now i suppose it's a matter of it being available downstream on distros and stuff

@Chocobozzz
Copy link
Owner

Thanks @KokaKiwi I missed that release. I'll test it when it will be available on Arch.

@ghost
Copy link

ghost commented Nov 6, 2021

ffmpeg 4.4.1 is now in Arch official repos. I haven't had a chance to test it yet but I expect it'll work.

@Chocobozzz
Copy link
Owner

I can confirm 4.4.1 is correctly working. Thanks!

@Chocobozzz Chocobozzz removed the Status: Blocked ✋ Somehow, somewhere *else*, something has gone very wrong. Until they fix it we're stuck. label Nov 8, 2021
@bolt-blue bolt-blue mentioned this issue Nov 26, 2021
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Transcoding Type: Bug 🐛 Confirmed bug, at least replicated once by another contributor
Projects
None yet
Development

No branches or pull requests

4 participants