View Single Post
Old 23rd February 2014, 18:16   #8  |  Link
TheLostSkeleton
Registered User
 
Join Date: Feb 2014
Posts: 6
Quote:
Originally Posted by Maccara View Post
I've had some issues with Movie Studio (the consumer version of Vegas Pro) opening m2ts files (not similar to yours, though).

However, h264+aac in mp4 has worked fine instead of m2ts, so you could just try remuxing with ffmpeg -i file.m2ts -c:v copy -c:a copy file.mp4 (based on your output, the files are h264+aac inside m2ts).

If that doesn't work, you could try reconverting the audio (as that seems to be the issue) just with ffmpeg -i file.m2ts -c:v copy -c:a aac -strict -2 -b:a 240k -r:a 48000 -async 1 file.mp4.

I'm using -async 1 because you seem to have some issues with the audio. I've noticed ffmpeg does not deal with any start packet mismatch or gaps in audio (or vfr files) properly (missing audio, video/audio not in sync etc) without async specified.

Not the ideal solution (conversion is not lossless), but give it a try in case that would at least get you forward. If that works, you could try with pcm_s16le (with the async option) if that helps.
Hmmm.

Upon trying to copy video and audio, FFMPEG yelled at me to use -bsf:a aac_adtstoasc because of malformed data. Doing so did the trick, but... now both options you provided generate an even more frustrating issue: Sony Vegas has a history of not liking MPEG4 in general, and I was surprised when it imported the M2TS video track so well. Using your options, while I get an audio and a video track in Sony Vegas, I get nasty looking video corruption (example) or, more often than not, Vegas just claims the video track is completely black.

I feel like I'm going a little crazy, though; using -async, FFMPEG magically stopped returning errors upon finishing encoding, and I generated a few files that actually opened in Vegas "fine" by adding it to the existing commands I used in the OP (though they were missing the last 15 seconds of audio). Except... then that mysteriously stopped happening and now it's generating errors again, even though I'm using identical commands.

Quote:
[mpegts @ 02a5a9e0] PES packet size mismatch
[h264 @ 035edae0] error while decoding MB 20 9, bytestream (-6)
[aac @ 02b60020] Input buffer exhausted before END element found
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 035edae0] concealing 2909 DC, 2909 AC, 2909 MV errors in B frame
frame=16470 fps= 99 q=31.0 Lsize= 103540kB time=00:04:34.77 bitrate=3086.9kbits
/s
video:95247kB audio:7987kB subtitle:0 data:0 global headers:0kB muxing overhead
0.295922%
and the AVI files its encoding have the 3 second audio problem, with or without -async

I am completely lost.

Last edited by TheLostSkeleton; 23rd February 2014 at 18:29.
TheLostSkeleton is offline   Reply With Quote