mpv-player / mpv-player/mpv

[ffmpeg/encode] mpv doesn't encode video. Queue input is backward in time.

Open
#6,105 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hey guys, i wanted to convert/cut/crop a video into a webm as usual, but for some reason it stopped wrking the usual way. I already tried to run with the default config without success, so maybe you guys could help me further here.

###terminal output:

mpv test.ts --start=0:07:41.268 --end=0:07:50.000 --ovc=libvpx --oac=libvorbis --loop-file=no --vid=1 --aid=1 --sid=no --sub-ass-override=yes --sub-auto=exact --video-rotate=0 --vf-add=lavfi-colormatrix=bt709:bt601 --vf-add=lavfi-crop=662:1076:594:2 --vf-add=lavfi-scale=-1:720 --ovcopts-add=threads=4 --oset-metadata=title=%4%test --ovcopts-add=b=0 --ovcopts-add=crf=10 -o=./test-[07.41.268-07.50.000]-audio.webm --log-file=./log
Playing: test.ts
(+) Video --vid=1 (h264 1920x1080 29.970fps)
(+) Audio --aid=1 (aac 2ch 44100Hz)
[ffmpeg] swscaler: Warning: data is not aligned! This can lead to a speed loss
VO: [lavc] 443x720 => 443x720 yuv420p
[vo/lavc] Opening encoder: libvpx VP8 [libvpx]
[ao/lavc] Opening encoder: libvorbis [libvorbis]
[encode] Opening output file: ./test-[07.41.268-07.50.000]-audio.webm
[encode] Opening muxer: WebM [webm]
AO: [lavc] 44100Hz stereo 2ch floatp
AV: 00:07:42 / 00:50:44 (15%) A-V: 0.018 {0.0min 41.7fps 0.0MB}
[ffmpeg] libvorbis: Queue input is backward in time
AV: 00:07:43 / 00:50:44 (15%) A-V: 0.022 {0.1min 37.2fps 0.0MB}
[ffmpeg] libvorbis: Queue input is backward in time
AV: 00:07:43 / 00:50:44 (15%) A-V: 0.010 {0.1min 38.7fps 0.0MB}
[ffmpeg] libvorbis: Queue input is backward in time
AV: 00:07:45 / 00:50:44 (15%) A-V: 0.001 {0.2min 39.2fps 0.0MB}
[ffmpeg] libvorbis: Queue input is backward in time
AV: 00:07:45 / 00:50:44 (15%) A-V: 0.021 {0.3min 39.6fps 0.0MB}
[ffmpeg] libvorbis: Queue input is backward in time
[ffmpeg] webm: Application provided invalid, non monotonically increasing dts to muxer in stream 1: 4019 >= 4012
[encode] Writing packet failed.

Exiting... (End of file)

mpv version and platform

mpv 0.29.0 on windows

Reproduction steps

Happens with several recorded ts files.
They're rather large, so let me know if you really need them before i clunk up ressources somewhere.

Expected behavior

Convert part of the video into webm. Originally i used the mpv-webm extension to form up the command.

Actual behavior

Gives me an unusable 4.58kb big file

Log file

https://0x0.st/svP2.txt

I assume the problem lies with vorbis and if so any idea how to fix that?
Greetings Broky

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.

Research direction

Start by reproducing the reported mpv 0.29.0 Windows command with a recorded TS file and inspect the linked log around the libvorbis and WebM muxer errors. Trace the encode path involved in audio timestamps and verify the result by producing a usable WebM segment without the non-monotonic DTS failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.