Video and audio out of sync - general question
Hi, I am converting HD video (H264, mp2/ac3, TS container) captured from cable TV into mp4 container (x264, aac). I am also copy (if existing the original ac3 stream as an additional stream into the mp4 container, especially in case of a 5.1 audio. Sometimes happens the audio is not in sync with video. In this case I use the asyncts filter with 'first_pts=0'. This works well but only if I encode all audio streams. Is it really necessary to encode instead of copy? I tried to copy the stream and using the filter, but the audio was still not in sync. Is there a special order of parameter relevant? Bye Frank
Frank Häfemeier <ffmpeg <at> frank.haefemeier.eu> writes:
I am converting HD video (H264, mp2/ac3, TS container) captured from cable TV into mp4 container (x264, aac). I am also copy (if existing the original ac3 stream as an additional stream into the mp4 container, especially in case of a 5.1 audio.
Sometimes happens the audio is not in sync with video.
Command line and complete, uncut console output missing / please share a sample. Carl Eugen
Am Sonntag, den 18.11.2012, 21:17 +0000 schrieb Carl Eugen Hoyos:
Frank Häfemeier <ffmpeg <at> frank.haefemeier.eu> writes:
I am converting HD video (H264, mp2/ac3, TS container) captured from cable TV into mp4 container (x264, aac). I am also copy (if existing the original ac3 stream as an additional stream into the mp4 container, especially in case of a 5.1 audio.
Sometimes happens the audio is not in sync with video.
Command line and complete, uncut console output missing / please share a sample. I will send an example and related output, if I get one.
But in first place it is not the point, to get a audio out of sync. I would like know (for my understanding) if it is in general necessary to recode the audio stream if I want to use a filter graph. More precisely: has a filter graph an effect in case of the parameter '-codec:a copy'? Bye Frank
Frank Häfemeier <ffmpeg <at> frank.haefemeier.eu> writes:
has a filter graph an effect in case of the parameter '-codec:a copy'?
It has no effect on audio. Carl Eugen
________________________________
From: Carl Eugen Hoyos <cehoyos@ag.or.at> To: ffmpeg-user@ffmpeg.org Sent: Sunday, 18 November 2012, 22:59 Subject: Re: [FFmpeg-user] Video and audio out of sync - general question
Frank Häfemeier <ffmpeg <at> frank.haefemeier.eu> writes:
has a filter graph an effect in case of the parameter '-codec:a copy'?
It has no effect on audio.
Carl Eugen
Im still getting these problems, as i posted before. As a recap 1. On a change in encoding of audio rate/channels ffmpeg goes into an error loop, BUT only if "-async 1" is used 2. Without "-async 1" i have 2 out of 3 channels with lipsync errors, i have a 80mb recording of this channel if you want a copy to see, or i could record 1GB and put on our ftp server for you to download? I have restart 3 channels, 1 with "-async 1" and two without, and will see when they start losing sync joolz
JULIAN GARDNER <joolzg <at> btinternet.com> writes:
Im still getting these problems, as i posted before. As a recap
I re-read this whole thread (and it seems I completely misunderstood Frank), but I did not find a problem that you posted;-(
1. On a change in encoding of audio rate/channels ffmpeg goes into an error loop, BUT only if "-async 1" is used
Command line and complete, uncut console output missing / did you report this? a loop sounds important.
2. Without "-async 1" i have 2 out of 3 channels with lipsync errors, i have a 80mb recording of this channel
Command line and complete, uncut console output missng and please provide a sample that is long enough to allow to easily reproduce your issue. Carl Eugen
Am Freitag, den 30.11.2012, 17:20 +0000 schrieb Carl Eugen Hoyos:
JULIAN GARDNER <joolzg <at> btinternet.com> writes:
Im still getting these problems, as i posted before. As a recap
I re-read this whole thread (and it seems I completely misunderstood Frank), but I did not find a problem that you posted;-(
IMHO, I provoke the misunderstanding, because the subject was wrong in sense of what I wanted to know. Sorry. Frank
I am converting HD video (H264, mp2/ac3, TS container) captured from cable TV into mp4 container (x264, aac). I am also copy (if existing the original ac3 stream as an additional stream into the mp4 container, especially in case of a 5.1 audio.
Sometimes happens the audio is not in sync with video. In this case I use the asyncts filter with 'first_pts=0'. This works well but only if I encode all audio streams.
Is it really necessary to encode instead of copy? I tried to copy the stream and using the filter, but the audio was still not in sync. Is there a special order of parameter relevant?
So in your input the audio is in sync but not the output? Full command line and console output please? -r
Hi Roger, Am Montag, den 19.11.2012, 10:59 -0700 schrieb Roger Pack:
I am converting HD video (H264, mp2/ac3, TS container) captured from cable TV into mp4 container (x264, aac). I am also copy (if existing the original ac3 stream as an additional stream into the mp4 container, especially in case of a 5.1 audio.
Sometimes happens the audio is not in sync with video. In this case I use the asyncts filter with 'first_pts=0'. This works well but only if I encode all audio streams.
Is it really necessary to encode instead of copy? I tried to copy the stream and using the filter, but the audio was still not in sync. Is there a special order of parameter relevant?
So in your input the audio is in sync but not the output? Full command line and console output please?
Sorry for the misunderstanding, I am not a native english speaker. But if I understand my own writing correct, I did not say the input was in sync. The input was as well not in sync and it was happen after cutting of the original file with TSDoctor. I am currently starting some tests and will get in contact with the author after I collect some test cases. But if I have an example with sync input but not the output, I will collect all necessary data and send it to this thread. I am sure it will happen, because I have a huge backlog of video material;-) Again, sorry for the misunderstandings. Bye Frank
participants (4)
-
Carl Eugen Hoyos -
Frank Häfemeier -
JULIAN GARDNER -
Roger Pack