Skip navigation

Streamclip Settings for Apple 3?

4220 Views 107 Replies Latest reply: May 29, 2012 3:55 AM by Jon Walker RSS
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 13, 2012 11:56 AM (in response to MlchaelLAX)

    One of Tom's files that were edited first in MPEG Streamclip and then transcoded with Handbrake and now has audio sync problems can be downloaded from here (redcarpet.mp4):

    Downloaded the "redcarpet.mp4" file and made a quick scan of the content. File is H.264/AAC only and shows no evidence of audio being out of sync on my system. Can you be more specific regarding sync problem location? Only problem I noticed was combing produced by 1080i60 playback in progressive mode. In any case, am downloading the other file to see what it looks like.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 13, 2012 12:24 PM (in response to MlchaelLAX)

    From your previous posts:

     

    Does that mean I can use Handbrake to convert an 1080i file into a true 1080p one?

    If you deinterlace the content it will be progressive. However, the resulting picture quality can vary with source content and settings used. I personally thought the VoltiacHD app did a marginally better job on the M2TS file you posted but you may feel differently since this evaluation is very subjective.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    P.S.,

    Will likely be off the computer for the rest of the day. Wife insists I take her out to eat for Mother's Day. Morning was split between try to follow-up from where we left off yesterday and running my father-in-law around town.... Take care.

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • MlchaelLAX Level 4 Level 4 (1,550 points)
    Currently Being Moderated
    May 13, 2012 12:30 PM (in response to Jon Walker)

    Terrific information: thank you!

     

    I am asking Tom to confirm that redcarpet.mp4 was the file with the audio sync problem.

     

    Enjoy Mother's Day with your wife! 

  • MlchaelLAX Level 4 Level 4 (1,550 points)
    Currently Being Moderated
    May 13, 2012 5:47 PM (in response to thomasmontalto)

    Tom: Please go ahead and export for AppleTV (with the audio sync problems) and provide Jon a link to download the out of sync file, so that he can analyze it for us.

     

    Jon: My mistake for your extra input, as I misconstrued which file was which...

  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 14, 2012 4:21 PM (in response to thomasmontalto)

    So I am just curious... So starting from scratch, what way would you suggest would be the best then to edit out commercials and make compatible for Apple TV3 then?

    Am still running tests but so far the easiest way to edit and create a TV2/TV3 compatible file would be:

    1) Start off with an H.264/AC3 file

    2) Use an app like VoltiacHD to convert the 1080i60 M2TS file to a 720p24 (deinterlaced and detelecined) file

    3) Edit the resulting file in QT 7 Pro or MPEG Streanclip at the frame level

    4) Use the "Save As..." option to save the edited file to either an MOV or MP4 file container

    5) The file is now playable on either an TV2 or TV3 device.

     

    Unfortunately, this work flow does not allow you to create an 1080p24 file that is TV3 only compatible. On the other hand, using an app like VoltaicHD to convert an M2TS file to 1080p24 AIC/Uncompressed MOV (or a "Pro" editing codec) file for editing, editing, and then exporting the already deinterlaced and telecined content to the TV3 1080p24 format does seem to work. However, the only test I've made thus far was with a 56 second sample file provided by Michael. Would prefer to try this on a longer file to check for possible sync problems but have been too lazy to dig out one of my Hauppauge unit (along with a Furry III) so I can make an HDMI connection to my current entertainment system.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 14, 2012 4:35 PM (in response to MlchaelLAX)

    Jon: My mistake for your extra input, as I misconstrued which file was which...

    GENERAL UPDATE:

     

    Spent most of the day running a number of tests. Here are the results:

     

    1) Recommend Tom get the Toslink cable as soon as possible and both of you use the H.264/AC3 M2TS capture file as your starting point.

     

    2) For editing purposes, my recommendation would be to use an application like VoltaicHD to deinterlace/detelecine the source H.264/AC3 M2TS file directly to an AIC/Uncompressed MOV 1080p24 file. This file can be edited in any video editor, QT 7, MPEG Streamclip, or similar app at the frame level with audio known to be resampled which should avoid Tom's audio sync problem and with video already in the 24 fps progressive mode. This is a reasonanably simple work flow which should produce reasonably good quality results but IT IS NOT A FAST WORK FLOW! Once the MOV file is edited, it is then re-compressed to whatever TV version you desire up to TV3 using whichever app you prefer. I still tend to convert most of my HD files to 720p H.264/AAC/AC3/Chap in an M4V container so as to retain compatibility with older TV2 units still in service throughout my home. This work flow should provide the most accurate edits (i.e., edits audio and video tracks to exact frame) and it should avoid any audio sync and/or video problems I've seen thus far in the sample files provided.

     

    3) If no editing is required, the M2TS file can be directly converted to any specific deinterlaced/detelecined TV format desired. My preference here would still be the HandBrake app for a single-app/single-pass work flow.

     

    4) Just so Tom knows, the "redcarpet-appletv.mp4" is a very low data rate conversion. It appears to have been one of his preliminary tests and would normally be compatible with many older mobile device except for the excessive frame rate.

     

    5) The "redcarpet.mp4" looked like it would normally play via an TV3 device except for the fact the the file is still the 1080p60 mode. Tried converting using HandBrake and got good video results except for the fact that I could only deinterlace it to a 1080p30 file. (I.e., it appears the detelecine feature only worked properly on source MT2S files.) Unfortunately, the audio was still out of sync.

     

    6) Audio sync problem seems to be caused by the M2TS to MP4 container conversion (i.e., it uses VRB encoding for the audio) and the act of editing out the commercials. While the blocks of audio and video data you remove have the same time duration, it appears that disproportionate amounts of data are removed and when I went to test play my conversion, the audio and video content change sync following every cpmmercial edit. Am trying to see if I can still save the file by extracting the audio and video tracks from your "redcarpet.mp4" file, resampling the audio, adding the re-sampled audio to the extracted video, saving the result as an MOV file, and again re-compressing the MOV file with HandBrake to deinterlace the video, convert the re-sampled audio to both AAC and AC3 to see if this prevents the audio sync problem and creates a useable TV3 file. Unfortunately, this operation takes 3-4 hours and I still have 2 hours to go. As the source audio Tom Provided was only stereo 128 Kbps @ 48.0 KHz, I am only going for stereo AAC at 160 Kbps @ 48.0 KHz and AC3 at 192 Kbps. This is the first time I've bothered to regenerate a secondary AC3 track and I thought I might as well test this capability while I was re-testing the sync. Am also using an anamorphic 1920x1536 encode matrix. If the encode avoids the sync problem, will post a copy for your examination.

     

    7) Finished the above mentioned test encode but seems HandBrake did not the WAV audio track as the AAC and AC3 audio tracks ended up with a zero sampling rate for both. will have to re-run the test using an AIFF audio track.

     

    Okay, that is all I can think of to say for today.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

     

    Oops!

    Failed to mention that the M2TS files can suposedly be edited in the VoltaicHD app but I have yet to actually try this approach. Looks like you may have to edit and save each segement you want to keep and the join them together. If you can do this, the the joined M2TS file might be directly editable in HandBrake using the current frame rate option and turning off deinterlace/detelecine routines.

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 14, 2012 5:36 PM (in response to thomasmontalto)

    If you would like me to upload a longer, test file for you, let me know and I would be glad to upload it for you!  Just let me know how long you would like and if I should leave it as the original m2ts and I would be glad to help in anyway possible.

    If you have a half-hour show with commercials, that would be great for a practical test. All of my files were captured as 720p and so I don't have a source file to simulate your 1080i60 editing work flow without taking the time to set up the equipment, reset hardware settings, and actually capturing conten for testing.

     

     

    So the H.264/AC3 file is the file the Hauppauge creates??

    Normal output via component and Toslink cables would be H.264/AC3 compressed data. Have never tried analog audio which Michael indicated was converted to MP4. My system would use an HDMI connection to the Fury III which then connects to the Hauppauge via component cables and Toslink. Since I use EyeTV for capture, the H.264/AC3 data ends up in an MPG file container (which VoltaicHD doesn't like and I have to manually change the extension to M2TS to get it to load).

     

     

    Do you lose quality when you convert to the 720p24?

    Not sure what you mean by quality here. Transcoding always has the potential of degrading video quality because compression, by its very nature, is the art of throwing away data to may the file smaller. Converting from H.264 to AIC is the movement of highly compressed data to a low compression format in order to retain as much of the original visual quality as possible. As to the 1080i60 to 1080p24 conversion, AVCHD content is commonly recorded at 1080p24 and then converted to 1080i60 for storage. This process is known as telecine and can be done several different ways. Commonly it is achieved by splitting the full frames (progressive) into interlaced pairs and periodically repeating a frame to increase the frames per second from 24 to 60. The is known as 3:2 pulldown, as 2 progressive frames are split into 5 interlaced frames. For example two full frames (A and B) are encoded as A1:A2:B1:B2:B2, where A1 is the first interlaced half of frame A, A2 is the second interlaced half of frame A and so on. The "detelecine" option merely reverses this process. Unfortunately, your editing work flow changes this process and prevents HandBrake from properly perforning a detelecine operation which si why my attempts to save your "redcarpet.mp4" file only returned 1080p30 deinterlaced video which is probably inferior in terms of frame sequencing.

     

     

    Should I get VoltiacHD now or should I wait a bit?

    That is something you will have to decide for yourself. I had previously tested the software based on many recommendations in the iMovie forum but never purchased a copy. When I researched possible M2TS conversion apps, I noted VoltaicHD was currently available in the App Store at half price and I decided to take the "plunge" and buy a copy for the $19.99 sale price. I don't have an AVCHD camcorder but do have a pair of Hauppauge PVRs and felt at that price it was well worth the investment to have on hand for such tests as the ones now being made.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 15, 2012 6:55 PM (in response to thomasmontalto)

    FURTHER UPDATE:

     

    1) Tom, spent a total of about 12 hours try various antenative encoding methods to try and prevent the transcoding sync problem following edits. It was a wash and I finally gave up. Michael indicated you were still using the RCA analog audio lines. On my system the audio inputs have three options:

    a) AAC VRB (default)

    b) AAC CBR

    c) Convert to AC3

     

    Since I'm using the SPDIF/Toslink cable, mine are automatically encoded with AC3. However, if you want, you can try capturing a reasonably short test file using the AAC CBR option if available on your system. Wanted to know if recompressing this file after editing still created the sync problem in the final file. If you have a chance to try this, let me know what happens.

     

    2) Captured two 1 hour tests files this morning—one a 1080i60 clip and the other 720p60. Spent most of the day using the VoltaicHD default "Convert" option (AIC/Uncompressed MOV with 24p deinterlace/detelecine option set).  Conversion ratio was in the 4:1 to 5:1 range. (I.e., it take 4 to 5 hours to convert at full HD frame dimensions and as I previously said this is not a fast operation and the intermediate files are quite large.)

     

    Was a bit disappointed with results bt this was due to comb artifacting of new/moring sho broadcasts containing pre-recoded, live, monitor display, and that blasted motion text banner at the bottom of the screen. Also did not like the fact that 25+ minites of the 60 recorded were commercials which I edited. (As you can see, I don't watch much broadcast TV any more.) In any case, the 5.22 GB source file grew to a 29 GB AIC/Uncompressed file before editing. Sill, while this work flow is time consuming and takes a lot of space, it does preserve most of the original quality, as well as, the full original 1920x1080 resolution.

     

    From here on, the process was easy. Editing in MPEG Streamclip of the AIC/Uncompressed MOV file only took 10-15 minutes and final re-compression was performed in the same app with a 1:1 compression ratio on my system. (I.e., it only took 1 minute of compression time for each minute of edited data.) In fact, while I was at it, I exported both 1080p24 TV3 only and 720p24 TV3/TV2 versions of the file for posting in case you wanted to compare them. Both played correctly on my TV3 device. Not sure if you want to spend this much time on your projects but I like the fact that I end up with a file the can be used for multiple purposes and I can add titles, transitions, filters, and other effects if desired.

     

    000000001562740aEdited720p24.mp4

     

    000000001562740aEdited1080p24.mp4

     

    3) With regard to processing the 720p60 test file, I tried to find a faster codec alternative. Manage to encode a 2 minute and 4 second segment of this file thus far but have yet to determine conversion speed ratio yet. Basically, I decided to try an Animation/Uncompressed MOV formatted file. This used to be a common intermediate format some years ago but QT X no longer supports the Animation codec. In any case, I made a "not so quick" test which shocked me to no end. Decided to make my test using a 75% quality setting. Almost fainted when I saw the two minute file was pushing a 2.3 GB file size with a 1.1 Gbps data rate on my current system. Never got above 200 Mbps on my old machine. So I will have to run a comparison test with a lower quality setting as this, in part, controls the video comversion data rate. Need to see if the is a setting that provides faster encoding than AIC but doesn't get so carried away with the data rate. In any event, here is the 2 minute test file with a 35 second segment deleted prior to 0:41.00 time index. Since the Animation video was transcoded at the original frame rate in VotaicHD, I changed the frame rate to 24 fps after editing in MPEG Streamclip when I performed the final re-compression to the H.264/AAC MP4 file. Like the previous files, this file also did not lose audio sync and played correctly via my TV3 unit.

     

    0000000015628c2dAICto.mp4

     

    4) Played with the trimming feature in VoltaicHD today. Was very disappointed by its inaccuracy. Can only trim content to the nearest half-second. Afraid it is not sutable for editing purposes, Tom.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)
    Currently Being Moderated
    May 17, 2012 10:14 AM (in response to thomasmontalto)

    The good news is I have ordered the converter box so I will be using the Toslink cable starting Friday!  I didn't realize how big of a difference that would make.  Wish I knew sooner.  Are you saying in videos where you used the Toslink, these sync problems do not happen?  I wish I knew that sooner.  Should I still do the test since I will be doing it the other way soon?

    Confused as to what you mean by "the converter box" here. Thought Michael had said you were using the Hauppauge 1212 PVR for capture. Even re-wired my unit for direct component/Toslink connection and by-pass the Fury III so as to better simulate what I thought was your work flow.

     

    Main reason for using Toslink for me is to capture AC3 DD5.1 content when available. (I.e., while much of the content from my sat receiver is two channel mono or stereo, "prime time" shows frequently contain AC3 DD5.1 content.)

     

    As to the prevention of sync problems, that depends on your work flow. Most of the ones I employ contain an audio resampling operation. For instasnce, VoltiacHD turnes the M2TS file into separate audio (AC3) and video (MPV) elementary streams. This audio file is then converted to a re-sampled WAV file. The WAV audio and the MPV video are then combined in a temporary file which is probably AIC/Uncompressed since its size is the same as the final output file if I use the the VoltiacHD "Convert" pre-set option. In any case, this temporary file is what is used internally to convert content to other formats such as TV targeted content and is why using VoltiacHD takes so long to convert files. (The experimental  "Faster Conversions" option bypasses some of the steps to perform faster conversions but is probably also why this option is not compatible with some conversions.)

     

    As to your own sync problems, I think they may be caused because the source file used for editing contains independent VRB video and VRB audio components. When you cut a fixed number of video frames from this file, it removes the same number of audio frames but they may or may not correspond to the specific video frames removed. That would explain why the sync only changes following an edit but remain consistently "out of sync" until the next edit. You might be able to confirm this by the "CBR test" recommended. Whether or not you perform the test is up to you, but if you do run the test, I would appreciate feedback since I am falling behind running other tests having a higher priority at the moment.

     

     

    Wow, that is awesome!  It is just too bad about the length of time!  If you check my server right now, I have a file up there of something I captured, converted with Handbrake and edited in Streamclip.  I think it looks really good.  Plays back great on my Mac, iPad and iPhone.  It looks great on my AppleTV too, but every so often I see some shakeyness or shutter I guess.  If I rewind it, that does not appear again in the same spot.  Not sure what is causing it.  Can you check out that file whenever you get a moment and let me know what you think.  That was a 720p capture.   That video is the one that starts with gh...  I am going to download yours now and check them out!

    Okay, my turn to go "WOW!" File is a 720p60 Main Profile at Level 3.2 which is playable on the TV3. What I am excited about, is the fact that the file also plays on my TV2 devices which I had not expected. Basically, by capturing the source file as a 720p60 clip and processing it in HandBrake, you lowered the level to one that is playable at the current 59.94 frame rate. You could also have reduced the frame rate at the same time in Handbrake but this may introduce other problems commonly associated with changes in frame rate. As to random "stutter," I did not really see any when viewing in the "True Motion" mode on my HDTV, but this may simply be due to random dropped frames by the TV3 player. Basically, you are riding the playback limit here for the TV2/3 devices and I would consider this normal playback and probably provides superior playback consistency as compared to my clips with lowered frame rates. By using HandBrake first to make the files TV2/3 playback compatible, they can then be edited in MPEG Streamclip, saved in their current edited form, and played via the TV device as is. I tried the same thing with VoltiacHD using the built-in "Faster Conversions" preset but the problem with that work flow is the output was reduced to 960x540 for compatibility with all TV models even though the conversion ratio was reduced to about 1.5:1 (90 minutes for a 60 minute clip). I did have one complaint, however. Not sure if the problem was caused but the way you connected your RCA line or the result of your work flow, you you only had one active channel of audio in the GH05102012.mp4 clip.

     

     

    Well, that is too disapoining.  I saw that it had that feature and was excited at the thought it would actually work well.  When will someone come up with a system to edit these files percisely?

    The problem is the difference in technologies involved. QT is based on content stored as parallel streams of data synchronized to a common clock. MPG, MPEG, TS, M2TS, VOB, etc. files contain blocks of video data interspersed with blocks of audio data in a single stream. Since QT content is based on a one-to-one frame correspondence between the audio and video track data, it can be easily edited at the "frame level." You may have noticed that I have repeatedly emphasized this point but I expect it didn't mean much to you at the time. These other containers however, are most easily edited at a "block" (or Group of Pictures) level since each block of audio data corresponds to an associated block of video data and relies on this sequential interspersing of data for internal "spatial" sychronization rather than "temporal" synchronization. While MPEG Streamclip and HandBrake may make this bridging of spatial to temporal synchronization look easy during conversions, it is much more difficult to smultaneously access a particular video frame within one block of data and its corresponding audio frame within another block of data for editing. That is why the content is is usually converted to synchronized intermediate editing compression formats before actually editing the content.

     

     

    Hoping I come up with some sort of reasonable way of doing this.  Also nice to see someone else in NJ doing this as well!

    Actually, the process of using HandBrake to make the file both TV3 and/or TV2 compatible, as well as, edit compatible in MPEG Streamclip is probably your best approach. If the source file is 1080i60, you will have to either transcode to a 1080p24, 720p60, or 720p24 file for editing. Or, if the source file is 720p60, try both the "Peak VFR" option and "Same as Source" option. The choice is yours so I would recommend you take a single 1080i60 source file and convert it to all three output options for editing and testing on your TV device. Do the same with a single 720p60 source file and convert it to both 720p60 (should lower Level to 3.2) and a 720p24 (i.e., 23.976)/720p30 (i.e., 29.97 fps) files. Compare all 6 files (three from 1080p60 and three from 720p60 source) to see which looks the best to you on your system. Then try using the one you like the best for your "normal" work flow. As previously noted, this is not the best way to go if you plan to re-edit the file in a dedicated video editor app, add titles, transitions, filters, effects, or mix the captured content with photos or other multimedia content, but it may be the best work flow for your particular needs here as stated in your original question.

     

    Are you also in the South Jersey area? If so, are you a member of a local MUG (Mac User Group). I belong to SJAUG (South Jersey Apple User Group) northern division. We normally meet at Medford Leas on the 4th Saturday of each month if you are in the are and interested in attending. Also, if interested, here is a link to a copy of last month's newsletter:

     

    CA_April_2012.pdf

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
1 ... 3 4 5 6 7 8 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.