[FFmpeg-user] Assistance with "pts have no value" error adding subtitle stream

Karen Norton nortok00 at gmail.com
Sat Apr 28 18:00:57 EEST 2018


Hello all,

I've done numerous searches for a resolution but haven't been able to find
anything and I've spent hours trying various command lines but to no luck.
I'm hoping someone here might have an answer.

I have a TV Series that is English dialogue but with a few areas in each
episode where the dialogue is Inuit and therefore needs subtitle
translation to English. The translation was missing so I thought I would
add it myself. I took full English subtitles and chopped them down to just
the parts that need translating and have embedded them as a separate
stream. Usually I just keep the subtitles as separate SRT files so adding
them as a stream was more just to see how the command line works because I
haven't tried it before.

This process has been working flawlessly for five files which are AVC/AAC
mp4s using the command line:

ffmpeg -i inputfile.mp4 -i subfile.srt -metadata media_type="10" -metadata
show="Show Name" -metadata season_number="1" -metadata title="Episode
Title" -metadata episode_id="Episode 10" -metadata episode_sort="10" -c
copy -c:s mov_text -metadata:s:s:0 language=eng outputfile.mp4

Then I came across a file which gave a string of these errors:
[mp4 @ 00000000048cd760] Application provided duration: 2398896000 /
timestamp: 2398896000 is out of range for mov/mp4 format
[mp4 @ 00000000048cd760] pts has no value
[mp4 @ 00000000048cd760] Application provided duration: 2405985999 /
timestamp: 2407613000 is out of range for mov/mp4 format
[mp4 @ 00000000048cd760] pts has no value
[mp4 @ 00000000048cd760] Application provided duration: 2410156998 /
timestamp: 2415371000 is out of range for mov/mp4 format
[mp4 @ 00000000048cd760] pts has no value
[mp4 @ 00000000048cd760] Application provided duration: 2422085997 /
timestamp: 2429218000 is out of range for mov/mp4 format
[mp4 @ 00000000048cd760] pts has no value
[mp4 @ 00000000048cd760] Application provided duration: 2426422996 /
timestamp: 2435307000 is out of range for mov/mp4 format

In my research to find a solution I came across someone who had this error
and it turned out they had one bad line in the subtitle where the end time
was earlier than the start time. I had hope this was my problem but no such
luck. I went through each line of the SRT file and it was fine. Fortunately
there were only 40 lines so this didn't take long.

What's interesting though is that I can embed the full SRT file with no
problem (the entire file is 430 lines long).

I ran a test where I split the SRT file in half. I could embed the first
215 lines fine and I could embed the last 215 lines fine. The particular
translation comes near the end of the show and runs from about the 39:00
minute mark and goes until about 50:00 minutes. The show is 54:00 minutes
long so I figured it was in the last 215 lines where the issue is so I
started to narrow this file down. I took out everything after the last
translation at the 50:00 minute mark and worked with everything before that
and it embedded fine so I knew it wasn't anything beyond the last
translation.

I then started to remove sections prior to 39:00 minutes which is where I
need it to start. I was able to get it down to translation at 34;00
minutes. If I remove one more line which puts it at about 38:00 minutes it
starts throwing the PTS errors so there's something from about 38:00
minutes to 50:00 minutes that's funky with the video file.

I started to go through the file almost millisecond by millisecond in a
file editor and didn't find anything weird (example timecode is corrupt) so
I'm at a loss as to what the problem is.

Am I correct so assume the number after the error part " Application
provided duration" (ex: 2398896000) is milliseconds? If so then if I have
done my math correct isn't this 666 hours? If so obviously something is
wrong there.

I tried doing a timestamp reset but I was grasping at straws and fumbling
around with:
ffmpeg -i inputfile.mp4 -c:v mpeg4 -q:v 2 -reset_timestamps 1 outputfile.mp4

but this didn't work.

Any help would be appreciated? Do I have to pull the file apart and remux
it in hopes of resetting everything? Is there another solution?

Let me know if you need more information (ex: console output, etc.)

Thanks.


Karen


More information about the ffmpeg-user mailing list