hi all and happy new year
i am encoding most of my Animation series to 265 high 10 so it reduce the size and almost keep same quality so i hope that i am doing right with the command i'm writing down
the point is that most of them has soft sub and fonts attached and i do the step as follow
in windows
then i do in mkvmerge the followingfor %i in (*.mkv) do ffmpeg -i %i -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 %~ni.mp4
it is easy but extracting the sub from the orginal is hard and manual using MKV toolnix extractorfor %%a in (*.mp4) do ("C:\Program Files\MKVtoolnix\mkvmerge.exe" -o "muxed\%%~na.mp4" --attachment-name "adobe.ttf" --attachment-mime-type application/x-truetype-font --attach-file "D:\project\adobe.ttf" "%%~na.mp4" --language "0:ara" "%%~na.ass")
also when i wanted to do the same in Linux i have no idea what to do or in fact the seedbox may not having mkvmerge so if there is one step in ffmpeg in Linux will be great
my command in Linux after logging in SSH as follows
can anyone help to transfer the sub and the font in the same step in both Linux and windows (please no hard sub keep soft sub)for dir in *.mkv ; do
ffmpeg -i "$dir" -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 "${dir%.mkv}".mp4;
done
thanks to all in advanced and sorry if this subject repeated
Regards
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
Last edited by ghazalo; 1st Jan 2021 at 15:34.
-
thanks but in this case will not encode just remux also doesn't take attachment fonts
or if you show me how to write the command to keep video encoding and copying the other components thanks again
video info below it may help
General
Unique ID : 145499484831826320280273664176079761527 (0x6D762E75049C0DF2508A23D1325BF077)
Complete name : D:\zzz\01.mkv
Format : Matroska
Format version : Version 4
File size : 1.25 GiB
Duration : 24 min 12 s
Overall bit rate : 7 424 kb/s
Encoded date : UTC 2021-01-02 08:08:35
Writing application : mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
Writing library : libebml v1.3.10 + libmatroska v1.5.2
Attachments : adobe.ttf
Video
ID : 1
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 : V_MPEG4/ISO/AVC
Duration : 24 min 10 s
Bit rate : 7 296 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.147
Stream size : 1.23 GiB (98%)
Writing library : x264 core 142
Encoding settings : cabac=1 / ref=4 / deblock=1:1:1 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=0.40: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=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=48 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=48 / rc=crf / mbtree=1 / crf=15.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=8000 / vbv_bufsize=12000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:0.60
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 24 min 10 s
Bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -83 ms
Stream size : 22.1 MiB (2%)
Default : Yes
Forced : No
Text
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Duration : 23 min 44 s
Bit rate : 131 b/s
Count of elements : 283
Compression mode : Lossless
Stream size : 22.8 KiB (0%)
Title : Arabic
Language : Arabic
Default : No
Forced : NoLast edited by ghazalo; 2nd Jan 2021 at 02:42.
-
Wrong.
1. -map 0 will copy the attachments (use .mkv as output file extension/format, not mp4)
2. he said to use -c:a copy. That will copy the audio. So you set:
Code:-map 0 -c:v libx265 -c:a copy -c:s copy
P.S.: Even if you use "-o output.mp4" mkvmerge will still create an mkv file. Mkvmerge will never output mp4 files. -
-
-
-
just for final shape before i go several hours encoding then something went wrong for the whole folder the command will be this correct or wrong?
for %i in (*.mkv) do ffmpeg -i %i -pix_fmt yuv420p10le -map 0 -c:v libx265 -crf 28 -x265-params profile=main10 -c:a copy -c:s copy -attach D:\zzz\adobe.ttf -metadata:s:3 mimetype=application/x-truetype-font [G]%~ni.mkvLast edited by ghazalo; 2nd Jan 2021 at 04:15.
Similar Threads
-
encoder h.265
By H265 in forum Video ConversionReplies: 4Last Post: 19th Jan 2018, 16:20 -
MeGUI and H.265
By pooksahib in forum Video ConversionReplies: 5Last Post: 17th Aug 2017, 03:26 -
i want encode a clip with hardcode SUB (costumize font)
By enable in forum Video ConversionReplies: 12Last Post: 15th Apr 2017, 10:06 -
One click-no re-encode-trimming (X264-265)
By therock003 in forum EditingReplies: 2Last Post: 23rd May 2016, 03:56 -
4K HEVC H.265 encode board
By hi3516a in forum Newbie / General discussionsReplies: 0Last Post: 5th May 2016, 09:41