-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H264TrackImpl AACTrackImpl create mp4 can not play in VLC #319
Comments
Hmm, not sure what the problem might be here. Would you please verify that
C:\Users\n\Desktop\h264\test\1532667754113 plays in VLC?
C:\Users\n\Desktop\h264\test\1532667754113 should be an Annex B bitstream.
What kind of file is C:\Users\n\Desktop\h264\test\1532667754113?
2018-07-27 8:36 GMT+02:00 shoyu666 <notifications@github.com>:
… use H264TrackImpl and AACTrackImpl create mp4
final 1532667754113A2.mp4 can not play int 'vlc'
but can play in 'windows media player'
//
String fileName = "C:\Users\n\Desktop\h264\test\1532667754113";
Movie v = new Movie();
Track audio = new H264TrackImpl(new FileDataSourceImpl(fileName+".h264"));
v.addTrack(audio);
AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(fileName+".aac"));
v.addTrack(aacTrack);
//
Mp4Builder defaultMp4Builder = new DefaultMp4Builder();
Container c = defaultMp4Builder.build(v);
File out = new File(fileName+"A2.mp4");
c.writeContainer(new FileOutputStream(out).getChannel());
//
Mp4Builder defaultMp4Builder = new DefaultMp4Builder();
Container c = defaultMp4Builder.build(v);
File out = new File(fileName+"A2.mp4");
c.writeContainer(new FileOutputStream(out).getChannel());
//
test.zip <https://github.com/sannies/mp4parser/files/2234731/test.zip>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#319>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKUD1dvc4Tl73WQmH_mzQ4TXdiC3IVPks5uKrTvgaJpZM4Vi_Go>
.
|
@sannies i try create mp4 (1532667754113 .aac+1532667754113 .h264) |
Please make the h264 file available to me. |
dear author |
@sannies write MediaCodec OutputBuffer data; write MediaCodec OutputBuffer data; by the way .h264 can play in vlc |
got it, sorry. didn't see the zip |
@sannies i upload to github |
The H264TrackImpl didn't correctly parse the Sample objects from the file as it didn't set the SampleDescription thus it could set the sample derscription index correctly when writing the MP4. |
dear author
use H264TrackImpl and AACTrackImpl create mp4
final 1532667754113A2.mp4 can not play int 'vlc' why?
but can play in 'windows media player'
`
public class Mux {
public static void main(String[] args) throws IOException, XPathExpressionException, SAXException, ParserConfigurationException, URISyntaxException {
String fileName = "C:\Users\n\Desktop\h264\test\1532667754113";
Movie v = new Movie();
Track audio = new H264TrackImpl(new FileDataSourceImpl(fileName+".h264"));
v.addTrack(audio);
AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(fileName+".aac"));
v.addTrack(aacTrack);
Mp4Builder defaultMp4Builder = new DefaultMp4Builder();
Container c = defaultMp4Builder.build(v);
File out = new File(fileName+"A2.mp4");
c.writeContainer(new FileOutputStream(out).getChannel());
}
}
`
test.zip
The text was updated successfully, but these errors were encountered: