PDA

View Full Version : MOV neither Streaming nor Progressive Downloading


TheAgustin
11th October 2007, 20:53
Hi there people ;)
I can't get to stream (I mean... progressive download) a Quicktime .MOV movie.
Through x264 and mp4box I produced a .mp4 file that can be progressively downloaded over HTTP.

As soon as I use ffmpeg to remux the mp4 to a mov container, it loses the progressive download ability :(

This is the ffmpeg command line I'm using:
ffmpeg.exe -i file.mp4 -vcodec copy -acodec copy -y file.mov

Is there a way to get the .mp4 remuxed to a .mov and still be able to progressive download? Some of you have gone that way already... aren't ya?

Thanks for your help.
Cordially, Agustin.

bond
12th October 2007, 18:37
why do you need mov and not just mp4?

moved

SeeMoreDigital
12th October 2007, 19:38
Can you provide more details about your encode, such as: bit-rate, resolution, B-VOP quantity...


Cheers

TheAgustin
15th October 2007, 21:21
I'm trying to get a .mov out of the .mp4 mainly for cosmetics reasons.

I'm able to do so using ffmpeg but losing the capability of progressive downloading, which is important.

This is the command line I'm using

x264.exe --bitrate 700 --keyint 25 --min-keyint 12 --nf --no-cabac --subme 1 --no-chroma-me
--analyse none --vbv-maxrate 25000 --me dia --merange 8 --threads 2 --thread-input --progress
--no-psnr --no-ssim --output output.mp4 source.avs

mp4box.exe -hint output.mp4


If I use ffmpeg to get a .mov before the mp4box line, the file becomes unplayable.

If I use ffmpeg to get a .mov after the mp4box line, the file losses the progressive download capability.
This is the ffmpeg command line:

ffmpeg.exe -i file.mp4 -vcodec copy -acodec copy -y output.mov

Thanks for any advise ;)

Cordially, Agustin.

foxyshadis
15th October 2007, 23:42
Does it work if you just rename the mp4 to mov? Aside from the file name, what kind of "cosmetics" could you need?

TheAgustin
16th October 2007, 00:20
Just renaming the .mp4 to .mov doesn't work, it's not recognized as a valid file by the Quicktime player.

The .mp4 file plays fine in the Quicktime player. I could stop here because the file is playing fine, but I'm only missing that only small step (remuxing to .mov container preserving progressive download).

The .mov extension is a brand people can identify at a glance. It would be good to know if it's possible what I'm looking for. My guess is it's possible, Apple Trailers prove so.

Thanks for your comments, I really appreciate receiving them!
Cordially, Agustin.

smok3
16th October 2007, 14:12
make a text file named .htaccess with this inside:

AddType video/quicktime mp4

upload to the folder where your mp4 files are located and leave your file(s) mp4 :)

Apple Trailers prove so
they prove what?

TheAgustin
16th October 2007, 18:03
I understand your suggestion but it will not remux the .mp4 onto a .mov container with progressive download capabilities.

Ideally the output must be a .mov file, as mentioned in the previous posts.

Thanks for your help :)
Cordially, Agustin.

SeeMoreDigital
16th October 2007, 18:16
The .mp4 file plays fine in the Quicktime player. I could stop here because the file is playing fine, but I'm only missing that only small step (remuxing to .mov container preserving progressive download). Can you provide an .MP4 sample, so I can try muxing it to .MOV using QT7Pro.

For all we know FFmpeg might be borking the .MOV mux...


Cheers

TheAgustin
16th October 2007, 20:16
Thanks for your continuous help SMD !
Here is a movie:

http://www.fromthesunsetterrace.com/movies/small/DailySmall_633281248050312500_21.mp4

If I use ffmpeg to remux it onto a .MOV container then the file looses its progressive downloading capabilities (necessary).

Thanks for your support, again.

Yours. Agustin.

SeeMoreDigital
16th October 2007, 21:48
Hi Agustin,

Here's a link to your QT7Pro re-muxed .MOV sample: -

http://www.mytempdir.com/2041639

It will be interesting to see if it functions any differently from your FFmpeg mux...


Cheers

tateu
16th October 2007, 22:55
Your movie needs to be hinted and mp4box cannot hint an mov correctly, as you already found out. The only way I know to hint an mov is with Quicktime Pro. The test file from SeeMoreDigital has been hinted and should work the way you want it to.

TheAgustin
17th October 2007, 00:20
Dear SMD, it's working as expected...
I uploaded your file to my server for testing, it's progresively downloading:
http://www.fromthesunsetterrace.com/downloads/DailySmall_muxed_using_QT7Pro.mov

