Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Converting audio/video files (http://stream-recorder.com/forum/forumdisplay.php?f=16)
-   -  

trying to convert stuttering video but having problems

(http://stream-recorder.com/forum/showthread.php?t=5531)

billsantos 01-23-2010 03:54 PM

trying to convert stuttering video but having problems


 
Recently I downloaded four streaming videos. Three of them play at 24 fps and present no problems. The fourth however plays at something around 23.5 or 23.976 fps and shows significant stuttering. At first I used a program called AVIdemux to change frame rate from 23.5 to 24 fps. This solved the stuttering, but now I am left with out of sync audio that I can't seem to remedy. AVIdemux seems to allow audio frame rate changes from NTSC to PAL or similar, but I can't input a deluxe change. I've tried adjusting the audio offset, but the longer the video plays, the more out of sync the audio becomes. Need some help here..... if I change the video from 23.5 to 24 fps, what has to be done exactly to the audio to compensate? Is there software that can perform both tasks simultaneously and successfully?

Thanks.

Stream Recorder 01-23-2010 11:36 PM

Re: trying to convert stuttering video but having problems


 
I don't really know how to solve this with AviDemux, but you can try the following:
Repairing FLV files by remuxing them with freeware FLV Extract and mp4box

billsantos 01-24-2010 12:02 PM

Re: trying to convert stuttering video but having problems


 
I tried this method, but it didn't work. The FLVextract program did not extract the needed files and I am trying to do this without having to convert, since conversions cause loss of quality each time.

The method I'm using involves extracting and resampling the audio file separately from the video and then merging the two once the audio file is in sync. However, I have not found an easy way to do this and the task is quite tedious. It isn't as simple as resampling the audio as sometimes an audio shift also appears to be needed. Due to all the time it's taken me to realign just one or two movies, I question whether future movies are worth it. I thought surely someone might have a more efficient method, or could recommend some software that would aid the task but so far there has been limited response.

I have been running into this problem with standard HD and full HD videos from CBS. Full HD are already at 24 fps film speed and should present no problems when I view them on the large screen LCD tv. However, the standard HD vids have been another matter. They seem to play at 23.5 to 23.976, show significant stuttering, and they aren't going to display properly on most LCD's because they are not at 24 fps. Just trying to change that small amount of frame speed (from 23.5 to 24 fps) and keep the audio in sync has been one of the most difficult tasks I've ever dealt with in audiovisual. I had hoped someone else had a reasonable solution. CBS is popular and I'm sure others have been running across the same issues with HD vids.

Stream Recorder 01-25-2010 01:29 AM

Re: trying to convert stuttering video but having problems


 
Have you tried to repair your files with GetFLV? You can use a demo version for repairing FLV files with it.

Stream Recorder 01-25-2010 01:29 AM

Re: trying to convert stuttering video but having problems


 
What program do you use for downloading from CBS?

billsantos 01-25-2010 08:43 AM

Re: trying to convert stuttering video but having problems


 
I've been using GetFLV. Yes, I did try to repair the standard HD vids, but to no avail. The only thing I've been able to do so far is as I've already described, which eliminates 90% of the stuttering but leaves the audio to a tedious fix! Luckily, not all of the vids I want are in HD, with most being Full HD, so I'm lucky and the Full HD's don't have any problems.

blimey 01-25-2010 04:19 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by billsantos (Post 15766)
I tried this method, but it didn't work. The FLVextract program did not extract the needed files and I am trying to do this without having to convert, since conversions cause loss of quality each time.

Which file did FLVExtract fail to extract?

Both HD and HD-1080p files at CBS are h.264/aac. FLVExtract shouldn't have any problem with either. Using this method is not transcoding (converting), it is only demuxing and remuxing. There is no loss.

Quote:

Originally Posted by billsantos (Post 15766)
The method I'm using involves extracting and resampling the audio file separately from the video and then merging the two once the audio file is in sync. However, I have not found an easy way to do this and the task is quite tedious. It isn't as simple as resampling the audio as sometimes an audio shift also appears to be needed. Due to all the time it's taken me to realign just one or two movies, I question whether future movies are worth it. I thought surely someone might have a more efficient method, or could recommend some software that would aid the task but so far there has been limited response.

You shouldn't have to do any of this. Any "stuttering" or sync issues are most likely due to the flv container produced by GetFLV.

Quote:

Originally Posted by billsantos (Post 15766)
I have been running into this problem with standard HD and full HD videos from CBS. Full HD are already at 24 fps film speed and should present no problems when I view them on the large screen LCD tv. However, the standard HD vids have been another matter. They seem to play at 23.5 to 23.976, show significant stuttering, and they aren't going to display properly on most LCD's because they are not at 24 fps. Just trying to change that small amount of frame speed (from 23.5 to 24 fps) and keep the audio in sync has been one of the most difficult tasks I've ever dealt with in audiovisual. I had hoped someone else had a reasonable solution. CBS is popular and I'm sure others have been running across the same issues with HD vids.

23.976 is a standard framerate. This by itself does not cause the issues you describe.

I've seen issues with flv files produced by getflv, but they are always solved by simple demuxing and remuxing (which eliminates getflv's faulty .flv container).

Carefully follow the steps with FLVExtract and mp4box again, and describe exactly where you have trouble.

You can also quickly rebuild the container with ffmpeg like this:

Code:

ffmpeg -i "CBS_file.flv" -vcodec copy -acodec copy "NewName.flv"

--or this:

ffmpeg -i "CBS_file.flv" -vcodec copy -acodec copy "NewName.mkv"


billsantos 01-25-2010 06:18 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by blimey (Post 15830)
Which file did FLVExtract fail to extract?

When I tried Flvextract, it extracted to AVI and MP3, so I wasn't sure how to proceed from there. On the Flvextract page, it says nothing can be done if it didn't extract as the files you specified, so I wasn't sure how to proceed from there.

Quote:

Originally Posted by blimey (Post 15830)
Both HD and HD-1080p files at CBS are h.264/aac. FLVExtract shouldn't have any problem with either. Using this method is not transcoding (converting), it is only demuxing and remuxing. There is no loss.

I'm certainly willing to give it a second try if you could tell me what to do with the AVI/MP3 files. Practically anything is better than doing the process I came up with.

Quote:

Originally Posted by blimey (Post 15830)
You can also quickly rebuild the container with ffmpeg like this:

Code:

ffmpeg -i "CBS_file.flv" -vcodec copy -acodec copy "NewName.flv"

--or this:

ffmpeg -i "CBS_file.flv" -vcodec copy -acodec copy "NewName.mkv"


Is ffmpeg a separate program and would I still need Flvextract/ mp4box?

Thanks for any help.

blimey 01-25-2010 06:42 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by billsantos (Post 15834)
When I tried Flvextract, it extracted to AVI and MP3, so I wasn't sure how to proceed from there. On the Flvextract page, it says nothing can be done if it didn't extract as the files you specified, so I wasn't sure how to proceed from there.

If flvextract is producing an .avi file for the video track, then the video is not h.264. It may be flv1 or vp6. Do you know what video codec is used? Do you have a link for the video?

You can get ffmpeg here.

billsantos 01-25-2010 08:18 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by blimey (Post 15835)
If flvextract is producing an .avi file for the video track, then the video is not h.264. It may be flv1 or vp6. Do you know what video codec is used? Do you have a link for the video?

It's vp6. Here is a link to one of them:
Code:

http://www.cbs.com/hd/video.php?cid=&pid=th2_IRo1CqOp3GtVMF5_ch_YMAgzoU9M&play=true&offset=0&show=star_trek_remastered
If you look at the episodes below this one, anything I'm downloading with GetFLV that offers a maximum of HD and not 1080p is coming out stuttered (the 1080p ones play fine).

billsantos 01-26-2010 06:13 PM

Re: trying to convert stuttering video but having problems


 
I tried using ffmpeg today, got it to work after relearning about these types of programs, and used the code provided by Blimey in an attempt to rebuild the flv container. Although a new file was created, it made no difference as the video is still stuttering. Any more ideas?

billsantos 01-27-2010 04:50 AM

Re: trying to convert stuttering video ***UPDATE** but having problems


 
I found out the problem, but I still don't know the solution. I used Virtual Dub with a plug-in that allows working with flv files. I took one of the HD (not 1080p but standard HD) downloads from CBS (see prior message for links) and opened it in Virtual Dub. Upon examination, at irregular intervals, there appears to be duplicate video frames created, one right after another. When these duplicates occur, they seem to replace the next progressive frame that should have been there originally, so we end up with not only a doubling up of frames, but a missing frame as well because the duplicate replaces the actual frame. Since this happens irregularly and only involves two frames, we end up with the stuttering effect. Now the question is, what's causing it and what's the solution? Either all of the HD videos from CBS for this particular program have this fault upon download, or there is a glitch in GetFLV causing it. Like I said before, it only happens on CBS HD and not HD 1080p.

Just to see what would happen, I took a one minute section and removed all duplicate frames and saved it as a new AVI with Virtual Dub. The stuttering wasn't as great, but still there because now a frame is missing, the one the duplicate replaces.

Is there another program I can try with CBS to see if I get the same results?

blimey 01-27-2010 04:17 PM

Re: trying to convert stuttering video but having problems


 
Do you have "stuttering" when playing the raw flv file as downloaded?

I checked the file that you mentioned. It seems to play ok to me. I tried to look carefully, and perhaps I noticed some un-smoothness when there is a lot of fast horizontal action - but it didn't seem like stuttering. Please explain exactly when you experience the problem; is it on the raw file (as downloaded) playing on a PC? Or perhaps you are playing it on some sort of set-top media player or htpc?

It is kinda odd for a HD 720p file to use VP6 for the video. I'm not sure why they did that. The framerate does seem to be an accurate 24.000 fps.

I realize that you don't want to do any conversion - and I would agree if the video was h.264 - but in my opinion it is really not much of an advantage to keep the video in VP6. I would convert it to h.264. Have you tried converting it, and if so, does the stuttering remain?

billsantos 01-27-2010 06:29 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by blimey (Post 15939)
Do you have "stuttering" when playing the raw flv file as downloaded?

Yes, I do.

Quote:

Originally Posted by blimey (Post 15939)
I checked the file that you mentioned. It seems to play ok to me. I tried to look carefully, and perhaps I noticed some un-smoothness when there is a lot of fast horizontal action - but it didn't seem like stuttering. Please explain exactly when you experience the problem; is it on the raw file (as downloaded) playing on a PC? Or perhaps you are playing it on some sort of set-top media player or htpc?

That's what I'm talking about. This unsmoothness is all throughout the video at random spots. It's also occurring during more stationary action, but more difficult to notice obviously. I experience the problem when I try to play it with any of the PC media players I have, it doesn't seem to matter which one. And yes it is the raw flv file download from GetFLV.

Quote:

Originally Posted by blimey (Post 15939)
It is kinda odd for a HD 720p file to use VP6 for the video. I'm not sure why they did that. The framerate does seem to be an accurate 24.000 fps.

Depending on which media player I use, I sometimes see 23.5 fps for the rate all the way up to 24 fps.

Quote:

Originally Posted by blimey (Post 15939)
I realize that you don't want to do any conversion - and I would agree if the video was h.264 - but in my opinion it is really not much of an advantage to keep the video in VP6. I would convert it to h.264. Have you tried converting it, and if so, does the stuttering remain?

I tried your conversion suggestion tonight using Super. The result still has the unsmoothness.

blimey 01-27-2010 10:09 PM

Re: trying to convert stuttering video but having problems


 
The problem is present even when downloaded by means other than GetFLV. After looking at the video further, my guess is that it is a bad encode. I can't think of any easy way to fix it.

billsantos 01-28-2010 02:51 AM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by blimey (Post 15945)
The problem is present even when downloaded by means other than getflv. After looking at the video further, my guess is that it is a bad encode. I can't think of any easy way to fix it.

Thanks, that's what I was wondering about. I'm also curious about how the video appears when being streamed live- does it still show unsmoothness? I don't have fast enough of a connection to test that.

There is some discussing of this type of problem at the Doom 9 forum also, although I can't find the thread and I don't think a solution was found there either. So far, the only real progress I've had is slightly speeding up the frame rate which leaves the sound syncing issue of course. Looks like I may have to go that route with the 15 or so in HD (thank goodness the 1080p's don't have this problem!).

Thanks again for your help. Should you or anyone else continue to have suggestions, I encourage sharing of it and I'd be greatly appreciative.

blimey 01-28-2010 03:55 PM

Re: trying to convert stuttering video but having problems


 
If frames are missing, I'd think that the web flash player would have the same issue.

Most media players that work with the flv container simply parse the codecs directly. However, Sothink Flv Player uses the adobe flash decoder, so it plays flv files much like a web flash player would.

Also, most video converters parse the codecs directly, but Moyea Flv to Video Converter Pro 2 also uses an adobe decoder, and parses all of the flv container timestamps. This is why the moyea converter will often work well with livestream flv files that may have non-linear irregularities.

But if frames are missing, nothing is going to create them for you. If the content was one-of-a-kind, it might be worth the trouble to edit the flv timestamps for the duplicate frames to match the previous frame, so the audio would not advance - and then run it through the moyea converter. But this still would be a lot of work.

Does the HQ version have the same problem? Maybe they will eventually post 1080p versions. As far as the current HD version, it is just hard to take bad input (with missing information) and make it good.

Stream Recorder 01-28-2010 11:59 PM

Re: trying to convert stuttering video but having problems


 
Quote:

Originally Posted by blimey (Post 15994)
Sothink Flv Player uses the adobe flash decoder, so it plays flv files much like a web flash player would uses the adobe flash decoder, so it plays flv files much like a web flash player would.

Is it a DirectShow decoder?

AFAIK freeware Applian FLV player works the same way. At least it plays flv videos much like a web flash player would.

Inception 05-06-2011 04:39 AM

Re: trying to convert stuttering video but having problems


 
Encode with 23.976 or 24fps audio will perfectly sync for files which are downloaded by GetFLV.

Try Handbrake to encode.


All times are GMT -6. The time now is 07:08 AM.