Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-19-2012, 03:42 PM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

For the pros: Different length in audio- and file of the same stream


Hi 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!
Reply With Quote
  #2  
Old 03-19-2012, 05:41 PM
Bahman Bahman is offline
t.A.T.u.'s fan forever
 
Join Date: Sep 2011
Location: Tehran, Iran
Posts: 381
Bahman is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


2nd one is master length, for sure!!
Avidemux can do this trick(sync) I think without re-encoding!!
Reply With Quote
  #3  
Old 04-13-2012, 02:22 PM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Quote:
Originally Posted by Bahman View Post
2nd one is master length, for sure!!
Avidemux can do this trick(sync) I think without re-encoding!!
Ok, and do you know how?
Reply With Quote
  #4  
Old 04-13-2012, 05:14 PM
svnpenn svnpenn is offline
Banned
 
Join Date: Apr 2011
Location: Dallas
Posts: 757
svnpenn is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Just use FFmpeg

Code:
ffmpeg -i video.flv -i audio.mp3 -c copy out.flv
Reply With Quote
  #5  
Old 04-13-2012, 05:29 PM
greenythebeast greenythebeast is offline
Senior Member
 
Join Date: Dec 2011
Posts: 105
greenythebeast is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


What codec is the audio?
Reply With Quote
  #6  
Old 04-13-2012, 05:39 PM
svnpenn svnpenn is offline
Banned
 
Join Date: Apr 2011
Location: Dallas
Posts: 757
svnpenn is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Quote:
Originally Posted by greenythebeast View Post
What codec is the audio?
Quote:
In my shown example, the downloaded mp3
​​​​​
Reply With Quote
  #7  
Old 04-13-2012, 05:48 PM
greenythebeast greenythebeast is offline
Senior Member
 
Join Date: Dec 2011
Posts: 105
greenythebeast is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Quote:
Originally Posted by svnpenn View Post
​​​​​
ah, i see. when using ffmpeg try adding "-async 1" without the quotes.
Reply With Quote
  #8  
Old 04-14-2012, 08:46 AM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Okay, so this is the solution?

Code:
ffmpeg -i video.flv -i audio.mp3 -c copy out.flv -async 1
My 2nd question is: Is there also a solution for first demuxing the video? I muxed them with mencoder.exe.

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.
Reply With Quote
  #9  
Old 04-14-2012, 01:55 PM
svnpenn svnpenn is offline
Banned
 
Join Date: Apr 2011
Location: Dallas
Posts: 757
svnpenn is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


You 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
If indeed you need to do it in 2 steps you can do this

Code:
ffmpeg -i bad-video.flv -map a -c copy astream.mp3
ffmpeg -i bad-video.flv -map v -c copy vstream.flv
ffmpeg -i vstream.flv -i astream.mp3 -c copy good-video.flv
Reply With Quote
  #10  
Old 04-15-2012, 10:31 AM
sebastian sebastian is offline
Member
 
Join Date: Jun 2007
Posts: 81
sebastian is on a distinguished road
Default

Re: For the pros: Different length in audio- and file of the same stream


Okay, but I'd have to add -async 1? Like
Code:
ffmpeg -i bad-video.flv -c copy good-video.flv -async 1
?
Reply With Quote
Reply Post New Thread
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:09 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons