Jump to content

Audio: Undefined Language on AVI video files


Recommended Posts

plittlefield
Posted (edited)

Is there a way for Emby Server to read the metadata in an AVI video file to show the correct audio Language?

In Emby for Roku and iOS it currently shows Audio: Und AAC Stereo instead of 'English AAC Stereo'  (shown in first attached image)

I appreciate that AVI is "old hat" but I'm hoping to get the devs to make this possible.

Attached are some more screenshots of both mplayer and mediainfo to show they can read the metadata correctly for AVI files to show the language 'English'.

All my AVIs have been created using ffmpeg and follow the AVI standard for metadata:-

ffmpeg -i input.mkv (other options) -metadata:s:a:0 title="English" -metadata IAS1=eng output.avi

Thank you!

Regards,

Paully

photo_2022-08-22_11-46-06.jpg

2022-08-22_11-42.png

2022-08-22_11-41.png

Edited by plittlefield
rbjtech
Posted (edited)

the standard way to set language metadata using ffmpeg is -metadata:s:a:1 language=eng

Emby uses ffprobe to get the original attributes - so this is likely a syntax issue ?   I think you need to specify the audio track ?

Edited by rbjtech
plittlefield
Posted (edited)
2 hours ago, rbjtech said:

the standard way to set language metadata using ffmpeg is -metadata:s:a:1 language=eng

Emby uses ffprobe to get the original attributes - so this is likely a syntax issue ?   I think you need to specify the audio track ?

Yes, you are correct with your syntax for setting the language with files such as MP4 or MKV format.  However, this particular syntax does not work with AVI files.

Here is the output of the AVI file using ffprobe ...

image.png.8bc5c8470673e106cc65744a93312783.png

...and IAS is the correct metadata option to read the ISO language code from AVI files.

  • IAS1 is the first audio track.
  • IAS2 is the second audio track.
  • etc

I think the acronym IAS stands for "International Audio Standard".

So, I wonder if the nice devs can make ffprobe in Emby Server read that metadata option like 'mediainfo' or 'mplayer' do? 🙂

Regards,

Paully

 

Edited by plittlefield
rbjtech
Posted (edited)

interesting - i would have thought that ffmpeg was generic enough to just pickup this language data - the container shouldn't matter

ffprobe.exe -i file:"filename.avi" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data

the above is what emby runs to identify the details - could you run on one of your AVI files ?

the info I think it needs is under 'tags' - "language": "eng"

note the 'title' is not the language - it is the title of the track.

I suspect you do not have a 'language' section - thus you get a 'Und'

Maybe post your output here  ?

if the language metadata is not possible in an AVI container I'd be surprised ...

did you try 

ffmpeg -i input.mkv (other options) -metadata:s:a:1 title="This_is_the_Audio_1_Track_Title" -metadata:s:a:1 language=eng output.avi
Edited by rbjtech
plittlefield
Posted (edited)
19 hours ago, rbjtech said:

 

ffprobe.exe -i file:"filename.avi" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data

the above is what emby runs to identify the details - could you run on one of your AVI files ?

Yes, no problem.

I note there is no specific 'tag' for 'language' in the 'audio' section and the IAS1 metadata entry I mentioned appears NOT in the audio section, like this ...

image.png.79fa935cba168e5139674281388b4300.png

So, I guess that kind of explains why Emby Server is not finding it, but I have to ask why 'mediainfo' reports the audio language correctly?!

 

19 hours ago, rbjtech said:

did you try ...

ffmpeg -i input.mkv (other options) -metadata:s:a:1 title="This_is_the_Audio_1_Track_Title" -metadata:s:a:1 language=eng output.avi

I will try that now on a new file ...

... and as I suspected, the audio metadata tag for language is completely missing after running that command.

image.png.eacf6330e11e7f9c387f6c34d5059a0e.png

and from ffprobe ...

image.png.19d5a9b8ac6a8254bfdfa9121ff11055.png

So, as I have been saying, you cannot use the standard ffmpeg -metadata:s:a:0 language=eng commands when trying to set the audio language tag on an AVI file.

The only way to set it is by using the special IAS tag.

This is a limitation of the AVI standard and why technology moved on to MP4 and then MKV containers which are much better at this sort of thing!

So, my question still stands ...

Can the Emby team please allow ffprobe in Emby Server to use the IAS1 tag to read the 3 letter country ISO code in AVI files?

    "format": {
        "filename": "file:movie.avi",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "avi",
        "format_long_name": "AVI (Audio Video Interleaved)",
        "start_time": "0.000000",
        "duration": "5344.682667",
        "size": "315552152",
        "bit_rate": "472323",
        "probe_score": 100,
        "tags": {
            "IAS1": "eng",
            "title": "Movie",
            "software": "Lavf59.20.101"
        }
    }

Thank you!

Regards,

Paully

 

Edited by plittlefield
rbjtech
Posted

Agreed with your findings - sorry, it's been a while since I played with AVI !

I would probably suggest this going into the Feature Request section ?

@Luke @ebr

Please could we have your thoughts ?

Thanks.

plittlefield
Posted (edited)

@rbjtech @Luke @ebr 

That would be awesome ... is there anything you need me to do, upload a test file or more information?

I can do, say, a one minute AVI of Big Buck Bunny?

Edited by plittlefield
Happy2Play
Posted (edited)

From a little research avi cannot be tagged like other formats as they use RIFF tags.

Devs would have to add reading this "IAS1" and mapped to first track.

Edited by Happy2Play
plittlefield
Posted

All I am going to say is “please make it happen”.

The software ‘mediainfo’ is open source so the devs can have a look at the code it uses to read and display the audio language in AVI files.

😉

plittlefield
Posted

Fingers crossed.

rbjtech
Posted (edited)

A question I will ask - just out of curiosity - is why are you continuing to use AVI ? 🤪

If it's a case of keeping the original codecs - then that is fine, you can just do a 1:1 copy of the codecs into a MKV container if you wanted to ?   

A quick script using mkvmerge will make this an easy process..

Edited by rbjtech
plittlefield
Posted
2 minutes ago, rbjtech said:

A question I will ask - just out of curiosity - is why are you continuing to use AVI ? 🤪

Just a long long time script that was brought over from my old Plex days when I HAD to make 3 different versions of a movie so that Plex would play it direct.

This still works quite nicely with Emby actually, because the server sees the 3 different versions and automatically offers the most appropriate version to any client and still plays direct without the need for transcoding.

  • Movie (YEAR) - SD.avi
  • Movie (YEAR) - HD.mp4
  • Movie (YEAR) - FHD.mkv

I find the 480p AAC AVI version downloaded 'as original' works beautifully on my phone with stereo headphones.

The 720p AC3 MP4 is my standard for tablets and for friends streaming from my server - they have never had any problems.

Then, the 1080p DTS MKV is for the movies on the front room TV at night with the surround sound.

That's it really, it works.

Yes, I guess I could change the container from AVI to MKV and be sorted but I guess I'm not the only one with a bunch of AVIs 🙂

Hope that covers it.

Regards,

Paully

  • Thanks 1
Posted
6 hours ago, plittlefield said:

Yes, I guess I could change the container from AVI to MKV

Hi.  I would definitely suggest doing that going forward.  AVI is an antiquated container.  There are much better options now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...