小编Ste*_*gem的帖子

ffmpeg:设置音频流的语言

我有3个文件:video.mp4,audionl.mp4和audioeng.mp4.我尝试将它们一起添加到1个output.mp4文件中,如下所示:

ffmpeg -y -i video.mp4 -i audionl.mp4 -i audioeng.mp4  -map 0:v -map 1:a -map 2:a -metadata:s:a:0 language=nl -metadata:s:a:0 title="NL" -metadata:s:a:1 language=eng  -metadata:s:a:1 title="ENG" -acodec copy -bsf:a aac_adtstoasc -vcodec copy  -movflags faststart output.mp4 2>&1
Run Code Online (Sandbox Code Playgroud)

这是我从ffmpeg看到的输出:

ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger …
Run Code Online (Sandbox Code Playgroud)

audio video ffmpeg

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

为类添加装饰器 通过装饰类为类的方法添加装饰器

我正在尝试创建一个可以在类上定义的装饰器,并装饰其中定义的所有内容。首先让我展示一下我已经基于其他 SO 答案得到的设置:

import inspect


# https://stackoverflow.com/a/18421294/577669
def log(func):
    def wrapped(*args, **kwargs):
        try:
            print("Entering: [%s]" % func)
            try:
                # https://stackoverflow.com/questions/19227724/check-if-a-function-uses-classmethod
                if inspect.ismethod(func) and func.__self__:  # class method
                    return func(*args[1:], **kwargs)
                if inspect.isdatadescriptor(func):
                    return func.fget(args[0])
                return func(*args, **kwargs)
            except Exception as e:
                print('Exception in %s : (%s) %s' % (func, e.__class__.__name__, e))
        finally:
            print("Exiting: [%s]" % func)
    return wrapped


class trace(object):
    def __call__(self, cls):  # instance, owner):
        for name, m in inspect.getmembers(cls, lambda x: inspect.ismethod(x) or inspect.isfunction(x)):
            setattr(cls, name, log(m))
        for …
Run Code Online (Sandbox Code Playgroud)

python decorator

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

从hWnd获取(资源)ID

在ResourceHacker中,当您打开可执行文件(窗口)时,您可以看到与对话框关联的标识符.有没有人知道他们来自哪里?我的意思是,我怎样才能在我的C++程序中从HWND获取ID?

BTW,GetWindowLong(hwnd,GWL_ID)返回0.

谢谢

c++ winapi

5
推荐指数
2
解决办法
8508
查看次数

标签 统计

audio ×1

c++ ×1

decorator ×1

ffmpeg ×1

python ×1

video ×1

winapi ×1