So far so good, except for the fact it was done with QT7pro. Can't this process be re-created using a CLI tool ?
Using the ffmpeg command from my first post kills the progresive download.

Thanks for taking the time in helping, I extremely appreciate it.
Agustin.

langman10
18th October 2007, 06:22
SeeMoreDigital -

Quick question...I'm right now trying to use QTPro to mux a mp4 video file I created in x264 and a aac audio file into a .mov file. How did you mux the TheAgustin's sources without re-encoding? Thanks in advance.

Langman10

SeeMoreDigital
18th October 2007, 10:51
SeeMoreDigital -

Quick question...I'm right now trying to use QTPro to mux a mp4 video file I created in x264 and a aac audio file into a .mov file. How did you mux the TheAgustin's sources without re-encoding? Thanks in advance.

Langman10Open the .MP4 file in QuickTime7Pro.

Click on: File -> Save As... And then press the "Save" button

http://i20.tinypic.com/nlop01.png


Things to look out for....

If (for whatever reason) QT7Pro does not like the .MP4 source, the "Estimated file size" will only be a few KB and will not be re-muxed to .MOV

If you want to re-mux AVC in .MP4 files to .MOV, it's vital that .MP4 source has been encoded using the correct (QuickTime profile) settings. Also, I'm yet to find a setting that will allow AVC with 1B-VOP to be re-mux to .MOV. So if you guys find one.... Please let me know.


Cheers

langman10
18th October 2007, 22:36
If (for whatever reason) QT7Pro does not like the .MP4 source, the "Estimated file size" will only be a few KB and will not be re-muxed to .MOV

If you want to re-mux AVC in .MP4 files to .MOV, it's vital that .MP4 source has been encoded using the correct (QuickTime profile) settings. Also, I'm yet to find a setting that will allow AVC with 1B-VOP to be re-mux to .MOV. So if you guys find one.... Please let me know.

Thank you very much for pointing me in the right direction. I thought that was the process, so when I kept trying "Save As.." and was only getting 3KB as my projected size, I figured I was doing something wrong.

