I use this command to reencode:
MediaInfo for the output:Code:ffmpeg -y -hide_banner -hwaccel auto -copyts -i INPUT.ts -vcodec libx264 -x264opts force-cfr:nal-hrd=cbr -profile:v high -level:v 40 -preset medium -b:v 1000k -maxrate 1000k -bufsize 1000k -flags +ilme+ildct -alternate_scan 1 -top 0 -acodec copy -bsf:v "filter_units=remove_types=6" -map 0 OUTPUT.ts
I want to remove the "Encoding settings" and "Writing library" fields from the MediaInfo report, this is what the 'filter_units' bitstream filter does and it works, but I found it removes these 2 fields as well and I want to keep them:Code:General ID : 1 (0x1) Complete name : C:\TV\output.ts Overall bit rate mode : Variable Overall bit rate : 1 379 kb/s Video ID : 256 (0x100) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference : 4 frames Codec ID : 27 Duration : 13 s 480 ms Bit rate mode : Constant Bit rate : 1 000 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : MBAFF Scan type, store method : Interleaved fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.019 Stream size : 1.69 MiB (76%) Writing library : x264 core 161 r3033 0d754ec Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=1 / bitrate=1000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1000 / vbv_bufsize=1000 / nal_hrd=cbr / filler=1 / ip_ratio=1.40 / aq=1:1.00 Audio ID : 257 (0x101) Menu ID : 1 (0x1) Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Codec ID : 3 Duration : 13 s 464 ms Bit rate mode : Constant Bit rate : 256 kb/s Channel(s) : 2 channels Sampling rate : 48.0 kHz Frame rate : 41.667 FPS (1152 SPF) Compression mode : Lossy Stream size : 421 KiB (19%) Menu ID : 4096 (0x1000) Menu ID : 1 (0x1) Duration : 13 s 440 ms List : 256 (0x100) (AVC) / 257 (0x101) (MPEG Audio) Service name : Service01 Service provider : FFmpeg Service type : digital television
Scan type, store method : Interleaved fields
Scan order : Top Field First
Any way how to do it ?
+ Reply to Thread
Results 1 to 4 of 4
-
-
You could always edit the data with a hex editor.
this is what the 'filter_units' bitstream filter does and it works, but I found it removes these 2 fields as well and I want to keep them
There is a list of the NAL units in H.264 over at https://yumichan.net/video-processing/video-compression/introduction-to-h264-nal-unit/ (under 'More about NAL Unit Type') which might help in case you don't know what NAL unit contains what.
Assuming the info you want to keep and you want to remove are not in the same NAL unit types, adjusting your filter_units should help.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
You could always edit the data with a hex editor.
Assuming the info you want to keep and you want to remove are not in the same NAL unit types, adjusting your filter_units should help.
Similar Threads
-
[FFMPEG] Is there a way to remove this part that FFMPEG puts in the meta?
By GEOLINK in forum Newbie / General discussionsReplies: 2Last Post: 1st Feb 2021, 17:51 -
ffmpeg remove metadata
By osmium in forum EditingReplies: 2Last Post: 18th Feb 2020, 12:57 -
Best way to remove watermark using FFMPEG?
By 21dresden21 in forum Video Streaming DownloadingReplies: 1Last Post: 12th Feb 2019, 09:47 -
Which codec and settings for still image videos when encoding with FFmpeg?
By konstantinusz in forum Video ConversionReplies: 4Last Post: 12th Dec 2016, 10:06 -
ffmpeg nvidia-gpu-accelerated encoding using NVENC - commandline settings
By hydra3333 in forum Video ConversionReplies: 3Last Post: 7th Sep 2016, 09:11