pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

support for preferred language track
Goto page 1, 2  Next
 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo
 View previous topic :: View next topic  
Author Message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Sun May 25, 2008 9:52 am    Post subject: support for preferred language track Reply with quote

I got tired of adding mapping commands to ffmpeg_pram to select the eng audio track so I decided to add preferred language support to pytivo.

pytivo.conf parameter audio_lang sets the preferred language track used by pyTivo. ffmpeg/pytivo defaults to the first audio stream. Specifying this parameter, tells pyTivo to use the first audio stream that matches this entry if more than one audio stream exists. If your video source does not have language tags (ie. eng, ger, spa), you may specify the audio stream number reported by ffmpeg (ie. 0.1, 0.2 ect.). Stream references like 0x80, 0x81, etc. may also be specified. pyTivo will transcode the file if necessary to obtain the preferred language track.

Example settings:

audio_lang = eng
audio_lang = en
audio_lang = 0.2
audio_lang = 0x81

_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Sun May 25, 2008 9:21 pm    Post subject: Reply with quote

You can now also use the Override feature in combination with the preferred audio language feature to force pytivo to use a particular audio stream for all files in a folder.

For example, let's say you have set your preferred audio language to 'eng'. And you have a folder in which you know all the files in the series have eng as the third audio track, but only half the files have the eng tag required for pytivo to detect the eng audio track. Rather than temporaily change your audio_lang setting to 0.3 to transfer the files that do not have the eng audio tag, you can create a txt file named default.txt in the folder and add the following line.
Code:
Override_mapAud : 0.3, eng

Or you can add a line like this to the metadata txt file associated with each individual file. Just be sure to change 0.3 to the appropriate stream.

EDIT: edited to correct sample code.

_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Mon May 26, 2008 8:20 am    Post subject: Reply with quote

If the files are mpegs this doesn't really come into play as they can't support more than one audio stream, right?
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Mon May 26, 2008 9:07 am    Post subject: Reply with quote

Yes, mpegs will support multiple audio tracks. Try MpegStreamClip. I used it to copy a DVD to mpeg with all the audio tracks to test the 0x81, 0x82 track references with pytivo.
_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Mon May 26, 2008 10:05 am    Post subject: Reply with quote

I seem to run into problems sometimes when I use Videoredo because if I don't manually change the audio track it will sometimes use the director's narration, etc... Will this fix that?
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Mon May 26, 2008 11:51 am    Post subject: Reply with quote

Yes, as long as your file was created with more than one audio track.
_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Mon May 26, 2008 12:34 pm    Post subject: Reply with quote

doesn't look like you can make an mpeg with multiple audio tracks with videoredo. How do you do it with mpegstreamclip? the video I made from vob to mpeg only contains one audio track when I wanted it to contain 2.
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Mon May 26, 2008 12:54 pm    Post subject: Reply with quote

No, VideoRedo only saves one. Mpeg StreamClip saves all tracks by default. Or you can delete the tracks you don't want. Just open the DVD and select Save as mpg. No need to purchase the MPEG2 Playback Component the program warns you about. I only use the program to process files and steams and don't need to be able to view them. Although for the $30 Apple wants for the Playback Component, I guess this would make a cheaper editor than VideoRedo.
_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Mon May 26, 2008 1:27 pm    Post subject: Reply with quote

Maybe it's only with a DVD then. But I saved a vob file using mpegstreamclip and it only saved one out of 2 audio tracks by default. I guess it's only if you're going from dvd to mpeg and not vob to mpeg?
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Mon May 26, 2008 2:42 pm    Post subject: Reply with quote

Go to Preferences and uncheck the box that says convert only one audio stream. I probably unchecked that box on my install a while back.
_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Mon May 26, 2008 3:00 pm    Post subject: Reply with quote

Ah! I had the last most stable version but the version you're talking about is beta. So I download the beta one and it works. thanks for your help.
Back to top
View user's profile Send private message
edtee



Joined: 08 Feb 2008
Posts: 19

PostPosted: Wed May 28, 2008 1:38 am    Post subject: Thanx Reply with quote

Thank you. Very Happy
This has been one of the biggest/updates additions to pytivo, I wanted, ever since I first intalled it on my PC. Definitely will try this out and use it lots. I do have one question, or two, though...
I always want english audio if available, but I have many files that use the code "ENG" and some use "EN". If I set my config file to EN, will your code work properly with all files since, EN is a partial match for ENG? If such a partial match is not the way to set it up... Is there a preference order for this kind of situation? ie audio_lang = eng , en Would look for "eng" first and if no match use "en" as a secondary choice, if present.

Once again, thanks for this feature and all your work.

_________________
Love my Tivo, but I love the independent developer's software over the "official" stuff.
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Wed May 28, 2008 2:34 pm    Post subject: Reply with quote

Yes, if you set audio_lang to en, it will match en or eng.


I'm also thinking about making some changes to the way I set this up. Currently you can only specify one Override statement per file. This might be a bit limiting if you like to switch back and forth between two languages. It would also prevent you from flagging both your main track as 'eng' and your directors commentary track as 'dir', so that you could isolate and select the commentary when desired.

I'm going to look into changing it so that you can add Override statements to define all the audio tracks in a file. You could then add multiple statements like the following and then select any available language track by changing the config to a new language.

Code:
Override_mapAud : 0.1, ger
Override_mapAud : 0.2, eng
Override_mapAud : 0.3, spa
Override_mapAud : 0.4, dirger
Override_mapAud : 0.5, direng

_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
wgw



Joined: 06 Jan 2008
Posts: 225

PostPosted: Fri May 30, 2008 5:12 pm    Post subject: Reply with quote

I've updated the audio mapping so that the language tags for all audio streams can be replaced with Override statements. The syntax has changed a bit. Below are example override statements one might use to define all the tracks on a dvd.

Code:
Override_mapAudio 0.1 : eng
Override_mapAudio 0.2 : eng 5.1
Override_mapAudio 0.3 : eng DTS
Override_mapAudio 0.4 : fre
Override_mapAudio 0.5 : spa
Override_mapAudio 0.6 : eng dir
Override_mapAudio 0.7 : fre dir


You can now also specify multiple parameters in the audio_lang setting.
Code:
audio_lang=5.1, dts, en

With the above setting, pytivo will search for the first track labeled with 5.1. If it does not find a match, it will look for dts. If it does not find a match, it will use the first track containing en anywhere in the tag.

_________________
Download pyTivo
my pyTivo branch
Back to top
View user's profile Send private message
sicklybutsexy



Joined: 05 Mar 2008
Posts: 74
Location: chicago

PostPosted: Tue Jun 03, 2008 1:33 pm    Post subject: Reply with quote

I'm trying to get a handle on the audio tracks option and have been having problems. For instance in my "global server settings" I put "0x80" so that that would be the stream that was always be encoded. However, I've been ruuning into issues with the screen becoming jumbled and a starting and stopping phenomenon which stops if I take the "0x80" off. Right now I'm transcoding a movie using mpegstreamclip and the audio track says "130 AC3 3/2". Is that what I should be putting in my global server settings? Thanks for your help in advance...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO
[ Time: 0.3161s ][ Queries: 13 (0.2169s) ][ Debug on ]