小编Pro*_*ugo的帖子

使用Mp4parser旋转视频

我需要旋转视频来调整我的一些需求.我将在下面的列表中解释详细信息.

我正在创建一个像应用程序一样的Vine.我必须录制视频片段,然后将所有部分合并为一个文件.我正在使用mp4解析器库和最新版本1.0-RC-26使用其网站上提供的示例在Android应用程序上执行此操作:此处

如果所有视频具有相同的方向,附加视频示例工作正常但我发现从前置摄像头录制视频的一些问题,因此快速解决方案是将视频方向记录设置为270.此解决方案的不好部分是该段此方向在合并视频上显示错误的方向.

我可能的解决方案是旋转视频以应用我在不同情况下所需的内容,但我没有使用我的代码的工作示例.在互联网上搜索我在这里找到了这样的解决方案.此代码的问题是与上一版本不兼容(它给出了编译错误).我也试图理解库的逻辑,但我没有结果.例如,我尝试使用setMatrixMovie对象上的指令,但它根本不起作用.

public static void mergeVideo(int SegmentNumber) throws Exception {

    Log.d("PM", "Merge process started");
     Movie[] inMovies = new Movie[SegmentNumber]   ;
     //long[] Matrix = new long[SegmentNumber];

     for (int i = 1 ; i <= SegmentNumber; i++){
         File file =  new File(getCompleteFilePath(i));
         if (file.exists()){
             FileInputStream fis = new FileInputStream(getCompleteFilePath(i));
             //Set rotation I tried to experiment with this instruction but is not working
             inMovies [i-1].setMatrix(Matrix.ROTATE_90);
             inMovies [i-1] = MovieCreator.build(fis.getChannel());

             Log.d("PM", "Video " + i  + " …
Run Code Online (Sandbox Code Playgroud)

video android video-recording mp4parser

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

fastlane:从launchtl作业运行时找不到命令

嗨我做了一个集成,使用fastlane创建一个IOS项目的构建.除了我尝试启动脚本以使用launchctl在我的Mac计算机上运行fastlane命令时,一切都按预期工作.当我运行该作业时,我收到以下错误:

/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh: line 2: fastlane: command not found
Run Code Online (Sandbox Code Playgroud)

在我的测试脚本上发生以下两行(部署是我在fastfile文件上创建的一个通道):

cd ~/Documents/acct/branding/usfed/ios/
fastlane deploy
Run Code Online (Sandbox Code Playgroud)

我的pList文件驻留在LaunchAgent文件夹中.这是pList文件的内容:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.zerowidth.launched.grobankingbuild</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>-c</string>
        <string>/Users/hugoaguero/Documents/acct/branding/usfed/ios/scripts/test.sh</string>
    </array>
    <key>StandardErrorPath</key>
    <string>/tmp/com.zerowidth.launched.grobankingbuild.err</string>
    <key>StandardOutPath</key>
    <string>/tmp/com.zerowidth.launched.grobankingbuild.out</string>
    <key>StartInterval</key>
    <integer>300</integer>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)

如果我从终端正常运行命令,它执行没有问题.唯一的问题是它从作业运行时.

我对终端/ Unix很新,我认为它应该是一个简单的解决方案,但需要尽快解决这个问题.请帮忙.

terminal ios launch-agent launchctl fastlane

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