MrWizard
3rd May 2006, 23:58
I have a H.264 720p 59.94 FPS 5-minute sample and the AC3 audio to go with it. I want to multiplex into a transport stream, and what I'm trying isn't working 100%. I tried ffmpeg, as bond suggested in a different thread, but with varying results. If I simply mux the video in on its own as follows, it will play in Mplayer but not VideoLan. Here is the command line (identical to what bond posted):
ffmpeg -f h264 -i "720p-5min-60fps-OFR.h264" -vcodec copy -f mpegts output.ts
However, if I try to multiplex in the audio as well, it seems like the audio and video is not synced and the video plays very choppy in MPlayer:
ffmpeg -f h264 -i "720p-5min-60fps-OFR.h264" -f ac3 -i "5min.ac3" -vcodec copy -acodec copy -f mpegts output.ts
I get a lot of Error while decoding frame! messages and a few Too many audio packets in the buffer: (4096 in 750080 bytes) near the end, right before MPlayer crashes. Is this a problem with MPlayer, the way ffmpeg multiplexes, something stupid I'm doing, or all of the above?
I have another issue that may be related (?). The clip above was encoded from a MPEG2 TS I got from an OTA HDTV channel (FOX I think). I encoded with DGDecode+AviSynth+MeGUI+x264.
I also tried to cut the framerate in half (SelectEven) and encode from that, so I'd have a 5-minute 30 FPS H.264 sample as well. However, when I mux to MP4, then extract the raw H.264 stream (mp4box), then multiplex into a TS as I did for the 60 FPS sample above (no audio), I have problems. When MPlayer opens, it doesn't detect the 29.97 frame rate, and assumes 59.94. The message reads: FPS seems to be: 59.940060. I'm not sure why it is doing that. Even when I include "-r 29.97" and in the ffmpeg command line, I have the same problem.
Any suggestions or hints would be very much appreciated!
Edit: P.S. I might add that the purpose of all this is to test the H.264 decoding capabilities of a STB that just arrived.
ffmpeg -f h264 -i "720p-5min-60fps-OFR.h264" -vcodec copy -f mpegts output.ts
However, if I try to multiplex in the audio as well, it seems like the audio and video is not synced and the video plays very choppy in MPlayer:
ffmpeg -f h264 -i "720p-5min-60fps-OFR.h264" -f ac3 -i "5min.ac3" -vcodec copy -acodec copy -f mpegts output.ts
I get a lot of Error while decoding frame! messages and a few Too many audio packets in the buffer: (4096 in 750080 bytes) near the end, right before MPlayer crashes. Is this a problem with MPlayer, the way ffmpeg multiplexes, something stupid I'm doing, or all of the above?
I have another issue that may be related (?). The clip above was encoded from a MPEG2 TS I got from an OTA HDTV channel (FOX I think). I encoded with DGDecode+AviSynth+MeGUI+x264.
I also tried to cut the framerate in half (SelectEven) and encode from that, so I'd have a 5-minute 30 FPS H.264 sample as well. However, when I mux to MP4, then extract the raw H.264 stream (mp4box), then multiplex into a TS as I did for the 60 FPS sample above (no audio), I have problems. When MPlayer opens, it doesn't detect the 29.97 frame rate, and assumes 59.94. The message reads: FPS seems to be: 59.940060. I'm not sure why it is doing that. Even when I include "-r 29.97" and in the ffmpeg command line, I have the same problem.
Any suggestions or hints would be very much appreciated!
Edit: P.S. I might add that the purpose of all this is to test the H.264 decoding capabilities of a STB that just arrived.