Hi everyone. I am trying to send a video file recorded on Android to a media server by using "testMPEG2TransportStreamer.cpp" later to create the TS file by using "testH264VideoToTransportStream.cpp" to an own media server. I copied the video to my PC in order to avoid problems with live555 on Android, step by step :).
I know that "testH264VideoToTransportStream + testMPEG2TransportStreamer " works fine because I downloaded "slamtv60.264" from live555.com and sent out.ts, resulted from "testH264VideoToTransportStream", by "testMPEG2TransportStreamer" to my media server and could play the live stream in VLC (on windows) and Android *without* problems in the same time(as a media server must do). Then, my problem is that I am not able to transform my Android video to an *elementary h264* file. In this moment my code is the next: void createH264ElementaryFile() { // Begin by setting up our usage environment: TaskScheduler* scheduler = BasicTaskScheduler::createNew(); env = BasicUsageEnvironment::createNew(*scheduler); // Open the input file as a 'byte-stream file source': FramedSource* inputSource = ByteStreamFileSource::createNew(*env, inputFileName); if (inputSource == NULL) { *env << "Unable to open file \"" << inputFileName << "\" as a byte-stream file source\n"; exit(1); } // Open the output file as a 'file sink': H264VideoFileSink* outputSink = H264VideoFileSink::createNew(*env, h264FileSink); if (outputSink == NULL) { *env << "Unable to open file \"" << h264FileSink << "\" as a file sink\n"; exit(1); } // Finally, start playing: *env << "Beginning to read...\n"; outputSink->startPlaying(*inputSource, afterPlayingcreateH264ElementaryFile, NULL); env->taskScheduler().doEventLoop(); // does not return } I read that I need to insert before each NAL unit an start code (0x00000001), then I think I need to develop a "H264FramedSource" in order to insert the code, but I am not able to find an example or a tip to implement a solution. Any suggestions? Many thanks!!
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel