Log in

View Full Version : lossless copy problem


agni451
25th November 2012, 13:44
I'm trying to run a .TS file through ffmpeg in order to resync the audio. I am using the following command line in an attempt to get a lossless copy while still resyncing (won't resync if I just say -c:v copy):

ffmpeg64 -v verbose -y -i "S:\VFolder\A.ts" -c:v mpeg2video -q:vscale 0 -c:a ac3 -ab 384k -ac 6 -async 48000 "S:\VFolder\A_FIX.ts"

The input file is an 829MB 1920x1080 29.97fps interlaced (TFF) mpeg2video at 16.9Mbps (according to mediainfo). However, the output file is smaller at 714MB at 14.5Mbps and is read in mediainfo as progressive scan.

Media Player Classic plays the original file fine with the deinterlacer providing good quality. However, the fixed TS file plays, but since it is read as progressive, the deinterlacer doesn't work.

How can the output file have a lower bitrate and be considered progressive if I used a constant quantizer of 0 and didn't use -deinterlace or -filter:v yadif? How can I make sure the scan type remains the same and the quality is lossless? I don't care how large the fixed file is.

pandy
26th November 2012, 12:18
same quality lossless in mpeg 2 can be achieved by COPYING original file - what are You doing now i mpeg-2 transcoding and seems that ffmpeg lost information about interlace however it can be case where this is progressive file marked as interlace (pull down?) and ffmpeg transcode source ignoring pull down signalization - thus lower bitrate and progressive structure...

to losslessly resyncing You can try some TS muxer which allow to define offset for audio (delay/advance) is introduced by changing PTS.

http://alien.slackbook.org/blog/fixing-audio-sync-with-ffmpeg/

http://forums.gbpvr.com/showthread.php?49257-audio-out-of-sync-fix-with-ffmpeg!

Only COPY provide lossless operation on lossy compressed formats.