mpv-player / mpv-player/mpv

Encoding fails if no cache-initial is used (in some cases)

Open
#4,917 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

mpv version and platform

git master as of 2017-09-24
combined with youtube-dl from 2017.09.15

Reproduction steps

Run:

mpv -profile enc-to-nok-n900 http://www.ardmediathek.de/tv/dings-vom-dach/dings-vom-dach-ganze-Sendung/hr-fernsehen/Video\?bcastId\=14847140\&documentId\=41161108  -o 2017-03-05.mpg

I explicitly renamed by ~/.mpv/config and encoding-profiles.conf.

This fails (see "actual behaviour" below), while running:

mpv -profile enc-to-nok-n900 http://www.ardmediathek.de/tv/dings-vom-dach/dings-vom-dach-ganze-Sendung/hr-fernsehen/Video\?bcastId\=14847140\&documentId\=41161108  -o 2017-03-05.mpg --cache-initial=2000

i.e. just adding --cache-initial=2000, makes things work.

Expected behavior

Things work.

Actual behavior
Playing: http://www.ardmediathek.de/tv/dings-vom-dach/dings-vom-dach-ganze-Sendung/hr-fernsehen/Video?bcastId=14847140&documentId=41161108
Can not open external file http://www.ardmediathek.de/subtitle/140626.
 (+) Video --vid=1 (*) (h264 960x540 25.000fps)
 (+) Audio --aid=1 --alang=deu (*) (aac 2ch 48000Hz)
Opening video filter: [lavfi graph=scale=floor(min(min(800\,dar*480)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(800/dar\,480)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1]
VO: [lavc] 800x450 yuv420p
[encode-lavc] option --ofps not specified and fps could not be inferred, using guess of 24000/1
[encode-lavc] Opening video encoder: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libx264]
[ffmpeg] libx264: MB rate (34800000) > level limit (40500)
[encode-lavc] no audio stream succeeded - invalid codec?
[encode-lavc] vo-lavc: encoded 0 bytes
[encode-lavc] ao-lavc: encoded 0 bytes
[vo/lavc] NOTE: skipped initial video frame (probably because audio is not there yet)


Exiting... (Quit)
Log file

Failing log file:
http://sprunge.us/jheD

With cache, things work:
http://sprunge.us/XNRT

Sample files

I think the URL I used is publicly accessible for free (at least it is in Germany, not sure if they have geoblocking).

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

Reproduce the command from the issue with and without --cache-initial=2000, then compare the two linked logs and the encoding profile enc-to-nok-n900. Trace the cache and encoding entry points implicated by the differing behavior; done means the reported URL encodes successfully without explicitly setting --cache-initial and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.