NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 2 3 4 5 6 … 125 Next »
Mencoder with multiple TS audio streams

 
  • 0 Vote(s) - 0 Average
Mencoder with multiple TS audio streams
lanmat
Offline

Junior Member

Posts: 8
Threads: 2
Joined: Sep 2009
#1
2009-11-07, 04:41 AM
I've been playing with using mencoder to do the double whammy of excising commercials (with aid of comskip) and to transcode to mpeg4 so my 1.5TB hdd isn't full after a month of HD recording. I think I've finally got a recipe that results in acceptable quality in a file small enough to stream over wireless to my laptop (and using a video codec that doesn't push my cpu usage through the roof, <cough!>x264<cough!>). Mencoder code at bottom of post...comments welcome, hopefully with an answer to my main question:

On almost all programs recorded from my HDHomerun, there are 2 audio streams (I can see them with media player classic under the filters submenu). The second stream is sometimes another language like spanish, but sometimes it's in english and includes a drab narration voice-over. I assume since it pops up as english, it gets included in my transcoded .avi's. I figured out I can use -aid to select the 'non-narration' audio stream, but the actual audio ID changes from program to program. -aid 84 might work for one program to isolate the correct stream, but another requires -aid 52.

Anyone know of a better way to use ONLY the first audio stream or to figure out how to determine which aid is the main audio channel w/o the "extras"?


[SIZE="1"]Current mencoder batch file:
REM Pass #1
"c:\program files\gbpvr\mencoder" %1 -edl "%~dpn1.edlp" -o "%~dpn1.avi" -aid 52 -oac mp3lame -lameopts fast:preset=standard -vf pp=de/md -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:qpel:trell:v4mv:lumi_mask=0.2:vmax_b_frames=1:cmp=3Confusedubcmp=3:autoaspect:vbitrate=4000:vpass=1:turbo:threads=1
REM Pass #2
"c:\program files\gbpvr\mencoder" %1 -edl "%~dpn1.edlp" -o "%~dpn1.avi" -aid 52 -oac mp3lame -lameopts fast:preset=standard -vf pp=de/md -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:qpel:trell:v4mv:dia=-2:lumi_mask=0.2:vmax_b_frames=1:cmp=3Confusedubcmp=3:autoaspect:vqmax=10:vbitrate=4000:vpass=2:threads=1 [/SIZE]
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2009-11-08, 07:35 AM
might try "-alang en" to select language, sometimes only gets first english track so may work in your case...at least you know you'll only get English tracks..Smile
typically the first one is the main one of any language..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
lanmat
Offline

Junior Member

Posts: 8
Threads: 2
Joined: Sep 2009
#3
2009-11-09, 12:15 PM
Negatory. I suppose since the narration is in english, it gets chosen as well. Here's a snippet of the output when using -v mode for two programs w/ different aid streams:

Program 1:
[SIZE="1"]COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 0, TLEN: 13, COLLECTED: 184
PARSE_PAT: section_len: 13, section 0/0
PROG: 5 (1-th of 1), PMT: 80
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 2, TLEN: 55, COLLECTED: 184
FILL_PMT(prog=5), PMT_len: 184, IS_START: 64, TS_PID: 80, SIZE=184, M=0, ES_CNT=
3, IDX=0, PMT_PTR=01573730
...descr id: 0x86, len=7
PARSE_PMT(5 INDEX 0), STREAM: 0, FOUND pid=0x51 (81), type=0x10000002, ES_DESCR_
LENGTH: 9, bytes left: 28
...descr id: 0x81, len=7
PARSE_PMT(5 INDEX 1), STREAM: 1, FOUND pid=0x54 (84), type=0x2000, ES_DESCR_LENG
TH: 9, bytes left: 14
...descr id: 0x81, len=7
PARSE_PMT(5 INDEX 2), STREAM: 2, FOUND pid=0x55 (85), type=0x2000, ES_DESCR_LENG
TH: 9, bytes left: 0[/SIZE]

Program 2:[SIZE="1"]
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 0, TLEN: 13, COLLECTED: 184
PARSE_PAT: section_len: 13, section 0/0
PROG: 3 (1-th of 1), PMT: 48
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 2, TLEN: 55, COLLECTED: 184
FILL_PMT(prog=3), PMT_len: 184, IS_START: 64, TS_PID: 48, SIZE=184, M=0, ES_CNT=
3, IDX=0, PMT_PTR=003FFFC0
PROG DESCR, TAG=81, LEN=7(7)
...descr id: 0x86, len=7
PARSE_PMT(3 INDEX 0), STREAM: 0, FOUND pid=0x31 (49), type=0x10000002, ES_DESCR_
LENGTH: 9, bytes left: 19
...descr id: 0x81, len=7
PARSE_PMT(3 INDEX 1), STREAM: 1, FOUND pid=0x34 (52), type=0x2000, ES_DESCR_LENG
TH: 9, bytes left: 5
PARSE_PMT(3 INDEX 2), STREAM: 2, FOUND pid=0x35 (53), type=0x2000, ES_DESCR_LENG
TH: 0, bytes left: 0[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Automated Cutting and Transcoding Guide Using Mencoder -stattik- 885 278,780 2010-01-16, 04:32 AM
Last Post: -stattik-
  mencoder error messages fvfv 3 2,779 2009-10-19, 08:07 PM
Last Post: -stattik-
  WMA Lossless Audio files. GBPVR and musicscanner sprogger 4 2,493 2009-01-31, 05:13 PM
Last Post: mvallevand
  Warning: Mencoder and large MPEG2 files can fail jam_zhou 1 1,624 2008-07-26, 01:39 AM
Last Post: sgilani
  Syntax errors running both BBDMUX and Mencoder versions of RETIME jksmurf 3 2,231 2008-02-19, 12:22 AM
Last Post: jksmurf
  moviewiz 1 movie multiple files doc99 3 1,655 2008-01-27, 08:59 PM
Last Post: JavaWiz
  How to setup I-xmltv to work with multiple Schedules Direct Lineups? Anthony 4 2,389 2007-10-13, 12:58 AM
Last Post: Anthony
  Mencoder -edl with Comskip and ShowAnalyzer gnutech 19 7,052 2006-12-16, 01:35 AM
Last Post: gnutech
  CDK With Multiple Tuners tweeknockr 3 1,877 2006-10-25, 09:00 PM
Last Post: KingArgyle
  Extract audio from mpeg video Michael Gentile 2 1,644 2006-05-03, 08:23 PM
Last Post: daveid

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode