Sponsored Content
Operating Systems Linux Ubuntu How to change ffmpeg default font size? Post 302998548 by baris35 on Saturday 3rd of June 2017 12:51:02 PM
Old 06-03-2017
How to change ffmpeg default font size?

Hello,

I have a problem with Greek subtitle font size when I map a subtitle file into a video in ffmpeg.

I ran below code:

Code:
ffmpeg -i video.mp4 -sub_charenc CP1253 -i video_sub.srt -c:v copy -c:a copy \ 
-c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4

When I play it in VLC, it gives very small subtitle size.

Then I tried to increase subtitle fontsize but no luck.

Code:
ffmpeg -strict -2 -i video.mp4 -sub_charenc CP1253 -vf subtitles=video_sub.srt:force_style='Fontsize=30' \ 
-qscale:v 3 -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4

Also tried this one but failed again:

Code:
ffmpeg -strict -2 -i video.mp4 -sub_charenc CP1253 -vf "subtitles=video_sub.srt:force_style='Fontsize=30'" \
-qscale:v 3 -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4

As default fontsize in ffmpeg is 16, this time I increased fontsize from 16 to 30 in vf_drawtext.c file, then I reconfigured ffmpeg and replaced new ffmpeg binary file but nothing changed.

PS: I tested below code as -vf is invalid when -c:v copy is selected..
Code:
ffmpeg -strict -2 -i video.mp4 -sub_charenc CP1253 -vf subtitles=video_sub.srt:force_style='Fontsize=30' \ 
-qscale:v 3 -c:v libx264 -c:a copy -c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4

Could you please explain how I may do this?


Thanks
Boris

Last edited by baris35; 06-03-2017 at 04:21 PM.. Reason: last attempt
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Font size

Hello all I am a new linux user (Redhat 7) and I am trying to learn how to operate the system. I have a couple problems one the font size for all windows withing the OS are too small and even though I found a couple places to configure font size I can't find where to change the font size for the... (2 Replies)
Discussion started by: elhefe
2 Replies

2. Solaris

font size printing

hi all , i was just wondering if i can specify the font size when i am printing from solaris . i am using solaris 9 and hp laserjet 1230 . i dont want to change the global variable for the printer driver . i just want to print a file with small font and the others with normal fonts . ... (1 Reply)
Discussion started by: ppass
1 Replies

3. UNIX for Dummies Questions & Answers

How can I enlarged the font size?

How can I enlarged the font size when I opened the pdf files with ghostscript or ghostview in solaris 8 for sparc. The font is so small that I can't see it!] Help me please! (0 Replies)
Discussion started by: new_hand
0 Replies

4. UNIX for Dummies Questions & Answers

Font size in VIM

Hello, I use VIM version 7.1.56 on Ubuntu OS. Can you tell me pls how can I change the font-size in VIM? Thanks, Iuli (1 Reply)
Discussion started by: ketchera
1 Replies

5. AIX

how to change the font size of shell in $ prompt

Can any help me to change the default font type and its size.. To clear more about my question.. Once i login to my unix domain... the font it displaying is of small size... all my shell commands i am executing in $ prompt also carries the same style(ls, date and echo...) i searched whole... (2 Replies)
Discussion started by: tsjpraveen
2 Replies

6. Shell Programming and Scripting

change the font size in bash

Hi, I would like to change the font size in bash. I know how do it in ksh: F_VDOBLE="\033#6" print "${F_VDOBLE}Esto es..." But in bash I don't know Could you help me please? Many thanks! (5 Replies)
Discussion started by: mierdatuti
5 Replies

7. Shell Programming and Scripting

Font Size

Hi All, Please can someone advise on how to change the font size of the output of a shell script. Best Regards, Shazin (2 Replies)
Discussion started by: Shazin
2 Replies

8. Shell Programming and Scripting

Running ffmpeg in loop seems to change reading from file

Hi everyone, I am fairly new to shell scripting. I want to read in numbers from a file (one number per line). This works perfectly fine while read CurrentLine do echo $CurrentLine done < myfile and yields the correct output: 272 745 123 If I however run a ffmpeg... (2 Replies)
Discussion started by: Thriceguy
2 Replies

