You are currently browsing the Mikhail Lavrenov blog posts tagged: video


Audio sync issue with MTS video files

Recently I faced a problem with MTS files (AVCHD from Panasonic and Sony cameras) with audio getting out of sync after file edit.
MTS file plays fine with sound in sync (e.g. with Daum Potplayer). However after editing, sound is not in sync anymore. Searching internet I found my problem isn’t uncommon, but I didn’t see a definitive solution.

Note that I haven’t touched MTS files for several months; and in the past I haven’t had any sync issues. During the break I had Windows reinstalled, so the problem must be somewhere on my PC.

The issue shows up with some video editing software but not all (e.g. VirtualDub, Corel Video Editor have the issue). It seems to me it’s related to AC3 encoding of audio stream in MTS files. I haven’t found precise root cause, I guess some codec version or settings on my PC might be the reason; however I found several workarounds that suit my needs.

  • BlackMagic DaVinci Resolve doesn’t have an issue with MTS files. So I can do color correction in Resolve and then save file with an in intermediate codec (e.g. CINEFORM) for editing with other video editing software. Once MTS file is converted to another format, the issue is gone…
  • I can convert audio to another format using AVANTI/ffmpeg. Copy video stream as is; and convert audio to PCM for example – then the sync issue is gone, file can be edited.
  • VSDC Free Video Editor doesn’t have an issue with MTS files. The basic version is free. Unfortunately the latest update of Video Editor made the use of waveforms a paid option, but it isn’t expensive; or you can use an older version which has waveforms enabled for free.

Sony multimedia player

I plan to go for a relatively long travel in a couple of weeks and I borrowed Sony nwz-a818 player from a family member. As it has 8GB of memory, and a very nice screen (though small) I though that it would be not a bad idea to put some videos on it, besides mp3 music.

However it appears that it isn’t so easy to find what video format is supported by that player, and how to encode to that format.

  • Sony NWZ-A818 supports MP4 video files
  • Frame size should be 320×240
  • DivX and Xdiv are MP4, but normal divx files will not be played by NWZ-A818
  • An easy and free solution that I found it to use Handbrake tool to convert my video files (and DVDs) to mp4 files compatible with that player
  • Handbrake can’t open many types of source files, so another cost-free option is to use XviD4PSP utility. I like Handbrake better because it’s easier to control output quality, whilte Xvid4PSP is a bit tricky.

Remark: Perhaps there are other (better) ways to achieve the same target, but this works fine for me.

Remark: the same applies to Sony NWZ-A816 player.

Step-by-step procedure for Handbrake:

  1. Download and install Handbrake from http://handbrake.fr
  2. Select the source for conversion – a video file or DVD
  3. Select the destination – output MP4 file
  4. In “Encoder” field select Mpeg 4
  5. Leave default “Audio encoder” value at AAC
  6. Type correct values in “Size” i.e. 320 and 240
  7. Click “Video” tab, and select compression quality. For me the results were better by using the “Constant quality” slider – value around 85 works fine.
  8. Click “Audio & Subtitles” tab, and select in “Bitrate” field value 128.
  9. Click “Start” (in the left top corner)
  10. Copy the file from your PC to the player and enjoy 🙂
  11. If the size of converted file is too high, repeat the procedure above but use lower value in step 7.
  12. If the quality isn’t good enough, repeat the procedure above but use higher value in step 7.


Step-by-step procedure for Xvid4PSP:

  1. Download and install Xvid4PSP tool from http://www.winnydows.com
  2. Open your video file (click Open) or your DVD (click DVD, then select correct stream)
  3. Under “Format” select MP4 iPod 5.5G
  4. Under “Video Encoding”select x264 1P 768K Turbo
  5. Under “Video Encoding” click “E” button to edit settings. Dialog window will appear.
  6. In the top right corner select MPEG 4 (next to “Codec”)
  7. At the bottom (next to “FourCC” select MP4V)
  8. “Encoding mode”: leave 1-Pass Bitrate
  9. “Bitrate” depends on your source. If it’s already heavily compressed it’s better to put maximum value of 1500. If your source is good quality (e.g. DVD) you could put something like 800.
  10. Click “Rate” tab. Enter the same bit rate value as in item 9 into “Maximum bitrate” field.
  11. Enter the same value as in item 10 into “Bitstream buffer size” field.
  12. You could click OK now, or you can first click “+” to save these settings for future use, then type the name and then click OK.
  13. Open menu item “Video“, “Resolution/Aspect…
  14. Select Output resolution to 320 x 240 and output aspect to 4:3, then click Apply, then OK.
  15. Click Encode to start re-coding, and define the output file name and destination when asked.
  16. Copy the file from your PC to the player and enjoy 🙂

Photography related videos

I’ve been watching quite a few photography related videos lately. Some of them interesting to watch, some are useful for work, so here is a quick summary of what I’ve discovered recently.

Interesting interviews with photographers can be found on WorldPressPhoto web site. First, click on 2008, and then click on one of the icons. If you click the picture of president Putin you will see the interview with Platon about how he has made his award winning portrait of the Person of the Year 2007.

Google has a series on YouTube called “Authors@Google”. They have recently posted a video of famous American photographer Joe McNally speaking to Google employees in their headquarters (thanks for Strobist for posting about that in his blog)


Just in case it doesn’t play you can go via the link

Useful photoshop tutorials (videos) can be found on Layers magazine website.

Digital Photography School
has recently posted a selection of 24 photography podcasts that will inspire you.

Belgian fine-art nude photographer Pascal Baetens is actively involved with fine-art tv project since last year. Fine-art tv features weekly programs devoted to photo artists from around the world. Past issues are viewable too.

Another Belgian photographer Bert Stephani runs interesting blog. Not so many videos but very many photos. Besides good pictures and interesting comments on his website, Bert has recently started running ‘The decisive photographer‘ workshop. I did not attend it myself, but the review on Bert’s blog look interesting – so it’s worth to consider attending if Bert will continue running it.