For the pros: Different length in audio- and file of the same streamHi guys,
when downloading and merging the video files of be-at.tv (e.g. hxxp://www.be-at.tv/brands/wmc/surfcomber/waveform-with-victor-calderone-guests/ida-engberg.go ), the video and audio file (which are splitted) do have different lengths. In my shown example, the downloaded mp3 is 01:28:36, but the video is 01:28:49! Also the video slider at the website itself shows 2nd length. So how can I get the video and audio in sync? And what is the master lenght? I guess this is a question for the pros. ;-) Thanks in advance! |
Re: For the pros: Different length in audio- and file of the same stream2nd one is master length, for sure!!
Avidemux can do this trick(sync) I think without re-encoding!! |
Re: For the pros: Different length in audio- and file of the same streamQuote:
|
Re: For the pros: Different length in audio- and file of the same streamJust use FFmpeg
Code:
ffmpeg -i video.flv -i audio.mp3 -c copy out.flv |
Re: For the pros: Different length in audio- and file of the same streamWhat codec is the audio?
|
Re: For the pros: Different length in audio- and file of the same streamQuote:
Quote:
|
Re: For the pros: Different length in audio- and file of the same streamQuote:
|
Re: For the pros: Different length in audio- and file of the same streamOkay, so this is the solution?
Code:
ffmpeg -i video.flv -i audio.mp3 -c copy out.flv -async 1 Now I'd like to write a batch file, that first splits the audio and video, and after that muxes it again via the code you told me. |
Re: For the pros: Different length in audio- and file of the same streamYou should be able to just "remux" the file.
Say you have a file with 1 video stream and 1 audio stream. You can do Code:
ffmpeg -i bad-video.flv -c copy good-video.flv Code:
ffmpeg -i bad-video.flv -map a -c copy astream.mp3 |
Re: For the pros: Different length in audio- and file of the same streamOkay, but I'd have to add -async 1? Like
Code:
ffmpeg -i bad-video.flv -c copy good-video.flv -async 1 |
Re: For the pros: Different length in audio- and file of the same streamOk this is what I did
PAGE be-at.tv/brands/wmc/surfcomber/waveform-with-victor-calderone-guests/ida-engberg GET AUDIO Code:
rtmpdump \ DownThemAll, Batch Download Code:
video.cdn.be-at.tv/Session001216/Video002677/1000.[000:100].flv Merge videos with Avidemux, then combine with audio Code:
ffmpeg -i 1000.000-100.flv -i Audio001284.flv -c copy video-audio.flv |
Re: For the pros: Different length in audio- and file of the same streamThanks a lot guys, am going to try this!
|
Re: For the pros: Different length in audio- and file of the same streamOne other question: How can I append multiple files in AviDemux? Append 100 files one after one is very difficult. ;-)
|
Re: For the pros: Different length in audio- and file of the same streamQuote:
|
Re: For the pros: Different length in audio- and file of the same streamThat works, thanks! And I can be sure, that AviDemux will add it in the right order (alphabetically)?
|
Re: For the pros: Different length in audio- and file of the same streamQuote:
|
Re: For the pros: Different length in audio- and file of the same streamOkay I see the problem of be-at.tv now:
The videostream is missing frames every now and then. So if I use a constant frame rate, the video will always be shorter than the audiostream. I figured it out when I saw, that sometimes my downloaded video is getting slower and faster. When watching the video via the website, the video get's resynced to the audio every few seconds. So, right now it's turning out into the pro-question ;) : How can I merge the video-chunks AND have it synced to the audio? |
Re: For the pros: Different length in audio- and file of the same streamAlternatively, is there a way to stretch the video via its framerate, so that it fits the audio length?
|
Re: For the pros: Different length in audio- and file of the same streamMy 2nd question is answered with the following string, which syncs the video to the audiostream:
Code:
ffmpeg -i video.flv -vsync drop -i audio.flv -c copy video-audio.flv -map 1:1 EDIT: That didn't help. It only changed the length of the videoindex, not the framerate. :-( |
All times are GMT -6. The time now is 06:45 PM. |