LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Splitting a real media file (https://www.linuxquestions.org/questions/linux-software-2/splitting-a-real-media-file-579938/)

Tommo 08-26-2007 10:44 AM

Splitting a real media file
 
Hi there. I have tried googling around a bit but I couldn't find an answer. How do I split a realmedia file into several smaller files? ffmpeg/mencoder should be able to do this shouldn't they? Will I have to convert it to avi before splitting? The resulting files must play however, so please do not post a reply saying "man split".

Thanks

MS3FGX 08-26-2007 10:58 AM

RealMedia in general is a difficult format to work with. I would suggest converting the videos to AVI with Mencoder, and then manipulating them with whatever video editor you feel comfortable with. It will take longer, but you avoid the aggravation of trying to work with the RM files natively.

Tommo 08-26-2007 11:13 AM

Yeah the problem with that is the corresponding avi file is ~180mb to the 50mb real media file. There is an endpos argument for mencoder which I am looking into at the moment.

MS3FGX 08-26-2007 11:17 AM

What settings are you using to convert the video? Or more to the point, how long is the video you are converting? A 180 MB XviD file should be no less than 20 minutes long.

Tommo 08-26-2007 11:34 AM

Well the real media file was ripped from a stream so as I'm sure you can guess the quality isn't great. It is about 30 minutes long.

Code:

$ mencoder inputfile.rm -o movie.avi -ovc lavc -oac mp3lame -ss 0:30 -endpos 5:22
This produces a ~35mb file.

I would ideally like each part to be under 10mb as I am uploading them to youtube.

Tommo 08-26-2007 01:47 PM

There must be a way to do this. However I cannot find it.

Code:

mencoder -ovc xvid -oac mp3lame -xvidencopts bitrate=300 -o movie.avi -ss 0:30 -endpos 05:00 movie.rm
This produced a 16mb file if anyone cares.

Here are some resources for those trying to find an answer to a question similar to mine:

Mencoder tips
Mencoder guide
Ffmpeg guide

Edit: It seems that -endpos adds to -ss so '-ss 05:30 -endpos 02:00' will start encoding at 5:30 and stop at 7:30. This seems to have helped :)


All times are GMT -5. The time now is 02:14 AM.