Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th November 2004, 01:37   #1  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
possible mp4 issues?

Hi,

I have written a simple batch file to transcode my avi files to mp4 files. It uses mp4box and ffmpeg to do this.
avi files are XVID encodes SP@level 3 and audio is done is mp3.
mp4 files are hinted for use with Darwin Streaming Server.
I have ran some succesful samples.
Files play fine in Quicktime and VideoLan0.8 locally as remotely through RTSP.
Note that 3ivx is not installed.

Here is a sample of my test bat file:
Code:
rem demux video:
ffmpeg.exe -y -i simpsons.avi -vcodec copy -f avi -an video.avi
rem demux audio:
ffmpeg.exe -y -i simpsons.avi -vn -acodec copy audio.mp3
rem avi video to mp4:
mp4box.exe -import "video.avi" -nodrop -flat "video.mp4"
rem mp3 to mp4 with aac at 128kbps:
ffmpeg.exe -y -i "audio.mp3" -acodec aac -ab 64 -f mp4 "audio.mp4"
rem mux audio and video:
mp4box.exe -merge "audio.mp4" "video.mp4" "simpsons.mp4"
rem hinting:
mp4box.exe -isma -hint "simpsons.mp4"
rem cleanup temp files:
del simpsons.mp4
del video.avi
del audio.mp4
del video.mp4
del audio.mp3
rem final name:
ren out_simpsons.mp4 simpsons.mp4
Question is are there other things I have to pay attention to before i start transcoding?
Any suggestion may be welcome.
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-

Last edited by neo75903; 16th November 2004 at 01:41.
neo75903 is offline   Reply With Quote
Old 16th November 2004, 07:05   #2  |  Link
pogo stick
I have sawdust in my head
 
pogo stick's Avatar
 
Join Date: Aug 2003
Location: Russia
Posts: 305
Are you sure you need to reencode mp3 to aac? mp4 can handle both.
Then it would be much simpler:
mp4box -import simpsons.avi simpsons.mp4

Or Darwin Streaming Server can not use mp3?
pogo stick is offline   Reply With Quote
Old 16th November 2004, 12:45   #3  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
i know that mp3 is part of the mpeg4 specs, but Quicktime neither VideoLan is able to play a mp4 file with mp3, yet.
Or i have to wait until next Quicktime comes out and see whether it supports mp3 in mp4 container.
Cosmo and surprise ... Real player played the file.
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-

Last edited by neo75903; 16th November 2004 at 13:04.
neo75903 is offline   Reply With Quote
Old 16th November 2004, 14:08   #4  |  Link
gotaserena
String Theorist
 
Join Date: Mar 2003
Location: Na terra dos 10000 lagos.
Posts: 218
Any reason not to call ffmpeg only once to process both audio and video and create the mp4 directly? You can always run MP4Box -isma on the resulting .mp4 file.
gotaserena is offline   Reply With Quote
Old 16th November 2004, 16:33   #5  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
i dont think it will works and have no clue how the syntax will looks like.
encoding, merging and hinting are separated processes dont think you can mix them.
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-
neo75903 is offline   Reply With Quote
Old 16th November 2004, 16:40   #6  |  Link
gotaserena
String Theorist
 
Join Date: Mar 2003
Location: Na terra dos 10000 lagos.
Posts: 218
well, ffmpeg -y -i infile.avi -acodec aac -ab 64 -ac 2 -vcodec copy -f mp4 outfile.mp4 && MP4Box -isma -hint outfile.mp4 worked here.
gotaserena is offline   Reply With Quote
Old 16th November 2004, 17:01   #7  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally posted by neo75903
i know that mp3 is part of the mpeg4 specs, but Quicktime neither VideoLan is able to play a mp4 file with mp3, yet.
Or i have to wait until next Quicktime comes out and see whether it supports mp3 in mp4 container.
Cosmo and surprise ... Real player played the file.
The lastest release of Nero's ShowTime player also supports MP3 in MP4 (some of the newer previous versions did not)...