9. Linux

How do we change the default font on Linux system?

I have two hosts i.e host1 & host2. host1 has the desired font details of which are below: uname -a Linux host1 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ fc-match StRydeRegular.ttf: "St Ryde" "Regular" I need the same default font... (27 Replies)
Discussion started by: mohtashims
27 Replies
FFMPEG2THEORA(1)					      General Commands Manual						  FFMPEG2THEORA(1)

NAME
ffmpeg2theora - command-line converter to create Ogg Theora and Ogg Vorbis files. SYNOPSIS
ffmpeg2theora [options] inputfile DESCRIPTION
This manual page documents briefly the ffmpeg2theora command. ffmpeg2theora is a program that converts any media file that ffmpeg can decode to Ogg Theora for video and Ogg Vorbis for audio. OPTIONS
To read from standard input, specify `-' as the input filename. These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. General output options: -o, --output Specify the output filename. If no output filename is specified, output will be written to inputfile.ogv. To output to standard output, specify /dev/stdout as the output file. --no-skeleton Disables Ogg Skeleton metadata output. --seek-index Enables keyframe index in skeleton track. -s, --starttime Start encoding at this time (in seconds). -e, --endtime End encoding at this time (in seconds). -p, --preset Encode file with v2v preset. Right now, there is preview, pro and videobin. Run "ffmpeg2theora -p info" for more information. Video output options: -v, --videoquality [0 to 10] Set encoding quality for video (default: 6). use higher values for better quality -V, --videobitrate Set encoding bitrate for video (in kb/s). --soft-target Use a large reservoir and treat the rate as a soft target; rate control is less strict but resulting quality is usually higher/smoother overall. Soft target also allows an optional -v setting to specify a minimum allowed quality. --two-pass Compress input using two-pass rate control. This option requires that the input to the to the encoder is seekable and performs both passes automatically. --first-pass <filename> Perform first-pass of a two-pass rate controlled encoding, saving pass data to <filename> for a later second pass --second-pass <filename> Perform second-pass of a two-pass rate controlled encoding, reading first-pass data from <filename>. The first pass data must come from a first encoding pass using identical input video to work properly. --optimize Optimize output Theora video, using a full search for motion vectors instead of a hierarchical one. This can reduce video bitrate about 5%, but it is slower and therefore is disabled by default. --speedlevel encoding is faster with higher values the cost is quality and bandwidth 0: Slowest (best) 1: Enable early skip (default) 2: Disable motion compensation -x, --width Scale to given width (in pixels). -y, --height Scale to given height (in pixels). --aspect Define frame aspect ratio (e.g. 4:3, 16:9). --pixel-aspect Define pixel aspect ratio (e.g. 1:1, 4:3). -F, --framerate output framerate e.g 25:2 or 16 --croptop, --cropbottom, --cropleft, --cropright Crop input by given pixels before resizing. -K, --keyint [8 to 2147483647] Set keyframe interval (default: 64). -d, --buf-delay Buffer delay (in frames). Longer delays allow smoother rate adaptation and provide better overall quality, but require more client side buffering and add latency. The default value is the keyframe interval for one-pass encoding (or somewhat larger if --soft-tar- get is used) and infinite for two-pass encoding. (only works in bitrate mode) --no-upscaling only scale video or resample audio if input is bigger than provided parameter Video transfer options: --pp Video Postprocessing, denoise, deblock, deinterlacer use --pp help for a list of available filters. -C, --contrast [0.1 to 10.0] contrast correction (default: 1.0). Note: lower values make the video darker. -B, --brightness [-1.0 to 1.0] brightness correction (default: 0.0). Note: lower values make the video darker. -G, --gamma [0.1 to 10.0] gamma correction (default: 1.0). Note: lower values make the video darker. -P, --saturation [0.1 to 10.0] saturation correction (default: 1.0). Note: lower values make the video grey. Audio output options: -a, --audioquality [-2 to 10] Set encoding quality for audio (default: 1). use higher values for better quality -A, --audiobitrate [32 to 500] Set encoding bitrate for audio (in kb/s). -c, --channels Set number of output channels. -H, --samplerate Set output samplerate (in Hz). Input options: --noaudio Disable audio from input. --novideo Disable video from input. --deinterlace Force deinterlace. Otherwise only material marked as interlaced will be deinterlaced. --vhook you can use ffmpeg's vhook system, example: ffmpeg2theora --vhook '/path/watermark.so -f wm.gif' input.dv -f, --format Specify input format. --inputfps Override input fps. --audiostream id By default the first audio stream is selected, use this to select another audio stream. --videostream id By default the first video stream is selected, use this to select another audio stream. --sync Use A/V sync from input container. Since this does not work with all input format you have to manualy enable it if you have issues with A/V sync. Subtitles options: --subtitles Encode subtitles from the given file to a multiplexed Kate stream. The input file should be in SubRip (.srt) format, encoded in UTF-8, unless the --subtitles-encoding option is also given. --subtitles-encoding encoding Assumes the corresponding subtitles file is encoded in the given encoding. If ffmpeg2theora was built with iconv support, all encod- ings supported by iconv may be used. Otherwise, UTF-8 and ISO-8859-1 (aka latin1) are supported. The default is UTF-8. --subtitles-language language Sets the language of the corresponding subtitles stream. This will be set in the corresponding Kate stream so a video player may make this available to the user for language selection. Language is an ISO 639-1 or RFC 3066 ASCII string and is limited to 15 char- acters. --subtitles-category category Sets the category of the corresponding subtitles stream. This will be set in the corresponding Kate stream so a video player may make this available to the user for selection. The default category is "subtitles". Suggested other categories may include "tran- script", "commentary", "lyrics", etc. Category is an ASCII string and is limited to 15 characters --subtitles-ignore-non-utf8 When reading an UTF-8 subtitles text file, any invalid UTF-8 sequence will be ignored. This may be useful if there are stray sequences in an otherwise UTF-8 file. Note that, since those invalid sequences will be removed from the output, this option is not a substitute to converting a non UTF-8 file to UTF-8. --nosubtitles Disables subtitles from input. Note that subtitles explicitely loaded from external files will still be used. --subtitle-types Selects which subtitle types to include from the input file. Allowed types are: none, all, text, spu (spu being the image based subtitles found on DVD). By default, only text based subtitles will be included. Note that subtitles explicitely loaded from external files will still be used. Metadata options: --artist Name of artist (director). --title Title. --date Date. --location Location. --organization Name of organization (studio). --copyright Copyright. --license License. --contact Contact link. --nometadata disables metadata from input --no-oshash do not include oshash of source file(SOURCE_OSHASH) Keyframe indexing options: --index-interval <n> set minimum distance between indexed keyframes to <n> ms (default: 2000) --theora-index-reserve <n> reserve <n> bytes for theora keyframe index --vorbis-index-reserve <n> reserve <n> bytes for vorbis keyframe index --kate-index-reserve <n> reserve <n> bytes for kate keyframe index Other options: --nice n Set niceness to n. -h, --help Output a help message. --info Output json info about input file, use -o to save json to file. --frontend print status information in json, one json dict per line EXAMPLES
Encode Videos: ffmpeg2theora videoclip.avi (will write output to videoclip.ogv) cat something.dv | ffmpeg2theora -f dv -o output.ogv - Encode a series of images: ffmpeg2theora frame%06d.png -o output.ogv Live streaming from V4L Device: ffmpeg2theora /dev/video0 -f video4linux --inputfps 15 -x 160 -y 128 -o - | oggfwd icast2server 8000 password /theora.ogv (you might have to use video4linux2 depending on your hardware) Live encoding from a DV camcorder (needs a fast machine): dvgrab - | ffmpeg2theora -f dv -x 352 -y 288 -o output.ogv -0 Live encoding and streaming to icecast server: dvgrab --format raw - | ffmpeg2theora -f dv -x 160 -y 128 -o /dev/stdout - | oggfwd icast2server 8000 password /theora.ogv AUTHOR
ffmpeg2theora was written by jan gerber <j@v2v.cc>. This manual page was written by Hubert Chan <hubert@uhoreg.ca>, for the Debian project (but may be used by others). May 14, 2010 FFMPEG2THEORA(1)
All times are GMT -4. The time now is 11:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy