小编Mat*_*ini的帖子

使用 FFmpeg 通过提高速度而不是复制帧将 30 帧转换为 60fps

我有一个视频被错误地标记为 30fps,它实际上是 60fps,所以看起来它是以半速播放的。音频很好,也就是说,配乐在视频剪辑的中途结束。如果可能的话,我想知道如何解决这个问题,将视频速度提高一倍,使其达到 60fps,这意味着音频和视频是同步的。

该文件是 H.264 和音频 MPEG-4 AAC。

ffmpeg 根据要求提供的文件详细信息:

ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Nov  9 2013 19:09:46 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Tignes60fps.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2014-01-13 02:23:09
    Duration: 00:08:33.21, start: 0.000000, bitrate: 5690 kb/s
    Stream …
Run Code Online (Sandbox Code Playgroud)

audio video ffmpeg frame-rate h.264

5
推荐指数
1
解决办法
5490
查看次数

Java ImageIO.read(getClass().getResource()) 返回 null

线

andImg = ImageIO.read(getClass().getResource("gate_and.png"));
Run Code Online (Sandbox Code Playgroud)

失败

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input == null!
Run Code Online (Sandbox Code Playgroud)

我正在使用 Eclipse,在 bin 文件夹下的导航视图中有文件 gate_and.png,表明该文件在构建路径中。

在包资源管理器视图中,我有

project/src/view/class  - This is the class that has the code above.
Run Code Online (Sandbox Code Playgroud)

project/images/gate_and.png
Run Code Online (Sandbox Code Playgroud)

我右键单击项目文件夹 > 构建路径 > 链接源以将图像文件夹添加为源,再次执行此操作会提供一个确认消息,表明图像已在源中。

我也尝试将gate_and.png 更改为images/gate_and.png 和/images/gate_and.png,但由于图像gate_and.png 在bin 文件夹中,我认为原始是正确的。

java ubuntu resources image

2
推荐指数
1
解决办法
9769
查看次数

Java JPanel.add(...)无效

这是我到目前为止编写的代码,以及我收到的错误.我确定我之前没有错误地完成了类似的代码.我很确定我错过了一些愚蠢的东西,但我无法弄明白或在网上找到任何东西.

import javax.swing.*;
import java.awt.*;

public class MyFrame extends JFrame {

    JPanel mainPanel = new JPanel();
    JButton editButton = new JButton("Edit");
    JPanel.add(editButton);
}
Run Code Online (Sandbox Code Playgroud)

错误:

Syntax error on token(s), misplaced construct(s) - for the underlined '.' 
on the last line
Syntax error on token "editButton", VariableDeclaratorId expected after this 
token - for the underlined parameter within the brackets on the last line.
Run Code Online (Sandbox Code Playgroud)

java swing awt

1
推荐指数
1
解决办法
2521
查看次数

标签 统计

java ×2

audio ×1

awt ×1

ffmpeg ×1

frame-rate ×1

h.264 ×1

image ×1

resources ×1

swing ×1

ubuntu ×1

video ×1