Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] viewing .m4v files with totem
Date: Wed, 14 Jul 2010 17:31:50
Message-Id: 56F76B6E-128A-411B-BA71-B3AB4C50C336@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] viewing .m4v files with totem by Allan Gottlieb
1 Hi Allan,
2
3 Glad to have been some help. I can't answer any of your other
4 questions, so it might be worth checking out the Totelm mailing list.
5 The mplayer developers have a public ftp upload you can use to send
6 them problematic files, maybe Totem devs have the same?
7
8 Comments continue below...
9
10
11 On 13 Jul 2010, at 21:20, Allan Gottlieb wrote:
12 > ...
13 >> You didn't show us what the output (or verbose output) of your ffmpeg
14 >> command was, so we don't know if the original .m4v had shitty
15 >> quality,
16 >> or if you transcoded it.
17 >
18 > Here it is with verbose output
19 >
20 > ajglap video # ffmpeg -loglevel verbose -i Game_Theory_Lect_20_s.m4v
21 > Game_Theory_Lect_20_s.avi
22 > FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
23 > built on Jun 21 2010 18:01:44 with gcc 4.4.4
24 > configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/
25 > lib64 --mandir=/usr/share/man --enable-static --enable-shared --
26 > cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --
27 > enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-
28 > libxvid --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss
29 > --disable-indev=jack --disable-outdev=oss --enable-x11grab --disable-
30 > vdpau --disable-vdpau --disable-vaapi --disable-altivec --cpu=host --
31 > enable-gpl --enable-version3 --enable-postproc --enable-avfilter --
32 > enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables --
33 > disable-doc
34 > libavutil 50.15. 1 / 50.15. 1
35 > libavcodec 52.72. 2 / 52.72. 2
36 > libavformat 52.64. 2 / 52.64. 2
37 > libavdevice 52. 2. 0 / 52. 2. 0
38 > libavfilter 1.19. 0 / 1.19. 0
39 > libswscale 0.11. 0 / 0.11. 0
40 > libpostproc 51. 2. 0 / 51. 2. 0
41 >
42 > Seems stream 0 codec frame rate differs from container frame rate:
43 > 5994.00 (5994/1) -> 29.97 (2997/100)
44 > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Game_Theory_Lect_20_s.m4v':
45 > Metadata:
46 > major_brand : M4V
47 > minor_version : 1
48 > compatible_brands: M4V M4A mp42isom
49 > Duration: 00:33:14.24, start: 0.000000, bitrate: 636 kb/s
50 > Stream #0.0(eng): Video: h264, yuv420p, 320x240, 513 kb/s, 29.97
51 > fps, 29.97 tbr, 2997 tbn, 5994 tbc
52 > Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 118 kb/s
53 > Output #0, avi, to 'Game_Theory_Lect_20_s.avi':
54 > Metadata:
55 > ISFT : Lavf52.64.2
56 > Stream #0.0(eng): Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/
57 > s, 29.97 tbn, 29.97 tbc
58 > Stream #0.1(eng): Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
59 > Stream mapping:
60 > Stream #0.0 -> #0.0
61 > Stream #0.1 -> #0.1
62 > Press [q] to stop encoding
63 > frame=59767 fps=470 q=3.6 Lsize= 67863kB time=1994.23 bitrate=
64 > 278.8kbits/s
65 > video:48981kB audio:15580kB global headers:0kB muxing overhead
66 > 5.113521%
67 > ajglap video #
68 >
69 > ...
70 > 3. The conversion from .m4v to .avi costs quality.
71 > ffmpeg noted differing frame rates. Is that relevant?
72 > Since the conversion of a 30 minute movie took
73 > only a very few minutes, your estimates above suggest that it was
74 > just remux-ed and not transcoded, at least not using a demanding
75 > codec.
76
77 A remux should never affect quality - you're taking the same video
78 stream and putting it in another container. The video itself is
79 unchanged.
80
81 My time estimates were based my use of older Pentium 4 machines - I
82 can only guess you have a Core 2 Duo or something? Also, I don't know
83 how large this file is? 33 minutes? My "18 - 24 hours" estimate was
84 based on a 2 - 3 hour DVD, but also with 2- or 3-pass encoding (which
85 you're obviously not performing) and high settings generally. A DVD
86 would have higher resolution than your 320x240 clip. Nevertheless, I'm
87 a little surprised at how quick your machine is - all my computers are
88 so old. :(
89
90 The way I read the output above is that ffmpeg determines the input
91 file to be 513 kb/s video, and its defaulting to 200 kb/s output - so
92 that *is* a transcode. mplayer also states the original to be 513 kb/
93 s, I notice. In fact you would be able to determine the bitrate of
94 the .avi file by running the `mplayer -identify` command on it - this
95 should confirm that your .avi file is about 200 kb/s, I imagine. That
96 confirms transcoding - if you're remuxing the video then the bitrate
97 will be lower.
98
99 The bitrate is a measure of how much space is consumed on disk to
100 store one second of video. So, using the same codec and source
101 material, a lower bitrate will tend to be lower quality, as less space
102 is consumed storing the details. I think you will probably find
103 your .avi to be about 30% - 40% the size of your original .m4v - of
104 course it will be lower quality!
105
106 That you have determined the original video to be in h264/AAC is good,
107 I think. You might try downloading a TED talk, as I think they too use
108 these same common codecs. See if Totem plays that.
109 e.g.: http://www.ted.com/talks/download/video/9151/talk/899
110
111 Looking at the wikipedia link I sent you before, I think .m4v is just
112 the same as .mp4. I think that if Totem plays an .mp4 TED Talk but not
113 your file, then there's a problem with the encoding or format with
114 your video.
115
116 You might try remuxing your .m4v into .mkv, but I'm not sure what tool
117 you'd use. I _think_ you can remux into .avi using `mencoder -copy` -
118 I believe an .avi containing h264 and AAC breaks specification, but I
119 think most Linux players will tolerate it happily.
120
121 I can't immediately think of any other comments to make. Hopefully
122 this will give you some more directions to explore.
123
124 HTH,
125
126 Stroller.