Audio/Video Sync issue with HD transcoding
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4 My machine has dual dual-core CPUs and 4 GB memory running Windows XP SP2. Thanks in advance.
Hi, On 5/29/2009 2:35 PM, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
My machine has dual dual-core CPUs and 4 GB memory running Windows XP SP2.
Can you please share your sample ? So I can have a look. Thanks. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
Sure I can do that. The samples might be big. Do you have a good file sharing server? On Sat, May 30, 2009 at 6:58 PM, Baptiste Coudurier < baptiste.coudurier at gmail.com> wrote:
Hi,
On 5/29/2009 2:35 PM, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file:// 192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts -threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
My machine has dual dual-core CPUs and 4 GB memory running Windows XP SP2.
Can you please share your sample ? So I can have a look.
Thanks.
-- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Ke Yu wrote:
Sure I can do that. The samples might be big. Do you have a good file sharing server?
Sure, please follow http://www.ffmpeg.org/bugreports.html PS: Please do not top-post on the ml -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Fri, 2009-05-29 at 17:35 -0400, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
My machine has dual dual-core CPUs and 4 GB memory running Windows XP SP2.
Thanks in advance.
I had a similar issue with converting my ATSC recordings to NTSC DVD quality. I only make use of the target option of ntsc-dvd. I found I had to not enable libamr-nb or libamr-wb when compiling. Actually not sure if both really need left out, but since it fixed my audio sync issue I'm not bothering with it further. I now get the following initial errors when converting, but I believe it was the use of the gop option which was causing the audio sync issue. [NULL @ 0x1fa2140]Unknown option 'gop' [swscaler @ 0x1fa3170]Unknown option 'gop' Hope this helps if you haven't already resolved the issue.
2009/7/3 MF <majesticfear at wowway.com>:
On Fri, 2009-05-29 at 17:35 -0400, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
My machine has dual dual-core CPUs and 4 GB memory running Windows XP SP2.
Thanks in advance.
I had a similar issue with converting my ATSC recordings to NTSC DVD quality. ?I only make use of the target option of ntsc-dvd. ?I found I had to not enable libamr-nb or libamr-wb when compiling. ?Actually not sure if both really need left out, but since it fixed my audio sync issue I'm not bothering with it further. ?I now get the following initial errors when converting, but I believe it was the use of the gop option which was causing the audio sync issue.
[NULL @ 0x1fa2140]Unknown option 'gop' [swscaler @ 0x1fa3170]Unknown option 'gop'
Hope this helps if you haven't already resolved the issue.
also try -async 24 before -i
Mike Martin wrote:
2009/7/3 MF <majesticfear at wowway.com>:
On Fri, 2009-05-29 at 17:35 -0400, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
[...]
also try -async 24 before -i
I'm just curious, what would be the logic behind 24? I have had audio sync issues with a previous version of ffmpeg (haven't tried the same encoding with the latest one I have now), and if it happens again I would give this a try. But why 24?
2009/7/7 sting <sting at bloodwolf.org>:
Mike Martin wrote:
2009/7/3 MF <majesticfear at wowway.com>:
On Fri, 2009-05-29 at 17:35 -0400, Ke Yu wrote:
I compiled FFmpeg together with faac and x264 libraries from latest code. I need to transcode video files from 1080i transport stream to 720p mp4 format. The transcoded video/audio quality is fine. However, the audio and video streams are out of sync (audio is a few second late) in the mp4 file. The source transport stream has no problem. Anyone has any idea how to config the FFmpeg correctly? Here's the comand line I use: ffmpeg -i input.ts<file://192.168.120.13/share/IPTVRecorder/1852atlanta2009-05-27T201500Z.ts>-threads 4 -f mp4 -vcodec libx264 -s 1280x720 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 6000k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 128k -ar 48000 -ac 2 output.mp4
[...]
also try -async 24 before -i
I'm just curious, what would be the logic behind 24? ?I have had audio sync issues with a previous version of ffmpeg (haven't tried the same encoding with the latest one I have now), and if it happens again I would give this a try. ?But why 24?
Just trial and error on my part - just seemed to be the sweet spot. There seems to be different interpretations about what it does but my understanding is that it resample (resyncs?) 24 times every second Not used with HD but works with vob rips, mpgs and vcr captures
participants (5)
-
baptiste.coudurier@gmail.com -
jingke2000@gmail.com -
majesticfear@wowway.com -
redtux1@googlemail.com -
sting@bloodwolf.org