Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Trimming/Reencoding DTT recordings with FFMPEG?

  • 16-12-2010 8:25pm
    #1
    Registered Users, Registered Users 2 Posts: 176 ✭✭


    Hi,

    I have a mythtv setup and can record DVB-S (freesat) or SaorView (DVB-T)

    I have been using ffmpeg on Ubuntu to trim recordings I want to keep to the correct length, drop out extra audio channels and so on.

    With recordings from DVB-S (SD or HD) this works fine.

    With recordings from SaorView, this does not work. I end up with a file of plausible looking size, but which will not play back in VLC or XBMC. The original recording always plays fine.

    The ffmpeg command I use is generally:

    ffmpeg -i <original recording> -map 0:x -map 0:y -vcodec copy -acodec copy -ss <start> -t <duration> <outputfile>

    I have never seen this fail to produce the correct output when trimming DVB-S SD/HD content.

    I am pretty sure this never works when trimming DVB-T content: not 100% certain of that, since I just have a unified channel list and tend to forget where I recorded things from. But since I have been paying attention I have never got it to trim SaorView recordings.

    I have tried both the ffmpeg and x264 which come with the standard Ubuntu 9.10 install, and throwing those away and building the latest ffmpeg 0.6.1 and x264 from source.

    One of two things happens:
    - ffmpeg churns through the file, and produces a 0KB output file
    or
    - ffmpeg churns through the file, and produces a large file of roughly the correct size, which refuses to play (video) in VLC or XBMC

    This is annoying as I am one of those people who likes the recording of the movie to start with the studio logo and end with the end credits. And not with 10 minutes of commercials before and after ... :-)

    Hints accepted gratefully

    Regards
    Liam
    Tagged:


Comments

  • Closed Accounts Posts: 5,178 ✭✭✭STB


    TS files ?

    run it through tsdoctor first. It will filter out the rubbish. Only takes a minute.


  • Registered Users, Registered Users 2 Posts: 176 ✭✭liamf


    Ah. Good thinking.

    The output from ffmpeg, when fed the DTT recording, is not in mpegts format. For some reason. Although the input is.

    So explicitly adding -f mpegts to the ffmpeg command line fixes it up nicely and the trimmed recording plays correctly.

    Thanks!


  • Registered Users, Registered Users 2 Posts: 32,417 ✭✭✭✭watty


    I haven't used it in years

    http://www.offeryn.de/dv.htm
    PVAStrumento

    It converts Transport Stream files to Program Stream Files. It should work for MPEG4 video too as it doesn't do anything to the actual video & audio data.

    Fixes some kinds of errors and allows splitting/combining/trimming and sync offset change.


  • Registered Users, Registered Users 2 Posts: 176 ✭✭liamf


    Thanks for the tool reference.

    There are so many out there to experiment with ...

    ffmpeg though seems to have sufficient options to keep me occupied experimenting with them for ages.

    Plus I have some professional mux/demux s/w at work if things get more challenging.


  • Closed Accounts Posts: 5,178 ✭✭✭STB


    I am surprised that it works straight off. Most of the MPEG4 TS file is full of PAT info that VLC hates.

    For DVB though Cypheros TSDoctor is fantastic but not free (the trial is). There is nothing that it cant fix very quickly. Especially when you get into MPEG4 H264 HD files.

    I use Avidemux, All to AVi and Xilisoft for my various needs.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 176 ✭✭liamf


    Works fine ... I tested playback with XBMC.

    And recording it in myth doesn't give you the full TS of course: you just get a sort-of stripped down single program TS with a single service in it.

    Anyway, ffmpeg is my friend again now.


Advertisement