Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open video #3

Open
suprb opened this issue Oct 16, 2019 · 3 comments
Open

Can't open video #3

suprb opened this issue Oct 16, 2019 · 3 comments

Comments

@suprb
Copy link

suprb commented Oct 16, 2019

Thank making this! Unfortunately, I cannot open my videos using Quicktime on OSX (or other video apps). I get the error message: "The file isn’t compatible with QuickTime Player." when I try to open my .mp4 files.

Any ideas?

@alptugan
Copy link

Try to use VLC player

@stephanschulz
Copy link

stephanschulz commented Feb 5, 2021

I think this has to do with the selected video codec.
Is there a way to set which codec get's used? Right now it seems to be args.push_back("-vcodec rawvideo"); or m_VideCodec("mpeg4")

@stephanschulz
Copy link

works now.

I had to add args.push_back("-pix_fmt yuv420p");

    std::vector<std::string> args;
    std::copy(m_AdditionalInputArguments.begin(), m_AdditionalInputArguments.end(), std::back_inserter(args));

	//args.push_back("-pix_fmts");
    args.push_back("-y");
    args.push_back("-an");
    args.push_back("-r " + std::to_string(m_Fps));
    args.push_back("-framerate " + std::to_string(m_Fps));
    args.push_back("-s " + std::to_string(static_cast<unsigned int>(m_VideoSize.x)) + "x" + std::to_string(static_cast<unsigned int>(m_VideoSize.y)));
    args.push_back("-f rawvideo");
    //args.push_back("-pix_fmt rgb24");
	args.push_back("-pix_fmt " + mPixFmt);
    args.push_back("-vcodec rawvideo");
    args.push_back("-i -");
    

    args.push_back("-vcodec " + m_VideCodec);
    args.push_back("-b:v " + std::to_string(m_BitRate) + "k");
    args.push_back("-r " + std::to_string(m_Fps));
    args.push_back("-pix_fmt yuv420p");
    args.push_back("-framerate " + std::to_string(m_Fps));
    std::copy(m_AdditionalOutputArguments.begin(), m_AdditionalOutputArguments.end(), std::back_inserter(args));
    
    args.push_back(m_OutputPath);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants