Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
dd2be923
Commit
dd2be923
authored
Mar 20, 2005
by
Mark Moriarty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transcode -- round fps to full integer value (eg, 25, 30) for ffmpeg mpeg1/2
parent
b6e9913f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+14
-2
No files found.
modules/stream_out/transcode.c
View file @
dd2be923
...
@@ -672,10 +672,22 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -672,10 +672,22 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if
(
p_sys
->
f_fps
>
0
)
if
(
p_sys
->
f_fps
>
0
)
{
{
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate
=
nearbyint
(
p_sys
->
f_fps
*
1000
)
;
if
(
id
->
p_encoder
->
fmt_out
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
)
||
id
->
p_encoder
->
fmt_out
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'1'
,
'v'
)
||
id
->
p_encoder
->
fmt_out
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'2'
,
'v'
)
)
{
/* ffmpeg mpeg1/2 wants integer, 30 not 29.97, for example */
p_sys
->
f_fps
=
nearbyint
(
p_sys
->
f_fps
);
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate
=
p_sys
->
f_fps
;
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate_base
=
1
;
}
else
{
/* scale by 1000 so you can get non-integer rates, like 29.97 */
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate
=
nearbyint
(
p_sys
->
f_fps
*
1000
)
;
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate_base
=
1000
;
id
->
p_encoder
->
fmt_out
.
video
.
i_frame_rate_base
=
1000
;
}
}
}
}
}
else
if
(
p_fmt
->
i_cat
==
SPU_ES
&&
(
p_sys
->
i_scodec
||
p_sys
->
psz_senc
)
)
else
if
(
p_fmt
->
i_cat
==
SPU_ES
&&
(
p_sys
->
i_scodec
||
p_sys
->
psz_senc
)
)
{
{
msg_Dbg
(
p_stream
,
"creating subtitles transcoding from fcc=`%4.4s' "
msg_Dbg
(
p_stream
,
"creating subtitles transcoding from fcc=`%4.4s' "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment