FFMPEG av_read_frame() return an I/O error (-5)?Rotating videos with FFmpeghow to solve ffmpeg watermark “No such filter: 'movie'” AND “Failed to avformat_open_input”?What is an undefined reference/unresolved external symbol error and how do I fix it?Get rtsp error when connection is corrupted?Camera's pts and dts jumps issueFFMPEG error with avformat_open_input returning -135ffmpeg RTSP error while decoding MBffmpeg avcodec_open2() return error -22 only in ubuntuffmpeg issues “501 Not Implemented” while recording an RTSP streamError When Capturing from the Surface Camera

What (if any) is the reason to buy in small local stores?

Are all namekians brothers?

What is the tangent at a sharp point on a curve?

Non-Borel set in arbitrary metric space

How do you say "Trust your struggle." in French?

Highest stage count that are used one right after the other?

Is this saw blade faulty?

Offset in split text content

What can I do if I am asked to learn different programming languages very frequently?

Can you take a "free object interaction" while incapacitated?

How to split IPA spelling into syllables

Do people actually use the word "kaputt" in conversation?

"Oh no!" in Latin

Why is participating in the European Parliamentary elections used as a threat?

A seasonal riddle

Make a Bowl of Alphabet Soup

What is the meaning of "You've never met a graph you didn't like?"

Error in master's thesis, I do not know what to do

How to preserve electronics (computers, ipads, phones) for hundreds of years?

Pre-Employment Background Check With Consent For Future Checks

Showing mass murder in a kid's book

Mortal danger in mid-grade literature

Why does the frost depth increase when the surface temperature warms up?

Why does a 97 / 92 key piano exist by Bosendorfer?



FFMPEG av_read_frame() return an I/O error (-5)?


Rotating videos with FFmpeghow to solve ffmpeg watermark “No such filter: 'movie'” AND “Failed to avformat_open_input”?What is an undefined reference/unresolved external symbol error and how do I fix it?Get rtsp error when connection is corrupted?Camera's pts and dts jumps issueFFMPEG error with avformat_open_input returning -135ffmpeg RTSP error while decoding MBffmpeg avcodec_open2() return error -22 only in ubuntuffmpeg issues “501 Not Implemented” while recording an RTSP streamError When Capturing from the Surface Camera













0















I'm using ffmpeg library to capture screen (desktop). Everything works fine when I run my app in debug/release mode. The I/O error comes when this app run in c# window service mode (win 10 OS). I googled but still don't know why the error come. In the service mode there is no problem when connecting to some rtsp link (Camera) except desktop capture.



AVInputFormat * pAVInputFormat = av_find_input_format("gdigrab"); 
if (pAVInputFormat != NULL)

int err = avformat_open_input(&pFormatCtx, "desktop", pAVInputFormat, NULL);
if(err== 0)

err = av_read_frame(&pFormatCtx, &packet);
if (err < 0)

char errs[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err );
String^ errStr = gcnew String(errs);
WriteLog("Error in function av_read_frame() return = " + errStr);
return -1;














share|improve this question



















  • 1





    I don't know the specifics, but I read that services normally don't have access to the desktop.

    – immibis
    Mar 7 at 3:15











  • av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

    – the kamilz
    Mar 7 at 11:14















0















I'm using ffmpeg library to capture screen (desktop). Everything works fine when I run my app in debug/release mode. The I/O error comes when this app run in c# window service mode (win 10 OS). I googled but still don't know why the error come. In the service mode there is no problem when connecting to some rtsp link (Camera) except desktop capture.



AVInputFormat * pAVInputFormat = av_find_input_format("gdigrab"); 
if (pAVInputFormat != NULL)

int err = avformat_open_input(&pFormatCtx, "desktop", pAVInputFormat, NULL);
if(err== 0)

err = av_read_frame(&pFormatCtx, &packet);
if (err < 0)

char errs[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err );
String^ errStr = gcnew String(errs);
WriteLog("Error in function av_read_frame() return = " + errStr);
return -1;














