ffmpeg hangs when using -fflags +genpts

I'm trying to remux a .vob file (which I got using vobcopy) into a mp4 container (mkv would do it as well) using ffmpeg 4.2.4-ubuntu0.1. Initially the remuxing finished, but I got these errors:

[mp4 @ 0x560f9a37e5c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

and several thousand times

[mp4 @ 0x560f9a37e5c0] pts has no value

So I tried fixing it using -fflags +genpts:

ffmpeg -fflags +genpts -i 'video.vob' -c copy 'video.mp4'

After processing around 90000 frames ffmpeg gets somehow stuck (but the CPU keeps running on 100%) and can only terminated using kill combined with Ctrl+C.

I tried it with an other .vob file and ffmpeg hanged this time at an other point.


When creating the full debug log I noticed that after the program was aborted the output always shows the same last edited frame (92775). Here you can view it:

2

1 Answer

I fixed the problem by adding the +igndts flag:

ffmpeg -fflags +genpts+igndts -i 'video.vob' -c copy 'video.mp4'

It resulted in some error messages at the point where ffmpeg hung up earlier, but the created video file was fine.

[mp4 @ 0x56482f355a00] Invalid DTS: 333993600 PTS: 0 in output stream 0:0, replacing by guess
[mp4 @ 0x56482f355a00] Non-monotonous DTS in output stream 0:0; previous: 334018800, current: 334018800; changing to 334018801. This may result in incorrect timestamps in the output file.

I'm not sure what caused the problem and what +igndts does to fix it, but I'm happy that it works.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like