by Guest » Mon Apr 08, 2024 6:43 pm
For audio synchronizing, i suggest you to do the following:
Download a good video source, the one you would like to use in the torrent.
Download other version of the movie (the ones which have the desired audio language), try to download the ones that have the most resemblance in time with the original. This will make your works easier. (for example, if your torrent will be about a BluRay, check for audios coming from BluRay versions, not DVDs, when possible).
After you downloaded the audio movies, check the 'audio-movies' FPS. they should match or be almost the same number as the 'video-movie'. You can use ffmpeg rubberband audio filter. Do this using the .mp4 or mkv of the audio file as input, something as:
ffmpeg -i INPUT.mkv -map 0:1 -af "rubberband=tempo=0.95904096" -vn -c:a aac -ac 2 OUTPUT-2398.m4a
This will make the audio first audio stream (0:1) to fit the 23.98FPS. The tempo value is obtained by dividing:
DESIRED-FPS-VALUE / ORIGINAL-FPS-VALUE
You can obtain FPS value of the movie using several programs. The closer you get to the tempo value, the less you will have to sync.
Check for more info about this thing in ffmpeg documentation.
After you have done that, you can load the video torrent in kdenlive, and the audio you want to sync. I suggest you to use the 'Separate audio channels' option in Kdenlive (Settings>Configure Kdenlive>Timeline) and the 'editing' mode.
Then you have to sync the waves of the audios. My suggestion is to check all the audio wave, in case some part of the audio is broken or missing, plus checking that the audio voices fit what corresponds to the scene.
After syncing the audio waves, mute/disable the original movie audio, then go to the audio panel and make the desired audio to have '0' as value in the speakers(0 means that the sound will be sent to both sides equally). Now you have to render the audio, it is not necesary to render the whole video with the audio, since that part was not touched. For this go to 'Project>Render' then select an 'audio only' preset. The option you have to select depends on your audio input(mp3,aac,ac3,etc).
After rendering the audio, check that the audio obtained matches the video, this can be done in some advanced video players as smplayer (which also shows an accurate value of FPS). Load the audio with some subtitles you understand, and jump through the video to see that everything is OK.
For subtitles you have several guides in the internet, i suggest using subtitlecomposer which has a lot of useful functions.
After you have your audios and subtitles, you have to join them. This can be done with several programs too, my suggestions is that you use .mkv containers and 'soft-subtitles'(not hard-coded or burned ones). This is because you can easily switch subtitles by this, without touching the video (faster generation of the final file). Personally, i use a ffmpeg script that loads the subtitles and audio files, and makes the final file.
Extra: If by chance you have subtitles that are in the .idx format or 'image subtitles', i have found a fast way to transform them in .srt or .ass:
You need to use: mkvtoolnix (mkvextract command, to obtain the .idx subtitles). Then you have to use something that transform those files in the desired ones. For that i have used vobsub2srt which uses tesseract, and i have found good results.
For audio synchronizing, i suggest you to do the following:
Download a good video source, the one you would like to use in the torrent.
Download other version of the movie (the ones which have the desired audio language), try to download the ones that have the most resemblance in time with the original. This will make your works easier. (for example, if your torrent will be about a BluRay, check for audios coming from BluRay versions, not DVDs, when possible).
After you downloaded the audio movies, check the 'audio-movies' FPS. they should match or be almost the same number as the 'video-movie'. You can use ffmpeg [i]rubberband[/i] audio filter. Do this using the .mp4 or mkv of the audio file as input, something as:
ffmpeg -i INPUT.mkv -map 0:1 -af "rubberband=tempo=0.95904096" -vn -c:a aac -ac 2 OUTPUT-2398.m4a
This will make the audio first audio stream (0:1) to fit the 23.98FPS. The [i]tempo[/i] value is obtained by dividing:
DESIRED-FPS-VALUE / ORIGINAL-FPS-VALUE
You can obtain FPS value of the movie using several programs. The closer you get to the tempo value, the less you will have to sync.
Check for more info about this thing in ffmpeg documentation.
After you have done that, you can load the video torrent in kdenlive, and the audio you want to sync. I suggest you to use the 'Separate audio channels' option in Kdenlive (Settings>Configure Kdenlive>Timeline) and the 'editing' mode.
Then you have to sync the waves of the audios. My suggestion is to check all the audio wave, in case some part of the audio is broken or missing, plus checking that the audio voices fit what corresponds to the scene.
After syncing the audio waves, mute/disable the original movie audio, then go to the audio panel and make the desired audio to have '0' as value in the speakers(0 means that the sound will be sent to both sides equally). Now you have to render the audio, it is not necesary to render the whole video with the audio, since that part was not touched. For this go to 'Project>Render' then select an 'audio only' preset. The option you have to select depends on your audio input(mp3,aac,ac3,etc).
After rendering the audio, check that the audio obtained matches the video, this can be done in some advanced video players as [i]smplayer[/i] (which also shows an accurate value of FPS). Load the audio with some subtitles you understand, and jump through the video to see that everything is OK.
For subtitles you have several guides in the internet, i suggest using [i]subtitlecomposer[/i] which has a lot of useful functions.
After you have your audios and subtitles, you have to join them. This can be done with several programs too, my suggestions is that you use .mkv containers and 'soft-subtitles'(not hard-coded or burned ones). This is because you can easily switch subtitles by this, without touching the video (faster generation of the final file). Personally, i use a ffmpeg script that loads the subtitles and audio files, and makes the final file.
[b]Extra[/b]: If by chance you have subtitles that are in the .idx format or 'image subtitles', i have found a fast way to transform them in .srt or .ass:
You need to use: [i]mkvtoolnix[/i] ([i]mkvextract[/i] command, to obtain the .idx subtitles). Then you have to use something that transform those files in the desired ones. For that i have used [i]vobsub2srt[/i] which uses tesseract, and i have found good results.