Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#9760 closed defect (invalid)

bad framed mpeg2 video coding

Reported by: nonos92234 Owned by:
Priority: critical Component: undetermined
Version: git-master Keywords: mpeg2video m2v
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by nonos92234)

in one day, afternoon, i found my old DVD Discs of an animation, so i wanted to have it in my drive.
i copied one of .VOB files and tried to compress it with ffmpeg, but decoded ffmpeg file has damaged frames
that it is not just that... i even tried to play it with ffplay.exe and result is same...
the thing is that all of players such as KMPlayer, Windows Media Player, mpv, and others can decode it correctly.
looks like ffmpeg mpeg2 video decoder and encoder library is a crappy one for people who wants to using it for mpeg2 video framing (both decoding and encoding), it is really better to replace current mpeg2video library of ffmpeg with another one that AviDemux program using it, Becuase AviDemux can decode mpeg2 video same as input

i attached a link for a small cut of origimal file (exact frame buffer that writed on DVD)
https://www.mediafire.com/file/k16yni1pv5i2l9q/mpeg2_vedio_sample.mpg/file [2.37mb]
you can decode and encode it and see what happens to video frames

i even tried to covert mpeg2 video from some games and broadcasting sources with ffmpeg and result is same! that means included mpeg2video codec in ffmpeg has problem

you can encode uploaded video that i attached its link with ffmpeg and compare it in visual way with bare eyes, (no need bare eyes thought) and see the problem
https://s6.uupload.ir/files/sample_mpeg2video_sz3q.jpg

in this example, red-lighing frames will turning to a mess after encoding, even if playing original input file in ffplay.exe that using same functions to play files
but thats not just that! all of files that decode from mpeg2video or convert to mpeg2video will ended up to this wierd lines between frame packets

Attachments (1)

mpeg2_vedio_sample.mpg (2.3 MB ) - added by nonos92234 2 years ago.

Change History (4)

by nonos92234, 2 years ago

Attachment: mpeg2_vedio_sample.mpg added

comment:1 by nonos92234, 2 years ago

Description: modified (diff)

comment:2 by Marton Balint, 2 years ago

Resolution: invalid
Status: newclosed

This is not a decoding issue, but a rendering issue. The video is interlaced, therefore you should use a deinterlacer to display it on progressive displays.

https://en.wikipedia.org/wiki/Interlaced_video

You can use the yadif filter to deinterlace interlaced video. E.g. ffplay -vf yadif mpeg2_vedio_sample.mpg. Or ffplay -vf yadif=1 for frame-per-field output with double frame rate.

comment:3 by Balling, 2 years ago

It very hard to correctly process interlaced red scenes, just saying.

Note: See TracTickets for help on using tickets.