INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

i need to remux my flv with h.264 video into mp4

Forum Index -> Video -> Video Conversion Printer-friendly version
Reply to topic
Author Message
kurt770
Member


Joined: 08 Oct 2008
Location: United States

Post Posted: Oct 08, 2008 21:30 Posts Comp View users profile Send private message Reply with quote

Hi,
I have some FLV files that have h.264 video and aac audio inside (Hulu 480p). What I want to do is remux that into a different container (mp4 would be nice but i'm fine with avi) without re-encoding since it is already in h.264. I downloaded ffmpeg (r15562) from http://www.razorbyte.com.au/ffmpeg/ and this is the version of xvid I installed (ffmpeg complained about not having a xvid dll) http://www.divx-digest.com/software/xvid.html
I also have ffdshow tryouts (latest) installed with it set to decode h.264
So, when I try using ffmpeg, at the command prompt (XP SP3), I am typing in (where m2.flv is the original):
ffmpeg -i m2.flv -vcodec copy -acodec copy m2.mp4
FFmpeg does convert the file but it continually repeats [mp4 @ 0xe28070]pts has no value... Looking back, it sometimes gives a line of information about bitrate, but the rest of the lines are that same message. At the end, it says frame=22200 fps=890 q=-1.0 117002kB time=984.02 bitrate=974.0kbits/s video:105574kB audio: 10567kB global headers: 0kB muxing overhead 0.741513%. When I try to play back the file, the audio only plays for a few seconds until becoming silent and the video is so choppy/stuttery that is it unwatchable.
I am open for any ideas (even using entirely different programs)

Thanks!
Kurt

Edit: forgot to mention what libraries were built in my ffmpeg:
Included libraries:
FAAC 1.26
FAAD2 2.6.1
gsm 1.0.12
LAME 3.98.2
liba52 0.7.4
liboil 0.3.15
libtheora 1.0beta3
Ogg 1.1.3
SDL 1.2.13
Shroedinger 1.0.5
x264 r999
Xvid 1.2.0-dev (CVS HEAD 2007-07-26)
Vorbis 1.2.0


Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Oct 09, 2008 02:52 Posts Comp View users profile Send private message Reply with quote

Maybe try avidemux and use copy for video and audio and save as a mp4.

If that wont work use avidemux to separate the video and audio and multiplex using YAMB, MP4muxer, etc.


kurt770
Member


Joined: 08 Oct 2008
Location: United States

Post Posted: Oct 09, 2008 22:26 Posts Comp View users profile Send private message Reply with quote

When I try to open the flv inside of avidemux it says "No audio decoder found for this file. Save (A+V) will generate bad AVI. Save audio will work." It then opens it up, however, the only thing it displays in the preview window is a green frame. I first tried to make an mp4 using video copy and audio copy. It then said "Invalid audio stream detected. The audio stream may be invalid for this container. Continue anyway?". If I click on continue, it says "Failed".

I then tried to demux the flv. Inside of avidemux I went to audio, then clicked on save and saved it with an aac extension. I then disabled the audio track and exported the video as an mp4. I didn't see any other way for me to just extract the video (maybe I'm missing something). YAMB refused to mux the aac and the video I saved. I have a feeling that I didn't do this step correctly because the video was in an mp4 container.

Any advice?

Thanks!!


kurt770
Member


Joined: 08 Oct 2008
Location: United States

Post Posted: Oct 17, 2008 21:48 Posts Comp View users profile Send private message Reply with quote

Alright guys... I got it working!
For anybody that wants to remux Hulu 480p:
Check out this thread I found: (scroll down to the post by BlueCop): http://forum.doom9.org/showthread.php?t=141120

If you set things up the way I did the first post of this thread and follow BlueCop, it should work perfectly.
The only thing that can be different is finding the frame rate of the 480p video. Since many players can't figure out the frame rate of the 480p flv but can of a normal flv, simply rip the low quality stream and the high quality stream. Since the frame rate of the low quality stream and the high quality stream is the same, just use any other program to find the frame rate. Also, in the original file name (when replay is still ripping), it will usually tell you the frame rate.

Here are the ones that I have had to use so far:
23.976 FPS
29.970 (it says 30FPS on the file when ripping)

Good Luck!!


rfryar
Member


Joined: 19 Oct 2008
Location: United States

Post Posted: Oct 19, 2008 19:14 Posts Comp View users profile Send private message Reply with quote

What is the exact command line you have used to remux using MP4box? Here is what I have used but it seems to be ignoring the FPS line.

MP4Box -add output_track1.h264 -fps 23.976 -add output_track2.aac New.mp4

Rick


kurt770
Member


Joined: 08 Oct 2008
Location: United States

Post Posted: Oct 19, 2008 19:35 Posts Comp View users profile Send private message Reply with quote

Rick:
Here is exactly what I am using:
mp4box -add hulu_track1.h264:fps=23.976 -add hulu_track2.aac final.mp4

Good luck!
-Kurt


rfryar
Member


Joined: 19 Oct 2008
Location: United States

Post Posted: Oct 20, 2008 19:20 Posts Comp View users profile Send private message Reply with quote

For anyone who cares here is a quick batch script to convert from FLV to MP4.
The format is
mp4encode.bat <inputfile> <fps> <outputfile>

Code:

@echo off
if "%1"=="" goto use
if "%2"=="" goto use
if "%3"=="" goto use

ffmpeg -i %1 -vcodec copy -acodec copy OUTPUT.mp4
mp4box -raw 1 OUTPUT.mp4
mp4box -raw 2 OUTPUT.mp4
del output.mp4
mp4box -add output_track1.h264:fps=%2 -add output_track2.aac %3
del output_track1.h264
del output_track2.aac
goto end

:use
echo.
echo USAGE:
echo %0 [inputFile.flv] [fps:29.97:23.976] [outputFile.mp4]
echo.

:end


Rick


kurt770
Member


Joined: 08 Oct 2008
Location: United States

Post Posted: Oct 21, 2008 21:40 Posts Comp View users profile Send private message Reply with quote

Thanks for the batch file Rick!
I had my own set of batch files to do the same thing, but yours is much more elegant and will save me some time.


Reply to topic All times are GMT - 6 Hours
Forum Index -> Video -> Video Conversion Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
Replay Media Catcher lets you record ANY streaming video and save on your computer! More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics