[MPlayer-users] MPEG-TS + H264 (again)

Colin Rosenthal csr at statsbiblioteket.dk
Mon Nov 16 11:06:12 CET 2009


Reimar Döffinger wrote:
> On Fri, Nov 13, 2009 at 03:46:36PM +0100, Colin Rosenthal wrote:
>   
>> Reimar Döffinger wrote:
>>     
>>> On Fri, Nov 13, 2009 at 03:20:55PM +0100, Colin Rosenthal wrote:
>>>   
>>>       
>>>> Reimar Döffinger wrote:
>>>>     
>>>>         
>>>>> I realized that you unfortunately can't use quite the same code.
>>>>> You could test this:
>>>>> Index: mencoder.c
>>>>> ===================================================================
>>>>> --- mencoder.c  (revision 29907)
>>>>> +++ mencoder.c  (working copy)
>>>>> @@ -552,6 +552,14 @@
>>>>>         mencoder_exit(1,NULL);
>>>>>    }
>>>>>  
>>>>> +  if (ts_prog) {
>>>>> +    demux_program_t prog = { .progid = ts_prog };
>>>>> +    if (demux_control(demuxer, DEMUXER_CTRL_IDENTIFY_PROGRAM, &prog) != DEMUXER_CTRL_NOTIMPL) {
>>>>> +      audio_id = prog.aid; // switching is handled by select_audio below
>>>>> +      video_id = prog.vid;
>>>>> +      demuxer_switch_video(demuxer, video_id);
>>>>> +    }
>>>>> +  }
>>>>>    select_audio(demuxer, audio_id, audio_lang);
>>>>>  
>>>>>    if (dvdsub_id == -1 && dvdsub_lang)
>>>>>       
>>>>>           
>>>> This works great. Unfortunately the resulting file plays weird - 
>>>> jittering and jerking back and forwards.
>>>> Command line was:
>>>> mplayer/mencoder -tsprog 2005 -demuxer lavf -oac pcm -ovc copy -of avi 
>>>> -o out.avi mux2.share.ts
>>>>     
>>>>         
>>> MPlayer will try to correct A-V desync by duplicating or dropping
>>> frames, that obviously is unlikely to work right with compressed data.
>>> You'd have to use -mc 0 -noskip , though that might cause desync.
>>>       
>> The video actually jitters backwards and forwards (played in vlc).
>>     
>
> You could really just try my suggestions (unless you want to learn about
> video coding, then you should say so but this is not the best place for
> it).
> If you drop or duplicate encoded frames that messes up the whole frame
> reordering code, so the frames will be displayed in the wrong order,
> thus it jitters forwards and backwards (in addition to the displayed
> frames usually being corrupted a bit).
>   
I have tried your suggestion and it works fine for me. However it 
doesn't really represent a solution
for all our users, many of whom will not be able to compile unfamiliar 
software or be comfortable with
command-line options. However the important thing, I think, is that the 
mencoder patch works so we
can now concentrate on finding an output format that meets their needs. 
It would be nice if we could
avoid heavy video transcoding and still be able to deliver a format 
playable in, for example, vlc in
Windows. I will do some experimentation and probably come back with some 
more detailed questions
later.


cheers,
Colin


More information about the MPlayer-users mailing list