Ffmpeg encoder & foreign characters

Howdy!

With the node/ffmpeg setup, we’re having a problem with videos that have foreign characters in them not encoding properly.

A member will upload a video titled “Baño 001”. <— Notice the n is a non-English character.

Then we get:

==================================
= Success : Encoding Successfull =
==================================
{ file_id: 1,
  file_url: 'http://127.0.0.1:1203/Baño-001.mp4',
  status: 3,
  file_name: 'Baño-001.mp4' }
ffmpeg -i ./queued/Baño-001.mpg -loglevel quiet -filter:v yadif -an -ss 1 -t 00:00:01 -r 1 -vframes 1 -y -vcodec mjpeg -f mjpeg "./temp/Baño-0010.jpg" 2>&1
stdout:
stderr:

I didnt include all of the log file for this video, because that’s not important. What is important is the filename of Baño-001.mpg. I believe this to be a bug in either the node script, or the wordpress plugin part of the script that is doing something goofy with foreign characters. I dont know how to fix this myself. A suggestion, would to be to strip all non-English characters, though, as that appears to be the issue at hand.

Even though the video encodes, with such a strange filename, the callback from WordPress does not fetch the file nor the screenshots. As many of our members speak other languages, this is a daily problem for us to fix right now, and the only fix we can do is delete their uploads and make them angry. :slight_smile:

*Please note, that the ffmpeg/node plugin was purchased by the site owner, and not part of my account. We do own the license for it, but it wont show up under this username.

Thanks very much!

Bump!

@illusionsglass sorry for missing this. For last 2-3 days, our focus was shifted to license related issues.

For encoding service, there are 3 different types of codes into picture:

  1. PHP code (wordpress + rtMedia plugin)
  2. Rails app (which provides api)
  3. Node.js app (where actual video conversion happens)

As we never deal with non-English characters, it will be hard for us to foresee all possible language specific issues involved.

So will it be acceptable, if rtMedia renames non-english file to valid english character range at the time of upload? Only downside is - some files will be renamed. But it will work nicely across all 3 platforms/languages involved.

A sample code is here - http://stackoverflow.com/questions/9838994/replace-special-characters-before-the-file-is-uploaded-using-php (part of accepted answer)

Also, this kind of change will be quicker to implement.

Please let me know your feedback. If renaming works for you, we will do this as first thing in morning. (It’s Sunday 10:30PM here)

Thanks @rahul286 I understand completely. :slight_smile:

Renaming the file on upload would indeed be a perfect solution!

Ben

@sanketparmar please start work on this. As discussed.

Hi @illusionsglass,

This issue has been fixed in latest release of rtMedia v3.7.12. Please check and let us know if you still face the issue.

Howdy guys!

I saw one uploaded today. Here’s the htop output when its encoding:

ffmpeg -i ./queued/-танцуя-Жесть-супертверк-8211-from-YouTube.

…and the title of the video as entered by the uploader is:

Обосралась танцуя! Жесть! #супертверк - from YouTube

The fix seems to work well for most videos, this one slipped past it. Any ideas?

Thanks!

Ben

Hi @illusionsglass,

Can you give us sample video so that we can debug the issue? Can you please check the video is converted or not?

Hi @sanketparmar sure, I can send it to you. Could you please send me a message with your email address and I will send it along!

Ben

Hi @illusionsglass,

Please send me a private message with video here.