Hi folks and Major.
Maybe you could help me with this one. I have transport streams captured via a HDTV card. I'm trying to use ffmpegx to re-encode them to libavcodec mpeg-4 using mencoder but mencoder doesn't seem to recognise the audio. The audio definately does exist as it plays fine with mplayer. Also noteworthy is that when I use any codec with ffmpeg the audio is recognised and encodes fine! But I'd like to use mencoder.
mencoder should recognise ac3 audio should it not? ffmpegx detects the audio as ac3, 480000 Hz, stereo 384 kb/s so I can't understand why there would be a problem. i've tried all the things I've seen mentioned in the past with audio problems like selecting a different numbered track or inverting the mapping but that hasn't worked.
Below is the audio section that is output when watching the progress with a terminal window.
Code:G5:~ G5$ /Applications/ffmpegX_0.0.9r/ffmpegX.app//Contents/Resources/pbpaste | sh Encoding started on Thu Feb 24 22:22:55 EST 2005 MEncoder dev-CVS-050123-19:55-3.3 (C) 2000-2005 MPlayer Team Mac OSX static build for ffmpegX AltiVec found CPU: PowerPC File not found: 'frameno.avi' Failed to open frameno.avi success: format: 0 data: 0x0 - 0x205e5e9 MPEG-PS file format detected. Too many video packets in the buffer: (261 in 8393956 bytes). Maybe you are playing a non-interleaved stream/file or the codec failed? For AVI files, try to force non-interleaved mode with the -ni option. MPEG: No audio stream found -> no sound. VIDEO: MPEG2 1920x1088 (aspect 3) 25.000 fps 11800.0 kbps (1475.0 kbyte/s) [V] filefmt:2 fourcc:0x10000002 size:1920x1088 fps:25.00 ftime:=0.0400 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1 Opening video filter: [scale w=640 h=352] Opening video filter: [pp=md] ========================================================================== Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough VDec: vo config request - 1920 x 1088 (preferred csp: Mpeg PES) [PP] Using external postprocessing filter, max q = 6. Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. VDecoder init failed :( Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2)) ========================================================================== Writing AVI header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. VDec: vo config request - 1920 x 1088 (preferred csp: Planar YV12) [PP] Using external postprocessing filter, max q = 6. VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. SwScaler: reducing / aligning filtersize 2 -> 1 SwScaler: reducing / aligning filtersize 2 -> 1 SwScaler: reducing / aligning filtersize 2 -> 2 SwScaler: reducing / aligning filtersize 2 -> 2 SwScaler: FAST_BILINEAR scaler, from Planar YV12 to Planar YV12 using AltiVec videocodec: libavcodec (640x352 fourcc=58564944 [XVID]) Pos: 0.0s 1f (25%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] 1 duplicate frame(s)! ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. ETC...
Results 1 to 8 of 8
-
-
Thanks for the reply Major,
any advice on how to mux them together? Will the following work? (Cant check it for a few hours.)
1. encode the audio only to mp3 via ffmpeg
2. encode the video with mencoder.
3. Set the video on passthrough and use the "add audio" button to merge the two?
If not maybe some other app will do it well? I would like to stick with the high quality results of mencoder to libavcodec mpeg-4 if I can so anything that can mux the encoded video file and mp3 audio will be great, unless there is something that produces a better result?
Thanks for the info so far.
Originally Posted by major
-
Well,
I am completely and utterly beaten by this. I tried the method I described above (along with the muxing option in the tools section) and it works but the audio is out of sync.
What I am basically doing is
Video Source is a transport Stream mpeg2, 1920x1088, 11800kbps, 25fps
Audio Source is ac3, 48000Hz, 384 kbps
I'm encoding the video to mpeg4 [.avi] (mencoder)
640x352 16:9 1265 kbit/sec 25fps
Then encoding the audio to mp3, 48000 Hz, 128kbit/s
When I mux them the audio is out of sync with the video. Obviously I must be doing something wrong somewhere as this shouldn't be this difficult!
Can anybody help?
Originally Posted by ncg
-
Your process seem correct. How did you mux the audio and how much it was offsync? You may also try MPEG Streamclip to demux the transport stream so as you could mux directly the video with the source ac3 audio.
-
In the video tools sections I first selected the video, then the audio. Selected AVI + Audio then hit the Mux button. The audio was the ac3 from MPEG Streamclip (taken from the "Demux to M2v and AC3" option) as I had used it to trim out some unwanted sections. The video was outputted from MPEG Streamclip with the "convert to TS" option. Am I supposed to be outputing via one of the other choices?
ffmpegx doesn't seem to accept the .M2V files as input.
Initially the audio is in sync but over time it slowly goes out until at the 15 minute point it becomes unwatchable. Probably less than half a second at this point but slowly growing.
PS When exporting from MPEG Streamclip I am getting warnings about occasional databreaks. Does this mean anything connected?
Originally Posted by major
-
Thanks Major,
Maybe save yourself some time but I think the problem was with the ac3 output from MPEG Streamclip. I just tried ProjectX and the audio stayed in sync. So all is well.
Originally Posted by major
Similar Threads
-
How do I play h264 transport stream (.ts) with AC3 audio on an Xbox 360?
By bubbrubb in forum Video ConversionReplies: 4Last Post: 12th Feb 2011, 15:02 -
no audio from transport/program stream file when i try to encode
By uptonm in forum Capturing and VCRReplies: 0Last Post: 20th Mar 2010, 10:41 -
MPEG-2 transport stream... how to mux audio/video?
By Navstar in forum ffmpegX general discussionReplies: 1Last Post: 19th Feb 2010, 17:22 -
multiple audio tracks in transport stream
By levide in forum Video ConversionReplies: 2Last Post: 17th Jul 2008, 12:58 -
Extract problem dolby audio from transport stream
By DVWannaB in forum Video ConversionReplies: 7Last Post: 17th Aug 2007, 22:35