Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th January 2024, 13:42   #1  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
newer ffmpeg broken?

Using ffmpeg build at the end of last year:
Code:
ffmpeg version N-112974-gd324415563-g5256b2fbe6+2 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (Rev3, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --disable-doc --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      58. 33.100 / 58. 33.100
  libavcodec     60. 35.100 / 60. 35.100
  libavformat    60. 18.100 / 60. 18.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 14.100 /  9. 14.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
and:
Code:
ffmpeg_working -y -i "G:\TestClips&Co\test.avi" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -f yuv4mpegpipe j:\tmp\working.y4m
the output is fine.

using an ffmpeg verision I build yesterday:
Code:
ffmpeg version N-113316-g7f20bca34d-g564a15b2ee+2 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev3, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --disable-doc --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-gnutls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      58. 36.101 / 58. 36.101
  libavcodec     60. 37.100 / 60. 37.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 17.100 /  9. 17.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
and
Code:
ffmpeg -y -i "G:\TestClips&Co\test.avi" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -f yuv4mpegpipe j:\tmp\broken.y4m
the output is broken.
working:
Code:
YUV4MPEG2 W640 H352 F25:1 Ip A1:1 C420mpeg2 XYSCSS=420MPEG2 XCOLORRANGE=LIMITED
FRAME
QQQQQQQQTTTTTTTTTTTTTTTTVVVVVVVVVWWXXYYZXXXXXXXX\\\\\\\\[[[[[[[[\\\\\\\\]]]]]]]]^^^^^^^^ZZZZZZZZ]]]]]]]]ZZZZZZZZ^^]]\[[ZZZZZZZZZ[ZZZ[ZWTLMMNNOOPMNOPRSTUSSSSSSSSYXXWVUTTXXXYZZ[[[[[[[[[[]^^__``adeghhgedghiklmnnppopqtwyvwy|��������������������������������S$%!!#!*S~����������������~|{zzwrn}{eORdpvg[OQ^konrqoljgedcdefhikkjjjjjjjjijjjifdbccccccccdddddddd````````aaaaaaaaaaaaaaaabbbbbbbbccccccccffffffffggggffffhhhhhhhhjjkkllmmllllllllpqrtttssqqrstuuvyzz{|}~}}}}}}}}~��������������������������}|{zyxwvuutvvutsrqqqqponmlljjihgfeeddccbbaa`^]^_`_]]]]]]]]]]\\[[ZZZVUUTTSSRPPPPPPPPPPPPPPPPMMMMMMMMJJJJJJJJLKJIGFEDEEFGGHIIFFFFFFFFCCCCCCCCCBBAA@@?QQQQQQQQTTTTTTTTTTTTTTTTVVVVVVVVVWWXXYYZXXXXXXXX[[[[[[[[[[[[[[[[\\\\\\\\]]]]]]]]^^^^^^^^]]]]]]]]]]]]]]]][[[[[[[[ZZZZZZZZZZZZZZZZ[ZZZ[ZVTLMMNNOOPLLMOPQRSSSSSSSSSTTTTTTTTVVWWXYYY[[[[[[[[]^^__``a^`bdefedlllmmnnnssrqqsuvz{|}�������������������������������nD(
broken:
Code:
YUV4MPEG2 W640 H352 F25:1 Ip A1:1 C420mpeg2 XYSCSS=420MPEG2
FRAME
~~~~~~~~~~~~���������������~~~~~~~~~~��������������������������������������������������������������������������������������������������jjjjijidccccdddd````aaaaaaaabbbbccccffffggffhhhhjklmllllprtsqrtuyz|~}}}}~�������������|zxvuvusqqpnljigedcba`]__]]]]]\[ZVUTSPPPPPPPPMMMMJJJJLJGEEFGIFFFFCCCCCBA@
(output seems to be broken, even when using '-loglevel quiet' and '-f rawvideo')

the broken output looks like this:


both versions were build with mbas does anyone else have this issue with a new build ffmpeg? (trying to figure out whether this is a. a bug in ffmpeg b. a bug in mbas or c. something going awry with my build system)

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th January 2024, 13:49   #2  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 296
I confirm its really broken. FFmpeg becomes corporate low quality code dumpster. Stop using it, switch to gstreamer.
richardpl is offline   Reply With Quote
Old 12th January 2024, 14:25   #3  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
Hmm,... seems like it's related to '-vf zscale=rangein=tv:range=tv' without it, the output is fine, independent of the version.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th January 2024, 14:31   #4  |  Link
ProWo
Registered User
 
Join Date: Mar 2020
Posts: 315
There are problems with JSON too.
6.1.1. is ok.
ProWo is offline   Reply With Quote
Old 12th January 2024, 14:42   #5  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
Just noticed there was a fix for vf_zscale just now (https://git.ffmpeg.org/gitweb/ffmpeg...a8c2c6fe9c2a0a)
=> will build a new ffmpeg version and report later whether that commit fixed the problem
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th January 2024, 15:16   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
Yes, that commit fixes the problem.
Nice!

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th January 2024, 19:26   #7  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 997
What about ffmpeg v6 is producing different wavs than v5?

Code:
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav
VoodooFX is offline   Reply With Quote
Old 12th January 2024, 19:55   #8  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,846
Quote:
Originally Posted by VoodooFX View Post
What about ffmpeg v6 is producing different wavs than v5?

Code:
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav
add -flags +bitexact
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 12th January 2024, 20:09   #9  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 997
Quote:
Originally Posted by microchip8 View Post
add -flags +bitexact
Has no effect with both v5 & v6.

Code:
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le -flags +bitexact output.wav

Last edited by VoodooFX; 12th January 2024 at 20:14.
VoodooFX is offline   Reply With Quote
Old 12th January 2024, 23:33   #10  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 296
It is just "-bitexact"
richardpl is offline   Reply With Quote
Old 13th January 2024, 06:41   #11  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 997
Quote:
Originally Posted by richardpl View Post
It is just "-bitexact"
This has effect, but there are still same differences in wavs. [minus a diff in the headers]


Download the test files: https://we.tl/t-XyKI8cnSy4

Code:
ffmpeg -i original.aac -ar 16000 -ac 1 -c:a pcm_s16le output.wav
EDIT:
There are 30 one byte [1] differences. [Windows]
Btw, strangely, a Linux user reported 41 differences with same(?) Linux versions.

Last edited by VoodooFX; 13th January 2024 at 07:15.
VoodooFX is offline   Reply With Quote
Old 13th January 2024, 14:20   #12  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
got a question about bitexact:
Quote:
-bitexact (input/output)

Enable bitexact mode for (de)muxer and (de/en)coder
source: https://ffmpeg.org/ffmpeg-all.html#Advanced-options
What does this actually mean? For encoders, I get that the output might not be always deterministic, but especially for demuxers and decoders shouldn't the output always the same?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 13th January 2024, 15:35   #13  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 997
So, no one knows why wavs are different?
Those one byte differences propagate into the huge differences in AI. Found it when an user reported various hallucinations and I couldn't reproduce it.
VoodooFX is offline   Reply With Quote
Old 13th January 2024, 16:21   #14  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 303
Different compilers, different floating point optimizations, etc.

MP3 decoding is not required to be bit-exact and different decoders can produce slightly different results.
lvqcl is offline   Reply With Quote
Old 13th January 2024, 16:55   #15  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
Okay, but shouldn't demuxers be always output the same?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 13th January 2024, 17:33   #16  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 997
Quote:
Originally Posted by lvqcl View Post
Different compilers, different floating point optimizations, etc.

MP3 decoding is not required to be bit-exact and different decoders can produce slightly different results.
Actually it's about AAC, do the same stuff applies for it too?
VoodooFX is offline   Reply With Quote
Old 13th January 2024, 18:08   #17  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 303
Quote:
Originally Posted by VoodooFX View Post
Actually it's about AAC, do the same stuff applies for it too?
Yes. MP3, AAC, Vorbis, Opus, etc.
lvqcl is offline   Reply With Quote
Old 17th January 2024, 18:31   #18  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,957
That's not the only problem in the latest master.
This leads to a memory leak:

Quote:
ffmpeg.exe -hide_banner -i "raw_video.h264" -i "Doc Ljubicic.avs" -map 0:0 -c:v copy -map 1:1 -c:a pcm_s24le -ar 48000 -f mxf "semi-final_output.mxf"
yet it worked just fine in a version from 2020 I had lying around (lavc58.82.100)...
FranceBB is offline   Reply With Quote
Old 24th January 2024, 19:53   #19  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,340
Using:
Code:
ffmpeg -y -loglevel debug -noautorotate -nostdin -hwaccel auto -threads 1 -i "C:\Users\Selur\Desktop\Test\Doc Martin (S09E01) To The Lighthouse-001.mkv" -map 0:0 -an -sn -vf scale,zscale=rangein=tv:range=tv,scale -pix_fmt yuv420p -vsync 0 -f rawvideo NUL
ffmpeg version N-113317-g02fb3a775e-gbfa1b7577d+2 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev3, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --disable-doc --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-gnutls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      58. 36.101 / 58. 36.101
  libavcodec     60. 37.100 / 60. 37.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 17.100 /  9. 17.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
...
[AVFilterGraph @ 000002266992f780] Setting 'rangein' to value 'tv'
[h264 @ 0000022669b5e980] ct_type:1 pic_struct:0
[AVFilterGraph @ 000002266992f780] Setting 'range' to value 'tv'
detected 32 logical cores
[Parsed_scale_0 @ 0000022675c60540] w:iw h:ih flags:'' interl:0
[Parsed_scale_2 @ 000002266a05ea80] w:iw h:ih flags:'' interl:0
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'pix_fmt' to value '23'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'time_base' to value '1/1000'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'colorspace' to value 'bt709'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'range' to value 'tv'
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] Setting 'frame_rate' to value '24000/1001'
[h264 @ 0000022669b5e980] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0000022669b5e980] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0000022669b5e980] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
    Last message repeated 3 times
[graph 0 input from stream 0:0 @ 0000022669b5d1c0] w:1920 h:1080 pixfmt:nv12 tb:1/1000 fr:24000/1001 sar:1/1 csp:bt709 range:tv
[h264 @ 0000022669b5e980] ct_type:1 pic_struct:0
[format @ 00000226698b4040] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 000002266992f780] query_formats: 6 queried, 15 merged, 0 already done, 0 delayed
[Parsed_scale_0 @ 0000022675c60540] picking yuv420p out of 53 ref:nv12 alpha:0
[Parsed_zscale_1 @ 0000022675c5ff80] picking yuv420p out of 53 ref:yuv420p alpha:0
[Parsed_scale_0 @ 0000022675c60540] w:1920 h:1080 fmt:nv12 csp:bt709 range:tv sar:1/1 -> w:1920 h:1080 fmt:yuv420p csp:bt709 range:tv sar:1/1 flags:0x00000004
[Parsed_scale_2 @ 000002266a05ea80] w:1920 h:1080 fmt:yuv420p csp:unknown range:tv sar:1/1 -> w:1920 h:1080 fmt:yuv420p csp:unknown range:tv sar:1/1 flags:(null)
[Parsed_zscale_1 @ 0000022675c5ff80] code 3074: no path between colorspaces
    Last message repeated 31 times
[vf#0:0 @ 0000022669b54480] Error while filtering: Generic error in an external library
[vf#0:0 @ 0000022669b54480] Task finished with error code: -542398533 (Generic error in an external library)
[vf#0:0 @ 0000022669b54480] Terminating thread with return code -542398533 (Generic error in an external library)
[vost#0:0/rawvideo @ 0000022669d609c0] Encoder thread received EOF
full output: https://pastebin.com/4WUdrte4
works if I remove "-hwaccel auto"

am I missing something? Is it just me, or can others confirm this too?
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 24th January 2024 at 21:12.
Selur is offline   Reply With Quote
Old 25th January 2024, 12:57   #20  |  Link
Ritsuka
Registered User
 
Join Date: Mar 2007
Posts: 98
I don't think zscale supports biplanar formats, vf_zscale.c lists only planar ones.
Anyway, what's "zscale=rangein=tv:range=tv" supposed to do?
Ritsuka is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.