how to re-add original audio delay back into a 2-inputfile ffmpeg transcode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to re-add original audio delay back into a 2-inputfile ffmpeg transcode

hydra3333

Hello.

I have a .mpg with interlaced mpeg2 and ac3 audio, which needs converting to progressive .mp4 avc/aac.

The interlaced video is a bit grainy etc so I hope to deinterlace and clean it up using vapoursynth CUDA filters and at the same time convert the audio, using a single commandline, perhaps like this:

ffmpeg.exe -i input_from_vapoursynthprocessed_mpg.vpy  -i the_mpg.mpg  -map 0:v:0  -map 1:a:0  -c:v blah  -c:a blah  -y output.mp4

The thing is, the original files always have an audio/video delay of some kind (audio delay usually has a negative value, sometimes even a couple of seconds).
Also, Vapoursynth returns audio-free content, so video/audio delays returned to ffmpeg there would I suppose be 0.
The aim is to not have lost lipsync in the final output.

Can someone please advise;

(a) whether any audio delay is carried through correctly to the output file when using the single commandline above

(b) if not, how could I introduce the audio delay, assuming I can already detect its original value from the .mpg using mediainfo/ffprobe ?

Thanks !



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: how to re-add original audio delay back into a 2-inputfile ffmpeg transcode

Carl Eugen Hoyos-2
Am Do., 30. Juli 2020 um 06:53 Uhr schrieb <[hidden email]>:

> I have a .mpg with interlaced mpeg2 and ac3 audio, which needs
> converting to progressive .mp4 avc/aac.
>
> The interlaced video is a bit grainy etc so I hope to deinterlace and
> clean it up using vapoursynth CUDA filters

I am curious:
What are the advantages of these filters over the de-interlacers
provided by FFmpeg?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: how to re-add original audio delay back into a 2-inputfile ffmpeg transcode

hydra3333


> On Behalf Of Carl Eugen Hoyos
> Sent: Friday, July 31, 2020 8:27 AM
>> I have a .mpg with interlaced mpeg2 and ac3 audio, which needs
>> converting to progressive .mp4 avc/aac.
>>
>> The interlaced video is a bit grainy etc so I hope to deinterlace and
>> clean it up using vapoursynth CUDA filters
>
> I am curious:
> What are the advantages of these filters over the de-interlacers provided by FFmpeg?
>
> Carl Eugen

Primarily speed and simplicity and the availability of a wide range of filters in vapoursynth including some gpu accelerated filters.

The deinterlacer is Nvidia's which here is combined with a file pre-parser (DGIndexNV) which also checks and caters for issues.

Combined with CUDA filters into the same .vpy (for simplicity), the CUDA filter speeds are extreme (hundreds of fps) as compared to other noise/sharpening filtering approaches according to a couple of dumb comparison tests I ran eg yadif/nlmeans.



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".