Turns out that, as you say, QT7Pro does not like my .MP4 source. I've spent this morning test after test using megui and x.264, muxing with megui or with Yamb, many different profiles, bframes on and off, etc etc.---no luck. I find that "show Properties" in QT7Pro gives screwy results: the video track has a data rate of 0.00 bits/s and the language is 32767. Weird, huh? I've looked at this thread (http://forum.doom9.org/showthread.php?t=102609), although it focuses on making a MP4 file that QT will PLAY. I have that. I need a MP4 file QT will MUX. Any suggestions?

Langman10

langman10
19th October 2007, 02:19
Duh. After the 10th reading of your post, SeeMoreDigital, I made an encode with no B-frames and voila! it worked. I'm looking into how to mux into a MOV and still use b-frames.

Langman10

tateu
19th October 2007, 03:53
Well, it looks like you can access the MovieExport dialog from the Quicktime SDK even with the free version of Quicktime player. This means that someone (I am working on it) can write an app that will allow you to hint an mov file with the free version of Quicktime player.

langman10
19th October 2007, 23:44
SeeMoreDigital...

I think I've just managed to mux a MOV file with x264-encoded H.264/AVC video complete with HighProfile and B-frames using ffmpeg like TheAgustin was above. Is this what you mean by 1B-VOP?

Langman10

tateu
20th October 2007, 04:30
So if anyone wants to try and hint a quicktime movie and they don't have quicktime pro...

http://www.tateu.net/software/dl.php?f=QTHint


-f input movie
-s settings file
-o output movie (if you want to open the movie export dialog box, you should leave this blank.


QTHint.exe -f "X:\path\Movie.mov"

To open the movie Export dialog (this will allow you to choose an output movie file and you can add hints or re-encode the video to a different format). Do not supply an output filename.
To add hints to the movie without re-encoding, choose "Movie to Hinted Movie"
To re-encode the movie, choose "Movie to QuickTime Movie"




QTHint.exe -f "X:\path\Movie.mov" -s "QTHint.rtm" -o "X:\path\Hinted.mov"

To add hints to a movie without opening a dialog box, you need a settings file (-s "QTHint.rtm") and an output movie (-o).
If "QTHint.rtm" does not exist, a hinting dialog box will be opened and then it will be created.

SeeMoreDigital
20th October 2007, 10:18
SeeMoreDigital...

I think I've just managed to mux a MOV file with x264-encoded H.264/AVC video complete with HighProfile and B-frames using ffmpeg like TheAgustin was above. Is this what you mean by 1B-VOP?

Langman10Interesting...

Please upload a short sample and I'll see how well QT7Pro responds to it....


Cheers

langman10
23rd October 2007, 01:45
Here's a clip encoded in x264 to High Profile, Bframes=3, muxed to mp4 in megui (does that use mp4box?), and converted to a quicktime container via ffmpeg cli. (ffmpeg -i muxed.mp4 -vcodec copy -acodec copy -f mov result.mov)

http://www.mytempdir.com/2045687

Some notes: Windows QT 7.1 and below doesn't like the high profile setting. Change to Main and it is happy.

Langman10

merbanan
22nd November 2007, 13:51
The solution to the original problem is to use qt-faststart. It is part of ffmpeg.

SeeMoreDigital
22nd November 2007, 16:56
Here's a clip encoded in x264 to High Profile, Bframes=3, muxed to mp4 in megui (does that use mp4box?), and converted to a quicktime container via ffmpeg cli. (ffmpeg -i muxed.mp4 -vcodec copy -acodec copy -f mov result.mov)

http://www.mytempdir.com/2045687

Some notes: Windows QT 7.1 and below doesn't like the high profile setting. Change to Main and it is happy.

Langman10Hi Langman,

I'm sorry to say I missed your post and as such was unable to download your test sample.

Could you upload it again please?


Cheers

langman10
27th November 2007, 01:53
Hi Langman,

I'm sorry to say I missed your post and as such was unable to download your test sample.

Could you upload it again please?


Cheers

Back from the holiday. Here you go.

http://www.mytempdir.com/2068948

Langman10

TheAgustin
28th November 2007, 03:03
Hey Langman.
In Quicktime 7.0.4 I only get a blank screen, no video :(

SeeMoreDigital
28th November 2007, 09:56
Hey Langman.
In Quicktime 7.0.4 I only get a blank screen, no video :(Works fine with QT 7.3 ;)

langman10
28th November 2007, 21:08
Works fine with QT 7.3 ;)

Yeah, Windows QT 7.1 and below doesn't like the QT's with MPEG-4 video encoded to high profile. Here's almost the identical encode, Bframes=3 and all:

http://www.mytempdir.com/2070155

The only difference is with the above file is that in MeGui I changed from High Profile to Main and the command line changed from

--analyse p8x8,b8x8,i4x4,i8x8 --8x8dct

to

--analyse p8x8,b8x8,i4x4

That makes sense because I've read that QT7 doesn't support 8x8dct macroblocks. But I've also read that QT7 doesn't support more than 1 Bframe and, well, you're looking at files with 3 Bframes. Again, QT7 will play a .MOV with more than 1Bframe, it just won't mux one. To do that I have to go thru MP4Box and ffmpeg's cli.

Langman10

SeeMoreDigital
28th November 2007, 21:22
...But I've also read that QT7 doesn't support more than 1 Bframe and, well, you're looking at files with 3 Bframes. Again, QT7 will play a .MOV with more than 1Bframe, it just won't mux one. To do that I have to go thru MP4Box and ffmpeg's cli.

Langman10Just to let you know...

When I de-muxed and analyzed your previous .h264 stream in DGAVCindex, there appears to be only 1B-VOP after each I-VOP or P-VOP and not 3B-VOP's ;)

langman10
29th November 2007, 01:40
Just to let you know...

When I de-muxed and analyzed your previous .h264 stream in DGAVCindex, there appears to be only 1B-VOP after each I-VOP or P-VOP and not 3B-VOP's ;)

Well that would explain why QT7 is able to play it. Now I'm off to investigate why x264 isn't encoding more than 1-VOP even when the commandline asks for it. I'll first try bars and tone, since perhaps my particular test clip had too much changes from frame to frame to warrant more than one bframe.

Thanks.

Langman10

langman10
29th November 2007, 03:19
Bingo. It turns out that QT7 does choke on MPEG-4 video data with more than one bframe (as advertised.) I made a test file of color bars and tweaked the settings to practically force x264 to use 3 bframes. QT7 chokes on the file, and DGAVCIndex shows 3 bframes (assuming 7 is I, 5 is P and 6 is B). I guess all the files I've been encoding have only "needed" one bframe at most.

I'll make sure to select max bframes as one from here on out for my .MOVs. Thanks for the guidance. Learned alot.

Langman10

SeeMoreDigital
29th November 2007, 17:40
Hi Langman10,

Could you do me a favour please and try re-muxing this sample (http://www.mytempdir.com/2070653) to .MOV using FFmpeg. And up-load the resulting .MOV file.

It was encoded using Sharktooth's "QuickTime" profile....


Many thanks

langman10
30th November 2007, 19:26
I've posted the .MOV here (http://www.mediafire.com/?431xdhwz1wj).

I extracted the h.264 data with MP4Box, muxed that data with some aac audio using MP4Box, then sent that to ffmpeg cli using the "copy" codec.

One note: The resulting file is anamorphic, meaning 720x432. I thought that was strange considering your source is 1024x432. Then I did some tests. Here's the summary...

source on Mac in QT sees as 720x432, plays squeezed.
source on PC in QT sees as 1024x432, plays correct.

muxed .MP4 before ffmpeg on Mac in QT sees as 720x432, plays squeezed.
muxed .MP4 before ffmpeg on PC in QT sees as 1024x432, plays correct.

Wrapped .MOV from ffmpeg on Mac in QT sees as 720x432, plays squeezed.
Wrapped .MOV from ffmpeg on PC in QT sees as 720x432, plays squeezed.

Correct means not squeezed. In VLC on both Mac and PC the video is seen as 720x432 and plays correct (source, muxed .MP4 and wrapped .MOV).

SeeMoreDigital
30th November 2007, 20:37
I've posted the .MOV here (http://www.mediafire.com/?431xdhwz1wj).For some reason I'm unable to download the .MOV file from that particular site :(

langman10
30th November 2007, 21:03
For some reason I'm unable to download the .MOV file from that particular site :(

Funny, I used that site because mytempdir had problems uploading.

I just d/led the above, to check. Any other sharing site suggestions?

SeeMoreDigital
30th November 2007, 21:09
Thinking about it...

You might as well e-mail the file to me at: -

SeeMoreDigital@msn.com

setarip_old
30th November 2007, 21:24
@langman10

Hi!source on Mac in QT sees as 720x432, plays squeezed.
source on PC in QT sees as 1024x432, plays correct.Just to let you know that under QuickTimePro (v.7.2) on my PC, your file is seen as 720x432 and appears "squeezed" (vertically stretched)...

langman10
30th November 2007, 21:35
@langman10

Hi!Just to let you know that under QuickTimePro (v.7.2) on my PC, your file is seen as 720x432 and appears "squeezed" (vertically stretched)...

Are you talking out the QT I posted or the source .MP4 that SeeMoreDigital posted here (http://www.mytempdir.com/2070653)?

My first thought was that ffmpeg "did" something when it wrapped the .MP4 into a .MOV container. But from the tests above I think it rather loses some aspect ratio flag to know that the 720x432 data should be viewed as 1024x432.

setarip_old
30th November 2007, 21:40
The file I downloaded (approx. 10 minutes ago) was from your link in Post#33

http://www.mediafire.com/?431xdhwz1wj

SeeMoreDigital
30th November 2007, 22:19
My first thought was that ffmpeg "did" something when it wrapped the .MP4 into a .MOV container. But from the tests above I think it rather loses some aspect ratio flag to know that the 720x432 data should be viewed as 1024x432.Thankfully it possible to alter the shape of the displayed image using QT7's "Visual Settings" ;)

And sorry Langman10, I should have provided you with a sample complete with audio.


Cheers

setarip_old
1st December 2007, 02:55
@langman10

I don't know if this is pertinent but, the header of your file, starting at hex 04 states the following: "ftypqt qt wide".

I wonder what alternatives to "wide" might be functional - and perhaps resolve (pun intended) the resolution playback difference?

P.S. Neither "full" nor four blanks result in playable files

langman10
3rd December 2007, 20:45
@langman10

I don't know if this is pertinent but, the header of your file, starting at hex 04 states the following: "ftypqt qt [COLOR="DarkRed"]wide".



Unfortunately, that "wide" refers to the data atoms within the quicktime structure and the fact that some atoms will need more space than others. (Didn't Pontiac try to convince us once that wider is better?) Search in the Quicktime File Specs (http://developer.apple.com/documentation/QuickTime/QTFF/qtff.pdf) for "the 'wide' atom" if you ever need to be put to sleep with technical jargon.

On a related note, MultiShow is a pretty handly app for not only seeing inside the guts of a QT movie, but getting little human-friendly explanations for the different data chunks/atoms.

langman10
3rd December 2007, 20:48
Thankfully it possible to alter the shape of the displayed image using QT7's "Visual Settings" ;)

Yeah, but I'm lazy. And the more steps, the more chances for me to forget/screw up.:D

And sorry Langman10, I should have provided you with a sample complete with audio.

No worries, it was a fun mashup.