Hi,
I use the following calls.
- extracting audio:
Code:ffmpeg -y -threads 8 -i "C:\Users\Selur\Desktop\HuffInterlaced.avi" -map 0:1 -vn -sn -ac 2 -ar 96000 -acodec pcm_s16le -f wav -map_metadata -1 -metadata encoding_tool="Hybrid 2023.12.23.1" "J:\tmp\iId_1_aid_1_2023-12-23@07_12_29_4610_01.wav"- reencoding video:
Video (stream&container) is properly flagged as interlaced.Code:ffmpeg -y -noautorotate -nostdin -threads 8 -i "C:\Users\Selur\Desktop\HuffInterlaced.avi" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv,setfield=tff -pix_fmt yuv444p -vsync 0 -top 1 -vcodec ffvhuff -coder 0 -context 0 -non_deterministic true -flags +ildct+ilme -top 1 -metadata encoding_tool="Hybrid 2023.12.23.1" "J:\tmp\HuffInterlaced_new_1_2023-12-23@07_12_29_4610_02.avi"- muxing audio&video:
Video container is flagged as progressive, video stream is flagged as interlaced.Code:ffmpeg -y -r 30000/1001 -fflags +genpts -i "J:\tmp\HuffInterlaced_new_1_2023-12-23@07_12_29_4610_02.avi" -top 1 -flags +ildct+ilme -i "J:\tmp\iId_1_aid_1_2023-12-23@07_12_29_4610_01.wav" -metadata encoding_tool="Hybrid 2023.12.23.1" -c:0 copy -c:1 copy -map 0:0 -map 1:0 -aspect 720:480 -r 30000/1001 -f avi "G:\Output\HuffInterlaced_new.avi"
My problem is that after the muxing call the container is flagged as progressive, video stream is flagged as interlaced.
I want both to be flagged interlaced, does someone know how to fix the muxing call (without having to reencode the video)?
(the calls need to be separate, so doing all the above in one call is no solution for me)
Cu Selur
+ Reply to Thread
Results 1 to 10 of 10
-
Last edited by Selur; 23rd Dec 2023 at 00:30.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Sadly, without '-f avi' I still get:
Code:Scan type : Progressive Original scan type : Interlaced
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Thanks.
Yeah, that would be a workaround for the broken .avi muxing support in ffmpeg.
Just using '-c:0 ffvhuff' is not enough, otherwise the default coder and context would be used.When muxing a huffuv videostream and an audiostream you always need to reencode if the huffyuv stream is interlaced.
=> any idea how to identify which coder and context was used? :/
Reencoding is needed since it's usually also includes Vapoursynth&co, I just simplified the whole process here to show the problem more easily.
Cu Selur
Ps.: I created an entry in the ffmpeg bug tracker: https://trac.ffmpeg.org/ticket/10761Last edited by Selur; 26th Dec 2023 at 02:07.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
On encode you got to do -vf setfield=tff or bff. Otherwise the actual video will be encoded as interlaced but the container won't have any flag and default to progressive or worse the wrong field order.
if all else fails read the manual -
Setting "-flags +ildct+ilme -top 1" should be enought, but I'll give it a try.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Like I thought, even when adding "-vf setfield=tff" and using:
Code:ffmpeg -y -noautorotate -nostdin -threads 8 -i "C:\Users\Selur\Desktop\HuffInterlaced.avi" -map 0:0 -an -sn -vf setfield=tff,zscale=rangein=tv:range=tv,setfield=tff -pix_fmt yuv444p -vsync 0 -top 1 -vcodec ffvhuff -coder 0 -context 0 -non_deterministic true -flags +ildct+ilme -top 1 -metadata encoding_tool="Hybrid 2023.12.23.1" "J:\tmp\HuffInterlaced_new_1_2023-12-23@07_12_29_4610_02.avi"
Code:Scan type : Progressive Original scan type : Interlaced
users currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
Patch Program Stream (MPG) file: progressive to interlaced
By Bwaak in forum Video ConversionReplies: 1Last Post: 4th Oct 2023, 01:33 -
FFMPEG change wrong "interlaced" tag back to progressive w/o re-encode
By Gwar in forum Video ConversionReplies: 2Last Post: 11th Dec 2022, 16:39 -
ffmpeg Telecine output is always Progressive, should it be Interlaced also.
By JN- in forum Newbie / General discussionsReplies: 16Last Post: 9th Jun 2022, 20:21 -
Interlaced Artifacts on Progressive Video?
By TheKCVault in forum Newbie / General discussionsReplies: 3Last Post: 28th Apr 2021, 17:52 -
ffmpeg changes interlaced to progressive
By SF01 in forum Video ConversionReplies: 12Last Post: 30th Mar 2020, 09:51