ffmpeg yuvj422p彩色电影转换avi2ogv

时间:2017-07-27 11:15:32

标签: ffmpeg yuv avi file-conversion

将avi视频转换为ogv时,输出文件中存在颜色问题。 我该如何解决这个问题? normal colors altered colors

实际上问题的一部分来自玩家 - 这么弱的问题

使用ffmpeg-3.3.2-1.mga6.tainted的命令:

ffmpeg -i dscn0146.avi -pix_fmt yuv422p -s 640x480 dscn0146_hq.ogv -y

输入元数据:

Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'dscn0146.avi':
  Metadata:
    encoder         : 
    maker           : NIKON
    model           : COOLPIX S3500
    creation_time   : 2017-07-22 12:09:06
  Duration: 00:00:07.33, start: 0.000000, bitrate: 11091 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 10770 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> theora (libtheora))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis))

正常处理,但会发出警告:

[swscaler @ 0xd3c3a0] deprecated pixel format used, make sure you did set range correctly

输出元数据:

Output #0, ogv, to 'dscn0146_hq.ogv':
  Metadata:
    model           : COOLPIX S3500
    maker           : NIKON
    encoder         : Lavf57.71.100
    Stream #0:0: Video: theora (libtheora), yuv422p(progressive), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.89.100 libtheora
      model           : COOLPIX S3500
      maker           : NIKON
    Stream #0:1: Audio: vorbis (libvorbis), 22050 Hz, mono, fltp
    Metadata:
      encoder         : Lavc57.89.100 libvorbis
      model           : COOLPIX S3500
      maker           : NIKON

1 个答案:

答案 0 :(得分:0)

此工作代码

ffmpeg -i totoa.avi -c:v libtheora -q:v 10 -c:a libvorbis -q:a 5 -s 640x480 -y toto.ogv