VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. for testing the effect I took a synch avi(xvid,mp3) file and remuxed it using:
    1.
    Code:
    ffmpeg -y -itsoffset 00:00:10.000 -i "test.avi" -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test1.avi"
    -> Audio starts 10sec before video (this is like I expected)
    2.
    Code:
    ffmpeg -y -i "test.avi"  -itsoffset -00:00:10.000 -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test3.avi"
    -> Audio starts 10sec before video (this is like I expected)
    3.
    Code:
    ffmpeg -y -itsoffset -00:00:10.000 -i "test.avi" -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test2.avi"
    -> Audio and video start at the same time (I expected that the video would start before the audio)
    4.
    Code:
    ffmpeg -y -i "test.avi"  -itsoffset 00:00:10.000 -i "test.mp3" -vcodec copy -acodec copy -map 0:0 -map 1:0 -vtag XVID -aspect 181818:100000 -r 25 -f avi "test4.avi"
    -> Audio and video start at the same time (I expected that the video would start before the audio)

    => How to handle negative audio delays with ffmpeg?

    Also all of these calls give me:
    [avi @ 000001f1b4b8e280] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    => How to do it properly to avoid this warning and be save for the future?


    Thanks.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  2. I believe the problem is the AVI container. You have to re-encode the audio and fill it with actual silence (or do a complicated extra step of attaching 10 mp3 seconds before - probably easier with something like delaycut).
    Quote Quote  
  3. Other tools can handle this properly (for example mencoder, avi-mux gui, virtual dub,...) so I doubt it's a general problem of the .avi container.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. IIRC:
    VirtualDub creates kinda "b0rked" data to prepend
    Avi Mux GUI inserts actual silence
    don't know about mencoder
    Quote Quote  
  5. So your guess is ffmpeg simply can't do what I want?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Not without re-encoding, yes. That said, ffmpeg can do so many things, often badly or not documented at all, that I would not 100% rule it out.

    You could do something crazy like keep a silence.wav or sth. and encode it to the delay length (with identical parameters) and prepend it in an extra step. Or let ffmpeg create it on-the-fly: https://ffmpeg.org/ffmpeg-filters.html#anullsrc
    Quote Quote  
  7. Okay thanks.
    Trying not to reencode the streams. Hope someone knows a 'trick' to get this working with ffmpeg.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads