Opened 3 years ago

Closed 3 years ago

#2870 closed enhancement (fixed)

Outdated players only support yuv420p mpeg2video

Reported by: xnejp03 Owned by:
Priority: wish Component: ffmpeg
Version: git-master Keywords: mpeg2video
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

It seems that for some time now (for about 6 months) FFmpeg cannot produce a valid mpeg2video file from mjpeg source. The result plays correctly in ffplay and VLC but shows only large pink-ish pixels on some TVs (reproduced on Sony and Panasonic). This use to work before.

ffmpeg -v 9 -loglevel 99 -i mjpeg.AVI -c:v mpeg2video -c:a mp2 -f mpegts d:\tmp\out.mpg

This is reproducible with pretty much any mjpeg videos.

Attachments (1)

ffmpeg-20130816-003631.zip (44.2 KB) - added by xnejp03 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by xnejp03

comment:1 Changed 3 years ago by cehoyos

Please provide an input file.

comment:2 Changed 3 years ago by xnejp03

Uploaded file mjpeg_pink_artifacts.avi to the FTP

Last edited 3 years ago by xnejp03 (previous) (diff)

comment:3 Changed 3 years ago by cehoyos

  • Component changed from undetermined to FFmpeg
  • Keywords mpeg2video added
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from MJPEG to MPEG2 produces pixelated video to Outdated players only support yuv420p mpeg2video
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

Please test the following:

$ ffmpeg -i mjpeg_pink_artifacts.avi -vcodec mpeg2video -pix_fmt yuv420p -vb 800k out.mpg

or

$ ffmpeg -mjpeg_pink_artifacts.avi -vb 800k out.mpg

(The bitrate setting is there only because I think the default is slightly to small, it will also work without, producing bad quality output.)

I will copy e4f5aa5e for this use case if nobody beats me.

comment:4 follow-up: Changed 3 years ago by xnejp03

Yes, that fixes it. So shall I add this option to all my commands where target is mpeg2video (just to stay on the safe side)?

comment:5 in reply to: ↑ 4 Changed 3 years ago by cehoyos

Replying to xnejp03:

Yes, that fixes it. So shall I add this option to all my commands where target is mpeg2video (just to stay on the safe side)?

Only to the ones where quality loss is no problem / where you need compatibility with outdated players. ffmpeg by default tries to keep as much information (quality) as possible, if you need a different behaviour, you have to specify the output pixel format you want.

comment:6 Changed 3 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

A warning is printed since 47f9a5b.

Note: See TracTickets for help on using tickets.