It would be kinda handy if VideoLAN could support this feature... Has anybody told them/do they know, it does not work?


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 16th November 2004, 18:12   #8  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
@gotaserena:
idd i was to fixed in demuxing my avi file first.
edit: tried your syntax, Quicktime could not play the file with following error:
----------------------------------------
"test.mp4" is not a valid MPEG-4 file
For more details, see below...
----------------------------------------
Errors occur when parsing "test.mp4"
The file may be corrupted
----------------------------------------
My general experience is that ffmpeg created mp4 files are not playable in Quicktime. videoLan did play the file. Is it possible that the muxer is also based on mp4creator's source?

@SeeMoreDigital:
I tried to do same thing with VideoLan as i did with ffmpeg. The result file was played by videolan, but it didnt for ffmpeg created one.

Does anyone whether Quicktime will support mp3 in mp4? they have been talking about he-aac, but are very silent about mp3 support in it.
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-

Last edited by neo75903; 16th November 2004 at 18:42.
neo75903 is offline   Reply With Quote
Old 16th November 2004, 19:39   #9  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally posted by neo75903
Does anyone whether Quicktime will support mp3 in mp4? they have been talking about he-aac, but are very silent about mp3 support in it.
No it can't... the file b0rks from the "get-go"

.

Bizarrely, the QuickTime player is able to open Mpeg4+MP3 in MOV but will eventually crash!

The only sure fire way of being able to play Mpeg4+MP3 in either MP4 and MOV is by installing 3ivx's filters...


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 16th November 2004, 21:41   #10  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
Thx i will wait until the next Quicktime release and see if support for XVID+mp3.mp4 will be available and decide from then what to do.
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-
neo75903 is offline   Reply With Quote
Old 16th November 2004, 22:14   #11  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally posted by neo75903
Thx i will wait until the next Quicktime release and see if support for XVID+mp3.mp4 will be available and decide from then what to do.
I'm sure if you persevere at trying to successfully convert MP3 to AAC you'll get what you want .

That said (as I've posted before), Mpeg4+AAC streams have to be muxed properly, otherwise the QuickTime player b0rks (unless you have 3ivx's filters installed). And not everybody wants to have 3ivx installed...


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 17th November 2004, 00:11   #12  |  Link
gotaserena
String Theorist
 
Join Date: Mar 2003
Location: Na terra dos 10000 lagos.
Posts: 218
I've just checked that ffmpeg does not include the MPEG-4 profile of the video in the .mp4 if it is just copying it. If you do encode the video using ffmpeg, be sure to use h.263 and keep it simple (profile) and the resulting .mp4 will play in quicktime. At least this is what I've seen here.
gotaserena is offline   Reply With Quote
Old 17th November 2004, 01:24   #13  |  Link
neo75903
The One, as in unique :)
 
neo75903's Avatar
 
Join Date: Feb 2004
Posts: 504
I think mp4box mp4 muxing is currently more reliable. Actually the one i have best results so far.

Video is ok, i only use h263 and SP@level 3 for Quicktime compability, only screwed once last year when i encoded a small batch to discover 3ivx was doing the job resulting a error when 3ibx was removed.
That is also i am not installing 3ivx atm. Not to be said playback performance is much better with 3ivx installed.

My last 'important' desicion is the choice of aac or just wrap mp3 into mp4. I prefer last option if Quicktime do support mp3 in a mp4 container. I think the problem is in mp4 parser cause Quicktime can play mp3 files

btw some screenshots of Quicktime can be found here:
http://www.appleinsider.com/article.php?id=655
__________________
Mr. Anderson, welcome back. We...missed you.
-= Agent Smith, The Matrix Revolutions =-

Last edited by neo75903; 17th November 2004 at 01:30.
neo75903 is offline   Reply With Quote
Old 17th November 2004, 01:31   #14  |  Link
gotaserena
String Theorist
 
Join Date: Mar 2003
Location: Na terra dos 10000 lagos.
Posts: 218
if it works for you, great. I just wanted to say that, provided the video encoding is done with ffmpeg, you should not have any trouble playing the result file in qt.
gotaserena is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.