[IDEA] iPiMP Spin-off: Simple MP4 Transcoder for MP (1 Viewer)

revs

MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    Home Country
    Wales Wales
    I was looking into creating a simple plugin to transcode my TV recordings into MP4 - I then realized that 99% of the work was already done in iPiMP. A plugin existed, but it seems development has recently ended.

    iPiMP already transcodes to MP4, however it re-sizes to iPhone resolution.

    I have mentioned this to Cheezey, and have decided to create a thread.

    My proposal (as long as cheezey is ok with it), is to modify the Transcoding part of iPiMP into a seperate, simple MP4 trascoder.

    My suggested features:

    1. Simple. Only MP4/h.264. If we start asking for every video format under the sun then things get complicated and buggy!

    2. Option not to re-size the video. i.e. video is simply compressed to h.264/mp4, and nothing else is done (unless de-interlacing is required?)

    3. Bitrate options for video and audio - but have a default to keep things simple for noobs.

    4. Once finished transcoding, delete the original .ts file, and re-point the recording databse so that it points to the MP4 and not the old .ts file

    5 (bonus) - automatically cut-out comskip (edl) files.


    there is already the option to delay the transcoding until a certain time - so thats a given.


    Anything else that people require? (oh and so its clear, cheezey is doing all the work.. i just suggested it)
     

    joystick

    MP Donator
  • Premium Supporter
  • January 26, 2006
    892
    39
    Home Country
    Germany Germany
    If you're talking about making all of this automated.....go go go :)
    also
    5 (bonus) - automatically cut-out comskip (edl) files.
    is a must have....:)

    cheers

    joystick
     

    revs

    MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    Home Country
    Wales Wales
    Automated - yes I assume so. It would use the existing functionality to run at a set time (or straight away). it would transcode and replace the original file, and update the recordings database.

    Oh and if edl files are used - would be nice to delete them afterwards! (I think maybe odd things could happen if they still exist with the new file that has commercials removed?)
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    I was looking into creating a simple plugin to transcode my TV recordings into MP4 - I then realized that 99% of the work was already done in iPiMP. A plugin existed, but it seems development has recently ended.

    iPiMP already transcodes to MP4, however it re-sizes to iPhone resolution.

    I have mentioned this to Cheezey, and have decided to create a thread.

    My proposal (as long as cheezey is ok with it), is to modify the Transcoding part of iPiMP into a seperate, simple MP4 trascoder.

    It is already standalone - you can de-select the iPiMPWeb from the installer if you just want to install the transcode plugin.

    1. Simple. Only MP4/h.264. If we start asking for every video format under the sun then things get complicated and buggy!
    Agreed!

    2. Option not to re-size the video. i.e. video is simply compressed to h.264/mp4, and nothing else is done (unless de-interlacing is required?)
    Maybe present a few options, e.g. 1. native, 2. 50%, 3. iPhone sized

    3. Bitrate options for video and audio - but have a default to keep things simple for noobs.
    Agreed!

    4. Once finished transcoding, delete the original .ts file, and re-point the recording databse so that it points to the MP4 and not the old .ts file
    I think this will work - it will also work if you use MPEG for your recordings. This shouldn't 'break' MP in any way, i.e. any action you can perform on a recording native in MP will still work on the MP4.

    5 (bonus) - automatically cut-out comskip (edl) files.
    Nice! My understanding is that you run comskip which detects the cut points and writes them to a file, that file is then used by another utility to do the actual cutting and there seems to be a few options for that so any feedback on the best approach would be welome.

    Anything else that people require? (oh and so its clear, cheezey is doing all the work.. i just suggested it)
    Happy to help :D
     

    revs

    MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    Home Country
    Wales Wales
    RE Comskip - some encoding programs have a argument you pass which tells them "look for a edl/comskip file, if you find one, use it to remove commercials". so you may only need to add a single argument - depends which encoding tool you use :)

    btw - thanks again!!!! :D
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    4. Once finished transcoding, delete the original .ts file, and re-point the recording databse so that it points to the MP4 and not the old .ts file
    I think this will work - it will also work if you use MPEG for your recordings. This shouldn't 'break' MP in any way, i.e. any action you can perform on a recording native in MP will still work on the MP4.

    :( Jings!! it disnae worrrrrk.

    Just as a test I updated one of my recordings to use the transcoded MP4 and it's not playable through TVE3 recordings.

    tv.log reports
    Code:
    2008-12-02 19:19:01.530696 [16]: RTSP: add stream 3DA5133B file:E:\MP4\QI Children in Need Special - BBC TWO - 2008-11-14.mp4
    2008-12-02 19:19:01.544367 [16]: Controller: streaming url:rtsp://SERVER/3DA5133B file:E:\MP4\QI Children in Need Special - BBC TWO - 2008-11-14.mp4
    2008-12-02 19:19:13.198895 [RTSP Streaming thread]: RTSP: Streamer stopped

    streamingserver.log reports
    Code:
    02-12-2008 19:19:01 Stream server: add mpeg-2 ps stream 3DA5133B filename:E:\MP4\QI Children in Need Special - BBC TWO - 2008-11-14.mp4
    02-12-2008 19:19:01 ServerMediaSession ctor:3DA5133B
    02-12-2008 19:19:01 ServerMediaSubsession:ctor
    02-12-2008 19:19:01 MPEG2TstFileServerMediaSubsession::ctor:741d178
    02-12-2008 19:19:01 Stream server: url for stream is rtsp://192.168.241.2/3DA5133B
    02-12-2008 19:19:01 CMemoryBuffer::ctor
    02-12-2008 19:19:01 MPEG2TstFileServerMediaSubsession:createNewStreamSource:741d178
    02-12-2008 19:19:01 ts:open E:\MP4\QI Children in Need Special - BBC TWO - 2008-11-14.mp4
    02-12-2008 19:19:01 ts:ctor:57bfcc8
    02-12-2008 19:19:01 ts:size 131105964
    02-12-2008 19:19:01 MPEG1or2Demux:ctor:57d0060
    02-12-2008 19:19:01 MPEG1or2DemuxedElementaryStream:ctor:57c0270
    02-12-2008 19:19:01 MPEG2TransportStreamFromPESSource::ctor:735e030
    02-12-2008 19:19:01 MPEG2TransportStreamFramer:ctor:5716f40
    02-12-2008 19:19:02 MPEG2TransportStreamFramer:dtor:5716f40
    02-12-2008 19:19:02 MPEG2TransportStreamFromPESSource::dtor:735e030
    02-12-2008 19:19:02 MPEG1or2DemuxedElementaryStream:dtor:57c0270
    02-12-2008 19:19:02 MPEG1or2Demux:dtor:57d0060
    02-12-2008 19:19:02 ts:dtor:57bfcc8
    02-12-2008 19:19:02 MPEG2TransportStreamFramer:ctor:13a90630
    02-12-2008 19:19:02 MPEG2TstFileServerMediaSubsession:createNewStreamSource:741d178
    02-12-2008 19:19:02 ts:open E:\MP4\QI Children in Need Special - BBC TWO - 2008-11-14.mp4
    02-12-2008 19:19:02 ts:ctor:735f570
    02-12-2008 19:19:02 ts:size 131105964
    02-12-2008 19:19:02 MPEG1or2Demux:ctor:57d0060
    02-12-2008 19:19:02 MPEG1or2DemuxedElementaryStream:ctor:57c0270
    02-12-2008 19:19:02 MPEG2TransportStreamFromPESSource::ctor:735e030
    02-12-2008 19:19:02 MPEG2TransportStreamFramer:ctor:57bfcc8
    02-12-2008 19:19:02 CMemorySink::ctor
    02-12-2008 19:19:02 memorybuffer: Clear() 0
    02-12-2008 19:19:02 memorybuffer: Clear() done
    02-12-2008 19:19:02 memorybuffer: run:1 1
    02-12-2008 19:19:02 memorybuffer: running:1
    02-12-2008 19:19:02 server:Play from 192.168.241.2 (0) (57cb1c8)
    02-12-2008 19:19:02 ts:seek 0
    02-12-2008 19:19:02 CMemorySink:addData

    then loads of
    Code:
    02-12-2008 19:19:06 StreamParser::parsePack() saw strange byte 
    02-12-2008 19:19:06 00000000
    02-12-2008 19:19:06  following pack_start_code
    
    02-12-2008 19:19:06 StreamParser::parseSystemHeader(): saw strange header_length: 
    02-12-2008 19:19:06 0
    02-12-2008 19:19:06  < 6

    and finishes with
    Code:
    02-12-2008 19:19:07 ts:eof reached
    02-12-2008 19:19:12 memorybuffer: run:0 1
    02-12-2008 19:19:12 memorybuffer: Clear() 1
    02-12-2008 19:19:12 memorybuffer: Clear() done
    02-12-2008 19:19:12 memorybuffer: running:0
    02-12-2008 19:19:13 CMemorySink::dtor
    02-12-2008 19:19:13 MPEG2TransportStreamFramer:dtor:13a90630
    02-12-2008 19:19:13 memorybuffer: Clear() 0
    02-12-2008 19:19:13 memorybuffer: Clear() done
    02-12-2008 19:19:15 memorybuffer: Clear() 0
    02-12-2008 19:19:15 memorybuffer: Clear() done
    02-12-2008 19:19:15 memorybuffer: run:1 0
    02-12-2008 19:19:15 memorybuffer: running:1
    02-12-2008 19:19:15 memorybuffer: Clear() 0
    02-12-2008 19:19:15 memorybuffer: Clear() done

    The clue is in line 1 of the streaming server.log, looks like the RTSP streamer is expecting an MPEG2 Program Stream which MP4 isn't.

    So where to next???
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    I think when this has been looked at in the past the transcoded files have been viewed through My Videos (which is still a possibility in this case).

    [20:03] <Cheezey> Hey - anyone about???
    [20:04] <Cheezey> I'm looking for a dev to comment on an idea....
    [20:06] <Cheezey> https://forum.team-mediaportal.com/...pimp-spin-off-simple-mp4-transcoder-mp-49493/
    [20:07] <Cheezey> Basically wanting to know if it's possible for the TVE3 rtsp streamer to stream MP4 rather than MPEG PS or MPEG TS?
    [20:07] <tourette> no
    [20:08] <tourette> as short, but I'll check the thread...
    [20:09] <tourette> ok, long answer:
    [20:09] <tourette> no, as TsReader doesnt support anything else
    [20:10] <tourette> but you can repack the MPEG2 video to MPEG4 and stream it as TS happy
    [20:10] <tourette> TsReader can only handle transport stream
    [20:11] <Cheezey> ok - I'll do some more digging - thanks for the reply
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Ok, i like the idea and use MCEBuddy myself to transcode to h.264.

    A couple of things that may need to be made clear, this is for saving recordings you wish to keep as, either a Movie or as part of a TV-Series you are collecting, the point of putting something back into TVRecordings does not make sense, it would be better if you could select a new name\destination from inside the running plugin, ie Merlin 1x04 The Poisened chalice send to TVShows\Merlin.

    Maybe also have the ability to predefine destinations, ie Movie\TVshows folder and select series from a dropdown list to encode too.

    Just a thought :)
     

    joystick

    MP Donator
  • Premium Supporter
  • January 26, 2006
    892
    39
    Home Country
    Germany Germany
    maybe one more thing:

    you should delete the old (cut) files and also delete the comskip files. AND I think i'd be great if you get a notification/view inside MP that x-Files have been converted/cut and y-files have not been cut due to problems (you'd mabe need a folder for problematic files)

    cheers

    joystick
     

    Users who are viewing this thread

    Top Bottom