Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Jun 2012
Posts: 3
|
[SOLVED] A/V synch problems when trying to correct video from Android phone
Hello. I have an MP4 file that was recorded on a Nexus S 4G phone by a family member. The file plays back well on the device, but it is upside-down when copied to a PC via USB. I would like to rotate it so it displays properly on the PC.
Some online searching showed that MP4Box can extract the elementary streams from an MP4 file, so I used its -raw option to do so. This produced an .h264 and an .aac file. I ran the former through DGAVCIndex to produce a .dga file and then composed the following AviSynth file: Code:
LoadPlugin("DGAVCDecode.dll") LoadPlugin("BassAudio.dll") AVCSource("VID_20120527_172827_track1.dga") FlipVertical() FlipHorizontal() a = last b = bassAudioSource("VID_20120527_172827_track2.aac") AudioDub(a, b) Code:
* Movie Info * Timescale 1000 - Duration 00:03:53.792 Fragmented File no - 2 track(s) File Brand isom - version 0 Created: GMT Fri Jul 03 07:00:38 2082 File has no MPEG4 IOD/OD Track # 1 Info - TrackID 1 - TimeScale 90000 - Duration 00:03:53.266 Media Info: Language "Undetermined" - Type "vide:avc1" - 7000 samples MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 720 x 480 - Profile Baseline @ Level 3.1 NAL Unit length bits: 32 Self-synchronized Track # 2 Info - TrackID 2 - TimeScale 16000 - Duration 00:03:53.792 Media Info: Language "Undetermined" - Type "soun:mp4a" - 3653 samples MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40 MPEG-4 Audio AAC LC - 1 Channel(s) - SampleRate 16000 Synchronized on stream 1 I'd like any input about what I am doing wrong in this process. Thanks! Last edited by Dacicus; 23rd June 2012 at 18:33. Reason: Problem solved |
![]() |
![]() |
![]() |
#2 | Link |
Guest
Join Date: Jan 2002
Posts: 21,907
|
Don't use AssumeFPS() for a constant delay offset. Use DelayAudio().
If the desync increase as the file plays we have another issue. Does the desync remain constant? What frame rate does DGAVCIndex report? Last edited by Guest; 20th June 2012 at 01:38. |
![]() |
![]() |
![]() |
#4 | Link |
Guest
Join Date: Jan 2002
Posts: 21,907
|
>The desynch does increase as the file plays.
OK, but with what AssumeFPS() value? You have to find the original frame rate and then AssumeFPS() that, followed by fixing the offset with DelayAudio(). The frame rate of the MP4 is 30 fps (confirmed with web search). DGAVCIndex reports 25 because there is no VUI to specify the frame rate and so it defaults to 25 fps. So, set AssumeFPS(30) and use DelayAudio() to fix the offset. AVCSource("VID_20120527_172827_track1.dga") AssumeFPS(30) FlipVertical() vid=FlipHorizontal() aud=bassAudioSource("VID_20120527_172827_track2.aac").DelayAudio(???) # replace ??? with correct offset AudioDub(vid,aud) Last edited by Guest; 20th June 2012 at 05:12. |
![]() |
![]() |
![]() |
Tags |
android, audio, desynch, phone, video |
Thread Tools | Search this Thread |
Display Modes | |
|
|