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

vo/lavc youtube encoding failed when --start specified #14091

Open
witaway opened this issue May 8, 2024 · 4 comments
Open

vo/lavc youtube encoding failed when --start specified #14091

witaway opened this issue May 8, 2024 · 4 comments
Labels

Comments

@witaway
Copy link

witaway commented May 8, 2024

Important Information

  • MPV 0.38.0 from Flatpak
  • Fedora 40
  • NVidia GTX 1650 Ti (mobile), nouveau
  • AMD Ryzen™ 5 4600H with Radeon™ Graphics × 12

Reproduction steps

I tried to download a part of youtube video and convert it into webp (so I could get a little snapshot for Anki).
After a little research I found out that command causing the problem is:

mpv 'https://www.youtube.com/watch?v=Pv0iVoSZzN8' --start=100.875 --end=103.632 --loop-file=no --keep-open=no --ovc=libwebp --of=webp --ofopts-add=loop=0 --audio=no --no-sub --no-ocopy-metadata --ovcopts-add=lossless=0 --ovcopts-add=compression_level=6 --ovcopts-add=quality=25 --vf-add=scale=-2:200:flags=lanczos --vf-add=fps=10 -o='/home/witaway/Downloads/video123.webp'

  • When I removed both --start and --end options, command executed successfully and returned big webp with content of the full video.

  • When I removed only --start option, with any --end option command still works as expected

  • Maximum working --start is different for different videos, for example for video given above it's about ~3.8 seconds.

It feels like ytdl cannot download the video in the case, but I'm not really sure :/

Logs (set --log-file=/dev/stdout):

io mpv Mpv mpv https.txt

@lcksk
Copy link
Contributor

lcksk commented May 20, 2024

This is actually a known issue in ffmpeg, and you can find a solution here.

@witaway
Copy link
Author

witaway commented May 20, 2024

@lcksk Big thank you! I guessed it wasn't the MPV.

Do I understand correctly that in order for this functionality to start working in MPV, I need to patch Ffmpeg in my system?

It looks confusing that the Issue has not been fixed, although it is 6 years old and there are proposed patches

@lcksk
Copy link
Contributor

lcksk commented May 21, 2024

@lcksk Big thank you! I guessed it wasn't the MPV.

Do I understand correctly that in order for this functionality to start working in MPV, I need to patch Ffmpeg in my system?

yeah

It looks confusing that the Issue has not been fixed, although it is 6 years old and there are proposed patches

The patch might need to be rebased, but the good news is that it does indeed resolve the current issue.I suspect that the issue might be unresolved because the patch author might have left, hence the bug remains pending.

@witaway
Copy link
Author

witaway commented May 21, 2024

@lcksk May it be reasonable to add a short note in MPV docs --start section about the Issue? Buggy ffmpeg version and link to Issue/Patch (without any warranties)

It'd resolve some false expectations and prevent appearing new same issues here, because looks like bug is common enough

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

No branches or pull requests

2 participants