Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d3b8bde2
Commit
d3b8bde2
authored
Oct 04, 2011
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Rudimentary IODs support.
parent
dabba0c6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
17 deletions
+37
-17
movenc.c
libavformat/movenc.c
+28
-11
movenc.h
libavformat/movenc.h
+3
-0
alac
tests/ref/acodec/alac
+2
-2
mpeg4
tests/ref/vsynth1/mpeg4
+2
-2
mpeg4
tests/ref/vsynth2/mpeg4
+2
-2
No files found.
libavformat/movenc.c
View file @
d3b8bde2
...
@@ -46,6 +46,9 @@ static const AVOption options[] = {
...
@@ -46,6 +46,9 @@ static const AVOption options[] = {
{
"movflags"
,
"MOV muxer flags"
,
offsetof
(
MOVMuxContext
,
flags
),
AV_OPT_TYPE_FLAGS
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AV_OPT_FLAG_ENCODING_PARAM
,
"movflags"
},
{
"movflags"
,
"MOV muxer flags"
,
offsetof
(
MOVMuxContext
,
flags
),
AV_OPT_TYPE_FLAGS
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AV_OPT_FLAG_ENCODING_PARAM
,
"movflags"
},
{
"rtphint"
,
"Add RTP hint tracks"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
FF_MOV_FLAG_RTP_HINT
},
INT_MIN
,
INT_MAX
,
AV_OPT_FLAG_ENCODING_PARAM
,
"movflags"
},
{
"rtphint"
,
"Add RTP hint tracks"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
FF_MOV_FLAG_RTP_HINT
},
INT_MIN
,
INT_MAX
,
AV_OPT_FLAG_ENCODING_PARAM
,
"movflags"
},
FF_RTP_FLAG_OPTS
(
MOVMuxContext
,
rtp_flags
),
FF_RTP_FLAG_OPTS
(
MOVMuxContext
,
rtp_flags
),
{
"skip_iods"
,
"Skip writing iods atom."
,
offsetof
(
MOVMuxContext
,
iods_skip
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"iods_audio_profile"
,
"iods audio profile atom."
,
offsetof
(
MOVMuxContext
,
iods_audio_profile
),
AV_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
255
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"iods_video_profile"
,
"iods video profile atom."
,
offsetof
(
MOVMuxContext
,
iods_video_profile
),
AV_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
255
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
NULL
},
{
NULL
},
};
};
...
@@ -1407,21 +1410,34 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
...
@@ -1407,21 +1410,34 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
return
updateSize
(
pb
,
pos
);
return
updateSize
(
pb
,
pos
);
}
}
#if 0
/* TODO: Not sorted out, but not necessary either */
static
int
mov_write_iods_tag
(
AVIOContext
*
pb
,
MOVMuxContext
*
mov
)
static
int
mov_write_iods_tag
(
AVIOContext
*
pb
,
MOVMuxContext
*
mov
)
{
{
avio_wb32(pb, 0x15); /* size */
int
i
,
has_audio
=
0
,
has_video
=
0
;
int64_t
pos
=
avio_tell
(
pb
);
int
audio_profile
=
mov
->
iods_audio_profile
;
int
video_profile
=
mov
->
iods_video_profile
;
for
(
i
=
0
;
i
<
mov
->
nb_streams
;
i
++
)
{
if
(
mov
->
tracks
[
i
].
entry
>
0
)
{
has_audio
|=
mov
->
tracks
[
i
].
enc
->
codec_type
==
AVMEDIA_TYPE_AUDIO
;
has_video
|=
mov
->
tracks
[
i
].
enc
->
codec_type
==
AVMEDIA_TYPE_VIDEO
;
}
}
if
(
audio_profile
<
0
)
audio_profile
=
0xFF
-
has_audio
;
if
(
video_profile
<
0
)
video_profile
=
0xFF
-
has_video
;
avio_wb32
(
pb
,
0x0
);
/* size */
ffio_wfourcc
(
pb
,
"iods"
);
ffio_wfourcc
(
pb
,
"iods"
);
avio_wb32
(
pb
,
0
);
/* version & flags */
avio_wb32
(
pb
,
0
);
/* version & flags */
avio_wb16(pb, 0x1007);
putDescr
(
pb
,
0x10
,
7
);
avio_w8(pb, 0);
avio_wb16
(
pb
,
0x004f
);
avio_wb16(pb, 0x4fff);
avio_w8
(
pb
,
0xff
);
avio_wb16(pb, 0xfffe);
avio_w8
(
pb
,
0xff
);
avio_wb16(pb, 0x01ff);
avio_w8
(
pb
,
audio_profile
);
return 0x15;
avio_w8
(
pb
,
video_profile
);
avio_w8
(
pb
,
0xff
);
return
updateSize
(
pb
,
pos
);
}
}
#endif
static
int
mov_write_mvhd_tag
(
AVIOContext
*
pb
,
MOVMuxContext
*
mov
)
static
int
mov_write_mvhd_tag
(
AVIOContext
*
pb
,
MOVMuxContext
*
mov
)
{
{
...
@@ -1829,7 +1845,8 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
...
@@ -1829,7 +1845,8 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
}
}
mov_write_mvhd_tag
(
pb
,
mov
);
mov_write_mvhd_tag
(
pb
,
mov
);
//mov_write_iods_tag(pb, mov);
if
(
mov
->
mode
!=
MODE_MOV
&&
!
mov
->
iods_skip
)
mov_write_iods_tag
(
pb
,
mov
);
for
(
i
=
0
;
i
<
mov
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
mov
->
nb_streams
;
i
++
)
{
if
(
mov
->
tracks
[
i
].
entry
>
0
)
{
if
(
mov
->
tracks
[
i
].
entry
>
0
)
{
mov_write_trak_tag
(
pb
,
&
(
mov
->
tracks
[
i
]),
i
<
s
->
nb_streams
?
s
->
streams
[
i
]
:
NULL
);
mov_write_trak_tag
(
pb
,
&
(
mov
->
tracks
[
i
]),
i
<
s
->
nb_streams
?
s
->
streams
[
i
]
:
NULL
);
...
...
libavformat/movenc.h
View file @
d3b8bde2
...
@@ -112,6 +112,9 @@ typedef struct MOVMuxContext {
...
@@ -112,6 +112,9 @@ typedef struct MOVMuxContext {
int
flags
;
int
flags
;
int
rtp_flags
;
int
rtp_flags
;
int
iods_skip
;
int
iods_video_profile
;
int
iods_audio_profile
;
}
MOVMuxContext
;
}
MOVMuxContext
;
#define FF_MOV_FLAG_RTP_HINT 1
#define FF_MOV_FLAG_RTP_HINT 1
...
...
tests/ref/acodec/alac
View file @
d3b8bde2
b25bcc7ec3f5c19cdfc01a6bbd32edb8
*./tests/data/acodec/alac.m4a
8d9cb7f65c5b17c74e5f9bdc36f32b7d
*./tests/data/acodec/alac.m4a
389
386
./tests/data/acodec/alac.m4a
389
410
./tests/data/acodec/alac.m4a
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/vsynth1/mpeg4
View file @
d3b8bde2
080e75117f8142001b096cd977ba287
e *./tests/data/vsynth1/odivx.mp4
9251145d12150cb639098016d61fc75
e *./tests/data/vsynth1/odivx.mp4
5401
56
./tests/data/vsynth1/odivx.mp4
5401
80
./tests/data/vsynth1/odivx.mp4
8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
tests/ref/vsynth2/mpeg4
View file @
d3b8bde2
8ffbe8ce43fe126b12cf9621717d641b
*./tests/data/vsynth2/odivx.mp4
c2ca709a0ed64833fd38f703b19e5e85
*./tests/data/vsynth2/odivx.mp4
1198
09
./tests/data/vsynth2/odivx.mp4
1198
33
./tests/data/vsynth2/odivx.mp4
90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment