server icon indicating copy to clipboard operation
server copied to clipboard

H264 recorder settings are ignored with v 2.3

Open TKooijmans opened this issue 5 years ago • 6 comments

Expected behaviour

When I try this with v2.3 settings are ignored and I get a 422 mp4 clip with 8 audio channels channel setting is set hd1080i50

ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast -filter:v format=pix_fmts=yuv420p -filter:v tinterlace=5 -codec:a aac -b:a 128k -ar:a 48k

If I do this ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast -filter:v format=pix_fmts=yuv420p -filter:v tinterlace=5 -codec:a aac -b:a 128k -ar:a 48k -filter:a pan=stereo| FL < FL + 0FC + 0BL + 0SL | FR < FR + 0FC + 0BR + 0SR

I get a mp4 clip with stereo audio.

Current behaviour

Video settings are ignored, but audio seems to work.

Steps to reproduce

try to record a mp4 file with yuv 420 and upper field setting

Environment

win10 server 2.3 sept 2019 build


afbeelding

TKooijmans avatar Nov 07 '19 17:11 TKooijmans

You can't use multiple filter arguments with ffmpeg. Try it with "-filter:v format=pix_fmts=yuv420p,tinterlace=5"

hreinnbeck avatar Nov 07 '19 17:11 hreinnbeck

I think scan type=mbaff is equivalent to interlaced scanning. It can be achieved with -flags:v +ildct+ilme ADD 1 FILE "myfile10.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast "-filter:v format=pix_fmts=yuv420p" -flags:v +ildct+ilme -codec:a aac -b:a 128k -ar:a 48k

vimlesh1975 avatar Nov 08 '19 04:11 vimlesh1975

THANKS YUV420 works now and it seems I got a interlaced file, but media info still reports progressive.. I use ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast -filter:v format=pix_fmts=yuv420p,tinterlace=4 -codec:a aac -b:a 128k -ar:a 48k

afbeelding

TKooijmans avatar Nov 08 '19 11:11 TKooijmans

Thanks vimlesh! That works! So to record a mp4 file with yuv 420 color and 2 channels audio we have to use this command ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast -filter:v format=pix_fmts=yuv420p,tinterlace=4 -flags:v +ildct+ilme -codec:a aac -b:a 128k -ar:a 48k -filter:a pan=stereo| FL < FL + 0FC + 0BL + 0SL | FR < FR + 0FC + 0BR + 0SR

the last part is to set only 2 audio channels for recording.

Much higher CPU load with CG2.3 CPU load with recording of a mp4 file seems to be a lot more higher with build 2.3 then with 2.1 Below a screen shot while recording a HD1080i50 channel with this command in CG2.1 ADD 1 FILE TestH264.mp4 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune film -crf 20 -x264opts tff=1

afbeelding

This is with CG2.3 with recorder command ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v ultrafast -filter:v format=pix_fmts=yuv420p,tinterlace=4 -flags:v +ildct+ilme -codec:a aac -b:a 128k -ar:a 48k -filter:a pan=stereo| FL < FL + 0FC + 0BL + 0SL | FR < FR + 0FC + 0BR + 0SR

afbeelding

TKooijmans avatar Nov 11 '19 14:11 TKooijmans

This sounds like it was resolved, and so just needs the documentation updated to help others in future?

Julusian avatar Feb 24 '20 10:02 Julusian

Not ok sofar, the mp4 file is not accepted by Adobe Premiere

TKooijmans avatar Feb 18 '21 16:02 TKooijmans

Not ok sofar, the mp4 file is not accepted by Adobe Premiere

covered by #1331

Julusian avatar Mar 06 '23 23:03 Julusian