Comments (19)
I added it in the latest version 1.0.6. It uses mpeg4
and libmp3lame
.
Let me know how it works for you.
https://github.com/MattMcManis/Axiom/releases
from axiom.
First of all thanks for implementation, haven't had time to test properly but from the quick glance there's one of the possible issues.
According to Script
button I get this for the file and settings I've chose
ffmpeg -y -i "G:\4K Samples\Philips Surf 4K Demo.mp4" -c:v mpeg4 -vtag xvid -preset placebo -b:v 38014K -pix_fmt yuv420p -r 23.976 -vf scale=720:-2 -pass 1 -sn -an -f avi -threads 4 NUL && ffmpeg -y -i "G:\4K Samples\Philips Surf 4K Demo.mp4" -c:v mpeg4 -vtag xvid -preset placebo -b:v 38014K -pix_fmt yuv420p -r 23.976 -vf scale=720:-2 -map 0:v:0? -map_chapters 0 -pass 2 -sn -c:a libmp3lame -b:a 192k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1 -map 0:a? -map_metadata 0 -threads 4 "G:\Encodes\Philips Surf 4K Demo.avi"
I'm seeing this in the log, one the first pass:
Codec AVOption preset (Configuration preset) specified for output file #0 (NUL) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
On the second pass:
Codec AVOption preset (Configuration preset) specified for output file #0 (G:\Encodes\Philips Surf 4K Demo.avi) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
File itself plays correctly on the portable device.
Also I've noticed that you have option Subtitle Stream to keep
, could you please add ability to pick external subtitles too ?
-vf "subtitles=test.en.srt:force_style='FontName=Arial,FontSize=22'"
from axiom.
@BMitrovic17 I am working on a fix and a way to add external subtitles. I'll let you know when it's done.
from axiom.
@BMitrovic17 So the file correctly encodes and plays, but it displays that yellow error at start? I think it's because it is outputting Pass 1 to NUL and trying to use the log for Pass 2. It should be faster that way as the first pass doesn't need to output an actual file.
I also found a bug when choosing a preset size for avi, such as 480 . It was giving scale=:480
instead of scale=-2:480
.
DVD Widescreen is 720:404
(16:9) and Full Screen is 720:480
(4:3). But there are different height sizes for Widescreen. You may want to use Custom Size and enter the exact values you need to downscale for DVD.
https://calculateaspectratio.com/
https://andrew.hedges.name/experiments/aspect_ratio/
from axiom.
Yeah, file plays correctly.
I did use custom size, 720:-2
.
Another thing would be to support profile levels in order to limit max bitrate being that sometimes higher bitrate results in termination of the playback.
According to https://trac.ffmpeg.org/ticket/2901 we should use -profile:v 15 -level 7
from axiom.
I've added the ability to use external subtitles, but I'm running into a problem. The subtitles wont apply when using Maps. This happens on all formats, mkv
, mp4
, avi
. Though maps are needed if you want to select streams.
ffmpeg -y
-i "C:\Users\Matt\Desktop\video.mp4"
-i "C:\Users\Matt\Desktop\subtitle.ass"
-c:v libx264
-preset medium -crf 37 -pix_fmt yuv420p
-vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"
-map 0:v?
-map_chapters 0
-c:s ass
-map 0:s?
-c:a ac3
-b:a 320k
-map 0:a?
-map_metadata 0
"C:\Users\Matt\video.mkv"
I'm also running into the problem of applying the style filter.
-vf "subtitles=subtitle.ass:force_style='FontName=Arial,FontSize=22'"
Error initializing filter 'subtitles' with args 'subtitle.ass:force_style=FontName=Arial,FontSize=22'
Unable to open subtitle.ass
I'm using ASS Subtitle Format on MKV.
https://www.matroska.org/technical/specs/subtitles/ssa.html
https://trac.ffmpeg.org/wiki/HowToConvertSubtitleToASS
AVI Errors:
-c:s srt
Unable to find a suitable output format for 'srt'
.
-f avi
C:\Users\Matt\Desktop\subtitle.srt: Invalid data found when processing input
from axiom.
What I've learned now is to use -map 1:s?
and that AVI only supports DivX XSUB
.
I'm close to getting this all working.
from axiom.
@MattMcManis
I was using example from their trac's wiki
https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Using subtitles
filter is the most convenient one being that ass
one is limited only to Advanced SubStation Alpha (ASS)
and majority of subtitles available out there are regular srt ones.
from axiom.
I've added the options for External Subtitles. Let me know how it works. I haven't added Burn yet.
Press the Update button or Download here https://github.com/MattMcManis/Axiom/releases
-
Select
mkv
,mp4
, oravi
. -
Select
external
from the Subtitles dropdown.
Add subtitle files. (avi
must useDivX XSUB
subtitle files.)
CheckBox which Subtitle to be Default. -
Select
Codec
(should default to the correct one for the container selected)
Examples
1 Pass
ffmpeg -y
-i "C:\Users\Matt\Videos\video.mp4"
-i "C:\Users\Matt\Videos\subtitle 01.srt"
-i "C:\Users\Matt\Videos\subtitle 02.srt"
-c:v mpeg4 -vtag xvid
-preset medium -b:v 1300K -pix_fmt yuv420p
-vf scale=720:-2
-map 0:v:0? -map_chapters 0
-c:s srt
-map 1:s? -map 2:s?
-c:a libmp3lame
-b:a 192k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-map_metadata 0
"C:\Users\Matt\Videos\video.avi"
2 Pass
ffmpeg -y
-i "C:\Users\Matt\Videos\video.mp4"
-i "C:\Users\Matt\Videos\subtitle 01.srt"
-i "C:\Users\Matt\Videos\subtitle 02.srt"
-c:v mpeg4 -vtag xvid
-preset medium -b:v 1300K -pix_fmt yuv420p
-vf scale=720:-2
-pass 1
-sn -an
-f avi
NUL
&&
ffmpeg -y
-i "C:\Users\Matt\Videos\video.mp4"
-i "C:\Users\Matt\Videos\subtitle 01.srt"
-i "C:\Users\Matt\Videos\subtitle 02.srt"
-c:v mpeg4 -vtag xvid
-preset medium -b:v 1300K -pix_fmt yuv420p
-vf scale=720:-2
-map 0:v:0? -map_chapters 0
-pass 2
-c:s srt
-map 1:s? -map 2:s?
-c:a libmp3lame
-b:a 192k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-f avi
-map_metadata 0
"C:\Users\Matt\Videos\video.avi"
from axiom.
Unfortunately I don't use ASS
nor XSUB
so i can't test that.
from axiom.
It should work with the same subtitles files you used before if those worked.
from axiom.
Tried something without the subs
ffmpeg version N-90610-g2accdd3871 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enabl
e-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-l
ibtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en
able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-l
ibvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enabl
e-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 13.100 / 56. 13.100
libavcodec 58. 17.100 / 58. 17.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 14.100 / 7. 14.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, matroska,webm, from 'X:\ink.master.angels.s02e04.1080p.web.x264-tbs.mkv':
Metadata:
encoder : libebml v1.3.5 + libmatroska v1.4.8
creation_time : 2018-04-18T01:09:22.000000Z
Duration: 00:40:30.64, start: 0.000000, bitrate: 4894 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 4
7.95 tbc (default)
Metadata:
BPS-eng : 4764620
DURATION-eng : 00:40:30.600000000
NUMBER_OF_FRAMES-eng: 58274
NUMBER_OF_BYTES-eng: 1447610923
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-04-18 01:09:22
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
BPS-eng : 128001
DURATION-eng : 00:40:30.616000000
NUMBER_OF_FRAMES-eng: 113935
NUMBER_OF_BYTES-eng: 38890457
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-04-18 01:09:22
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Codec AVOption preset (Configuration preset) specified for output file #0 (NUL) has not been used for any stream. The mo
st likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some
encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuv444p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[mpeg4 @ 07c0c780] Invalid pixel aspect ratio 406/405, limit is 255/255 reducing
Output #0, avi, to 'NUL':
Metadata:
ISFT : Lavf58.10.100
Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 720x406 [SAR 255:254 DAR 45900:25781], q=2-31, 200 kb/s, SAR
406:405 DAR 16:9, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
BPS-eng : 4764620
DURATION-eng : 00:40:30.600000000
NUMBER_OF_FRAMES-eng: 58274
NUMBER_OF_BYTES-eng: 1447610923
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-04-18 01:09:22
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc58.17.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=58274 fps= 76 q=1.0 Lsize= 880700kB time=00:40:30.63 bitrate=2968.2kbits/s speed=3.16x
video:879300kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.159241%
ffmpeg version N-90610-g2accdd3871 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libo
penjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --en
able-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --en
able-avisynth
libavutil 56. 13.100 / 56. 13.100
libavcodec 58. 17.100 / 58. 17.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 14.100 / 7. 14.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, matroska,webm, from 'X:\ink.master.angels.s02e04.1080p.web.x264-tbs.mkv':
Metadata:
encoder : libebml v1.3.5 + libmatroska v1.4.8
creation_time : 2018-04-18T01:09:22.000000Z
Duration: 00:40:30.64, start: 0.000000, bitrate: 4894 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 4764620
DURATION-eng : 00:40:30.600000000
NUMBER_OF_FRAMES-eng: 58274
NUMBER_OF_BYTES-eng: 1447610923
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-04-18 01:09:22
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
BPS-eng : 128001
DURATION-eng : 00:40:30.616000000
NUMBER_OF_FRAMES-eng: 113935
NUMBER_OF_BYTES-eng: 38890457
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-04-18 01:09:22
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Codec AVOption preset (Configuration preset) specified for output file #0 (X:\converted\ink.master.angels.s02e04.1080p.web.x264-tbs.avi) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuv444p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[mpeg4 @ 0808d700] Invalid pixel aspect ratio 406/405, limit is 255/255 reducing
[mpeg4 @ 0808d700] requested bitrate is too low
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[libmp3lame @ 0808e280] 4 frames left in the queue on closing
Conversion failed!
And these are the settings
ffmpeg -y
-i "X:\ink.master.angels.s02e04.1080p.web.x264-tbs.mkv"
-c:v mpeg4 -vtag xvid
-preset medium -q:v 1 -pix_fmt yuv444p
-vf scale=720:-2
-pass 1
-sn -an
-f avi
-threads 4
NUL
&&
ffmpeg -y
-i "X:\ink.master.angels.s02e04.1080p.web.x264-tbs.mkv"
-c:v mpeg4 -vtag xvid
-preset medium -q:v 1 -pix_fmt yuv444p
-vf scale=720:-2
-map 0:v:0? -map_chapters 0
-pass 2
-map 0:s?
-c:a libmp3lame
-b:a 128k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-map_metadata 0
-f avi
-threads 4
"X:\converted\ink.master.angels.s02e04.1080p.web.x264-tbs.avi"
from axiom.
I think it is yuv444p
needs to be yuv420p
for mpeg4
. I also found a few more bugs for avi.
I will release a fix soon.
from axiom.
Thanks for testing. We will get it working correctly for you.
Press the Update button for the new release.
https://github.com/MattMcManis/Axiom/releases/
AVI / MPEG-4 Rules
The rules for mpeg4
were more complicated than I thought.
The controls should now automatically change to work with CBR, VBR, and Lossless.
- VBR can only be
1 Pass
- Lossless is VBR
-q:v 2
- CBR can be
1 Pass
or2 Pass
- High, Medium, Low, Custom can be CBR
-b:v
or VBR-q:v
- Auto is CBR
-b:v 5
2 Pass
mpeg4
does not use speed presets likex264
Errors:
Bitrate Error (VBR 2 Pass Only)
requested bitrate is too low
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Use 1 Pass for VBR
Subtitle Conversion Error
Could not write header for output file #0 (incorrect codec parameters ?): Not yet implemented in FFmpeg, patches welcome Error initializing output stream 0:0 --
Remove with Subtitles: none
Re-add compatible subtitle file
from axiom.
Has it worked for you? I have released another update.
from axiom.
Sorry for being away for quite some time, Thanks for your hard work :)
Tried to test but it fails for subs.
[avi @ 06d90040] Subtitle streams other than DivX XSUB is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
Could not write header for output file #0 (incorrect codec parameters ?): Not yet implemented in FFmpeg, patches welcome
Error initializing output stream 0:0 --
[libmp3lame @ 065bd240] 3 frames left in the queue on closing
Conversion failed!
Script is as follows...
ffmpeg -y
-i "G:\Encodes\downsizing.2017.1080p.bluray.x264-geckos.mkv"
-i "G:\Encodes\downsizing.2017.1080p.bluray.x264-geckos.hr.srt"
-c:v mpeg4 -vtag xvid -q:v 2 -pix_fmt yuv420p
-r 23.976
-vf scale=720:-2
-map 0:v:0? -map_chapters 0
-c:s srt
-map 1:s?
-disposition:s:0 default
-c:a libmp3lame
-b:a 192k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-map_metadata 0
-threads 4
"G:\Encodes\converted\downsizing.2017.1080p.bluray.x264-geckos.avi"
Once again i want 'burn in' subs , how to add them is described in my previous comment with the link to ffmpeg's trac -> #5 (comment)
Also adding font name
and font size
would be nice
With such implementation script would look something like this
ffmpeg -y
-i "G:\Encodes\downsizing.2017.1080p.bluray.x264-geckos.mkv"
-c:v mpeg4 -vtag xvid -q:v 2 -pix_fmt yuv420p
-r 23.976
-vf "scale=720:-2, subtitles='G:\Encodes\downsizing.2017.1080p.bluray.x264-geckos.hr.srt':force_style='FontName=Arial,FontSize=22'"
-map 0:v:0?
-map_chapters 0
-c:a libmp3lame
-b:a 192k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-map_metadata 0
-threads 4
"G:\Encodes\converted\downsizing.2017.1080p.bluray.x264-geckos.avi"
from axiom.
I've added Subtitles Burn in the latest version. It does not yet have Font Style.
It adds subtitles='path'
to the filter. Let me know if it works, the subtitle srt files I have fail to burn.
Axiom Script Output:
ffmpeg -y
-i "C:\example.mp4"
-c:v mpeg4 -vtag xvid -b:v 1300K -pix_fmt yuv420p
-vf "scale=-2:720, subtitles='C:\test.srt'"
-map 0:v:0? -map_chapters 0
-c:a libmp3lame
-b:a 320k -rematrix_maxval 1.0 -ac 2 -joint_stereo 1
-map 0:a?
-map_metadata 0
-threads 0
"C:\example.avi"
from axiom.
Unfortunately it doesn't work.
Wild guess is that it has something to do with mapping. If i use the script without the -map it works.
from axiom.
Try adding subtitle -c:s copy
and -map 0:s?
or -map 1:s?
, along with the other video and audio maps and let me know if it works. If it does I'll fix it in the next update.
Could you link me to a download of a subtitle file you're using so I can test it? My file gives an error when I try to burn.
from axiom.
Related Issues (20)
- δΈζζ―ζ :sweat_smile: HOT 7
- Simple bug with standard settings
- Preserve folder structure?
- Axiom crashes upon loading preset HOT 3
- Does it auto-update?
- [REQ] Versatile Video Coding (aka x266) support
- AV1 container
- Not able to batch convert? HOT 1
- [SUGGESTION] Optimal parms for "Coding to DVD with FFMPEG"
- Not sure. Issues pasting a link into the input box (youtube-dl)
- video to gif animation? HOT 1
- No exe file anywhere HOT 2
- Project Status HOT 4
- Custom Presets not loading properly.
- Converting DNxHR gives error
- Saving configurations
- language HOT 1
- Crash when input a double quotation mark to Input or Output box HOT 1
- [Question] Is it possible to burn specific subtitles from Input File ?
- cant understand how to just extract files, without encoding with ffmpeg gui? and how to download from youtube with GUI on windows? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axiom.