share|improve this question



















  • 1





    I don't know the specifics, but I read that services normally don't have access to the desktop.

    – immibis
    Mar 7 at 3:15











  • av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

    – the kamilz
    Mar 7 at 11:14













0












0








0








I'm using ffmpeg library to capture screen (desktop). Everything works fine when I run my app in debug/release mode. The I/O error comes when this app run in c# window service mode (win 10 OS). I googled but still don't know why the error come. In the service mode there is no problem when connecting to some rtsp link (Camera) except desktop capture.



AVInputFormat * pAVInputFormat = av_find_input_format("gdigrab"); 
if (pAVInputFormat != NULL)

int err = avformat_open_input(&pFormatCtx, "desktop", pAVInputFormat, NULL);
if(err== 0)

err = av_read_frame(&pFormatCtx, &packet);
if (err < 0)

char errs[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err );
String^ errStr = gcnew String(errs);
WriteLog("Error in function av_read_frame() return = " + errStr);
return -1;














share|improve this question
















I'm using ffmpeg library to capture screen (desktop). Everything works fine when I run my app in debug/release mode. The I/O error comes when this app run in c# window service mode (win 10 OS). I googled but still don't know why the error come. In the service mode there is no problem when connecting to some rtsp link (Camera) except desktop capture.



AVInputFormat * pAVInputFormat = av_find_input_format("gdigrab"); 
if (pAVInputFormat != NULL)

int err = avformat_open_input(&pFormatCtx, "desktop", pAVInputFormat, NULL);
if(err== 0)

err = av_read_frame(&pFormatCtx, &packet);
if (err < 0)

char errs[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err );
String^ errStr = gcnew String(errs);
WriteLog("Error in function av_read_frame() return = " + errStr);
return -1;











c++ service ffmpeg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 0:55







vominhtien961476

















asked Mar 7 at 0:43









vominhtien961476vominhtien961476

62213




62213







  • 1





    I don't know the specifics, but I read that services normally don't have access to the desktop.

    – immibis
    Mar 7 at 3:15











  • av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

    – the kamilz
    Mar 7 at 11:14












  • 1





    I don't know the specifics, but I read that services normally don't have access to the desktop.

    – immibis
    Mar 7 at 3:15











  • av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

    – the kamilz
    Mar 7 at 11:14







1




1





I don't know the specifics, but I read that services normally don't have access to the desktop.

– immibis
Mar 7 at 3:15





I don't know the specifics, but I read that services normally don't have access to the desktop.

– immibis
Mar 7 at 3:15













av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

– the kamilz
Mar 7 at 11:14





av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err ); must give you what the error is, and I believe -5 is EIO, aka IO Error.

– the kamilz
Mar 7 at 11:14












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034379%2fffmpeg-av-read-frame-return-an-i-o-error-5%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034379%2fffmpeg-av-read-frame-return-an-i-o-error-5%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Google colab Transport endpoint is not connectedHow do I connect to a MySQL Database in Python?Google Colab is very slow compared to my PCGoogle Colab script throws “Transport endpoint is not connected”Presentation mode for Google Colab notebooksGoogle Colab: cell has not been executed in this session?Google Colab and tensorflow: How to hypertune and save a modelIs it possible to connect jupyter running on my laptop with google colabDisplaying all output with linebreaks in Google ColabUsing extensions in Google colabGoogle Colab Error: Buffered data was truncated after reaching the output size limit

IntelliJ IDEA underlines variables when using += in JAVA2019 Community Moderator ElectionHow can I permanently enable line numbers in IntelliJ?Is Java “pass-by-reference” or “pass-by-value”?When to use LinkedList over ArrayList in Java?How do I generate random integers within a specific range in Java?What is the scope of variables in JavaScript?How to determine if variable is 'undefined' or 'null'?How do I convert a String to an int in Java?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeCreating a memory leak with JavaHow to see JavaDoc in IntelliJ IDEA?

Лубенський полк