I downloaded a video from the Net that's in a "Flash Video" container and encoded as AAC LC and H264/AVC High@L3.0.
VirtualDub can't work with those without installing a bunch of stuff, and AviDemux can only cut at keyframes (intra frames) because of h.264 ("Avidemux supports smart editing only for MPEG-4 ASP and MPEG-2 encoded video.").
So I need to convert this into files for either VirtuaDub or AviDemux so I can do some fine-grained editing.
I tried the following, but AviDemux can't open the output file:
If ffmpeg can't convert the file as needed, what other (Windows) application would you recommend?Code:ffmpeg -i input.flv -vcodec mpeg4 -acodec copy output.mpg "Attempt to open output.mpg failed!" ffmpeg -i input.flv -vcodec mpeg4 -acodec copy -format mpeg2video output.mpg "Attempt to open output.mpg failed!"
+ Reply to Thread
Results 1 to 12 of 12
Use avisynth to frame serve to virtualdub
Simply install avisynth (2.58)
Then put this into notepad
directshowsource("path to your flv")
The quotes are necessary.
Then load yourflv.avs in virtualdub.
In avidemux 2.6
load your flv
Select either the ffvideooforce or the directshowsource tab
If you opt for directshowsource tab, check Use Haali's .., and adjust framerate if other than 25
click on create proxy option
Then load same flv in avidemux, and proceed.
I notice that...
1. when clicking on the Key frame step controls, it jumps from frame to frame instead of keyframe to keyframe. Is that normal?
2. More importantly, after cutting a few scenes in that 2mn video and choosing File > Save as AVI, the file is only 10KB (original = 8.000KB), and it doesn't play in VLC. Obviously, this is not the right way to do it
Edit: Found it. We must choose Video > Direct Stream Copy before File > Save as AVI.
Funny thing: The full original FLV file is 8MB, and the shortened AVI is... 240MB! Why is that?
Edit: Following this thread, I hit Video > Full Processing Mode, and Video > Compression = Xvid MPEG-4 Codec, before hitting File > Save as AVI.
The output file is a more reasonable 10MB, but still bigger than the original 8MB, although some scenes were removed. Is that because of the container (AVI instead of FLV), the video codec (Xvid MPEG-4 instead of H264/AVC), or both?
Last edited by yetanotherlogin; 9th Nov 2012 at 06:37.
An .avs file is delivering decoded (uncompressed video)- direct stream copy will lead to huge size.
h264 is a format that has better compression. So, for the same file size h264 will have better quality.
However, size of file you get depends on what settings you have used for xvid, rather than differences in the two containers.
Thanks for the infos. I'll experiment and see what I get.
yetanotherlogin: I am fairly certain you could edit your .flv file in Freemake Video Converter. You could then export it in any format that suits your taste. Please be wary when installing Freemake Video Converter that you don't install toolbars and other programs you do not want. So be careful during the install process. It is a great program, but I had to warn you about the adware. You don't have to install extra software to use the program, it already has your codecs and tools built in.
Thansk for the tip. I'll give FVC a try.
yetanotherlogin: If you need frame level accuracy and you need to convert to .mpeg2 FVC does have an .mpeg2 output mode. Since your file is an .flv file with h.264, I don't believe FVC can give you frame level accuracy; I believe it would cut on key frames like avidemux. What is the format you want to end up with after you have converted it to .mpeg2 to edit? I could be wrong about the editing on key frames for the h.264 in FVC. The editing function is rather basic, but it might be to your liking; I guess just work with a copy of your original file and experiment a little bit.
yetanotherlogin: Your file is 2 minutes in length and 10 GB? Could you post some information about the specs of this file by grabbing the information from MediaInfo? The size of 10 GB for just 2 minutes of video has me wondering what your dealing with.
This would work for a simple remux:
ffmpeg -i input.flv -vcodec copy -acodec copy output.mp4
or if you want a simple transcode:
ffmpeg -i input.flv -r 25 -sameq output.mpg
as it's remux, nothing is touched. MP4 video can be opened directly by Avidemux. Come to that, so can FLV just choose video and audio copy, output as MP4 after you've finished editing.
As for keyframes AVC/H264 can only be reliably cut on IDR frames, anything else will likely result in corruption as the video is played back. Thats a limitation of H264. If you have to transcode you'll lose quality, no way around that.
Last edited by Chug a Bug; 17th Nov 2012 at 13:11.
ffmpeg commands and the info about H264. I didn't know the difference between remuxing and transcoding, but this article explains it:
Transcoding means decoding an existing file, re-encoding the streams, and re-multiplexing the encoded streams. Transcoding might be done to convert a file from one encoding type to another; for example, to convert H.264 video to Windows Media Video (WMV). It can also be done to change the encoded bit rate; the video frame size; the frame rate; or other format parameters.
Remultiplexing or remuxing means demultiplexing a file and re-multiplexing the streams, with no decode/encode step. This might be done to change how the audio/video packets are multiplexed, to remove a stream, or to combine streams from two different source files.