vo/lavc youtube encoding failed when --start specified

Open
#14,091 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c

Research direction

Start by reproducing the supplied mpv command with --start, --end, --ovc=libwebp, and the linked log file. Trace how the youtube input and lavc encoding handle a nonzero --start, comparing it with runs that omit --start. Done means the command successfully produces the requested WebP segment when --start is specified.

Written by the indexing model from the issue text.

Description

down-upstream:ffmpeg os:linux
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

Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mpv-player/mpv

All issues in mpv-player/mpv

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.