6

I'm trying to port FFmpeg into my NaCl module.

So far, my module linked ffmpeg and SDL libraries.

It already can play YUV format video which is directed load into memory and copy into YUVOverlay buffer (it's very easy).

Now, I want to use ffmpeg to decode video, but when I call the function avformat_open_input it returns -5 when input is URL string, such as rtmp:// or mmsh://; it returns -1052488119 when input is file name, such as /saved/tmp (I mount the file system - html5fs).


There are some questions:

  1. What means of -5 and -1052488119?
  2. If file can't open by avformat_open_input, is it possible the input type is from buffer not from file name or url string?

If I'm not clearly about my question or description, you can tell me. If you are doing the same thing or having the same problem, we can discuss together.

Thanks, Jar

Jar
  • 185
  • 3
  • 10
  • can you post your intial code where you are open the file and container format of the file which you are trying to open. In most case avfromat_open_input should work. – praks411 Jul 25 '13 at 10:46
  • I forgot to tell you, I use ffmpeg on my Native Client Module. I register these three functions. `avcodec_register_all(); av_register_all(); avformat_network_init();` and call avformat_open_input function `int r = avformat_open_input(&pFormatCtx, "/persistent/tmp", NULL, NULL);`. I got r = -2 when input is URL, r = -1052488119 when input is mp4 file. MP4 contain h264 video and acc audio. – Jar Jul 25 '13 at 11:49
  • I found that, for configure the network is disabled and protocol only enable file. That's why I can't parse the URL as input _(it returns -2)_. Even I enable all protocols and enable network, I still can't open file _(it returns -1052488119)_. – Jar Jul 29 '13 at 08:36
  • Now I use URL as input, I got the return value is `-5`. ****What means of it?**** – Jar Jul 29 '13 at 09:40
  • 1
    I check the error code, `-1052488119` means **Invalid data found when processing input** and `-5` means **Input/output error**. – Jar Jul 31 '13 at 08:27
  • No one know what happen for it? – Jar Jul 31 '13 at 08:31
  • @Jar ,is there any documentation for list of error codes and its meaning. – Pintu May 31 '20 at 14:36

2 Answers2

1

There is a ffmpeg port in naclports. Maybe that would be useful for you?

Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412
  • Thanks for your reply. This project just port a lot of libraries on NaCl. I can compile and run FFmpeg Library on my NaCl Module. I just don't know how to fixed the problem I mentioned, means why return value is that. So far, I can play video file on my NaCl, but can't play stream. – Jar Sep 26 '13 at 02:34
  • I have the same issue.. still the exists.. How did you solved the issue? – George Varghese Mar 24 '16 at 05:24
  • Would love to get a sample code using ffmepg with nacl, if you would like to share i would appreciate it much – Mohammad Abu Musa Jun 30 '16 at 00:34
0

you can find naclports at https://chromium.googlesource.com/webports/. They were moved from http://code.google.com/p/naclports/.

Yunus Can Emre
  • 174
  • 2
  • 7