Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1835 closed defect (wontfix)

-sameq no longer working

Reported by: ramitb Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords: regression sameq
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes


Summary of the bug: With the newer versions of ffmpeg the -sameq option no longer work, it says unrecognized option.
Has this been removed intentionally or accidentally?
If intentionally how can one replicate the functionality (copy does not work since I'm transcoding from mpeg4 to mpeg2 and use the same quantizers to keep a relatively good quality of transcoding).

PS - I'm setting this to important since it's a regression bug. All my conversions rely on this flag for a successful conversion

How to reproduce:
ffmpeg.x86 -i Revolution_KGWDT_-tmp.wtv -vcodec mpeg2video -sameq -an test.ts

ffmpeg version N-45279-g1a104bf Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 10 2012 19:19:16 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable
-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-l
ibfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroed
inger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 74.100 / 51. 74.100
  libavcodec     54. 65.100 / 54. 65.100
  libavformat    54. 31.100 / 54. 31.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 19.102 /  3. 19.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mpeg2video @ 003cb9e0] mpeg_decode_postinit() failure
    Last message repeated 20 times
Input #0, wtv, from 'Revolution_KGWDT_-tmp.wtv':
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Revolution
    WM/SubTitle     : The Plague Dogs
    WM/SubTitleDescription: As Charlie and Miles travel with Nora in hope of meeting up with Maggie and Aaron, Nate trac
ks their every move; unforeseeable challenges await the gang.
    genre           : Drama;General;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Billy Burke/Tracy Spiridakos/Daniella Alonso/Giancarlo Esposito/Tim Guinee/Maria Howell/David Lyon
s/Elizabeth Mitchell/Zak Orth/J.D. Pardo/Anna Lise Phillips/Graham Rogers;;;Michael Mosley
    service_provider: KGWDT
    service_name    : KGWDT (KGW-DT)
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 8
    WM/MediaOriginalChannelSubNumber: 1
    WM/MediaOriginalBroadcastDateTime: 2012-10-08T07:00:00Z
    WM/MediaOriginalRunTime: 35371092443
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    WM/MediaIsLive  : false
    WM/MediaIsTape  : false
    WM/MediaIsDelay : false
    WM/MediaIsSubtitled: false
    WM/MediaIsMovie : false
    WM/MediaIsPremiere: false
    WM/MediaIsFinale: false
    WM/MediaIsSAP   : false
    WM/MediaIsSport : false
    WM/ParentalRating: TV-14
    WM/Provider     : MediaCenterDefault
    WM/VideoClosedCaptioning: true
    WM/WMRVEncodeTime: 2012-10-09 05:02:02
    WM/WMRVSeriesUID: !MCSeries!274690502
    WM/WMRVServiceID: !MCService!28459543
    WM/WMRVProgramID: !MCProgram!280618392
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 3
    WM/WMRVOriginalSoftPrePadding: 300
    WM/WMRVOriginalSoftPostPadding: 60
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: true
    WM/MediaThumbType: 3
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 198
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 9
    WM/MediaThumbRatingLevel: 14
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 16
    WM/MediaThumbAspectRatioY: 9
    WM/MediaThumbTimeStamp: -4616189618054758400
    Duration        : 35379016565
    WM/WMRVEndTime  : 2012-10-09 06:01:00
    WM/WMRVBitrate  : 9.083289
    WM/WMRVKeepUntil: -1
    WM/WMRVActualSoftPrePadding: 537
    WM/WMRVActualSoftPostPadding: 60
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : false
  Duration: 00:58:57.25, start: 2.204944, bitrate: 11638 kb/s
    Stream #0:0[0x12]: Video: mpeg2video (Main), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 24000 kb/s, 329.67 fps, 29.97 tb
r, 10000k tbn, 59.94 tbc
    Stream #0:1[0x13](eng): Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:2[0x14](spa): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0x15]: Subtitle: eia_608
    Stream #0:4[0x0]: Attachment: mjpeg
      title           : TV Thumbnail
Unrecognized option 'sameq'
Failed to set value '-an' for option 'sameq'

Change History (8)

comment:1 by Elon Musk, 11 years ago

Recent ffmpeg just ignore -sameq option. Are you sure that such option made any difference?

comment:2 by ramitb, 11 years ago

A huge difference in quality. Without it the video would be blocky and full of artifacts, with it the quality was pretty close to the original.

Can it be reintroduced please? if not atleast let us know what options can be set to replicate the functionality.

comment:3 by Elon Musk, 11 years ago

That option was designed only for same codec -> same codec.

It gave you better results by pure luck. Instead just use quant with some small value.

comment:4 by Carl Eugen Hoyos, 11 years ago

Keywords: regression added
Priority: importantminor
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

-sameq is broken since 158c7f0.
Considering the time elapsed since, it was probably a good idea to remove the option;-)

Use -qscale 2 (it also works with old versions), it should have a very similar effect, use -qscale 0 (which also works with old versions) to get the identical effect (very old MEncoder documentation recommends -qscale 2 over -qscale 0).

comment:5 by Stefano Sabatini, 11 years ago

Analyzed by developer: set
Component: undeterminedFFmpeg
Keywords: sameq added
Resolution: wontfix
Status: openclosed

Given the fact that the option was broken, there are equivalent options, and there is no will to re-introduce it, I'm closing the ticket.

Also consider to use the qmin and qmax options.

comment:6 by Carl Eugen Hoyos, 11 years ago

I forgot to add that I suspect it has worked for jpg / mjpeg at least to some degree.

comment:7 by ramitb, 11 years ago

Why not leave the sameq option in and translate it to -qscale 0 for compatability purposes?
This change I'm sure will break a lot of existing software out there (I know one I'm using for sure will break).

in reply to:  7 comment:8 by Clément Bœsch, 11 years ago

Replying to ramitbhalla:

Why not leave the sameq option in and translate it to -qscale 0 for compatability purposes?

Because this was never meant to be a "same quality" option.

This change I'm sure will break a lot of existing software out there (I know one I'm using for sure will break).

Updating your scripts to make them use -qscale 0 will work with newer and older versions, and it will likely actually also "fix" them.

Note: See TracTickets for help on using tickets.