fprintf(fp,"sz=`du -cb $dir/bd.m2ts* | tail -1 | sed -e 's/[ ].*//'`\n");
fprintf(fp,"blks=$((sz/2048 + 4096))\n");
fprintf(fp,"rm -f %s\n", udfs);
- fprintf(fp,"if [ -f bd.meta ]; then\n");
- fprintf(fp,"tsmuxer bd.meta $dir/bd.iso \n");
+ fprintf(fp,"if [ -f $dir/bd.meta ]; then\n");
+ fprintf(fp,"sed -i \"s|bd.m2ts|$dir\/bd.m2ts|g\" $dir/bd.meta\n");
+ fprintf(fp,"tsmuxer $dir/bd.meta $dir/bd.iso \n");
fprintf(fp,"mv $dir/bd.iso $dir/bd.udfs\n");
fprintf(fp,"else\n");
fprintf(fp,"mkudffs -b 2048 %s $blks\n", udfs);
main(int ac, char **av)
{
char *path = av[1];
- if( mkbdmv(path) ) return 1;
+
av_log_set_level(AV_LOG_FATAL);
//av_log_set_level(AV_LOG_VERBOSE);
//av_log_set_level(AV_LOG_DEBUG);
int opt = getopt(ac, av, "c:");
if (opt == 'c') {
- chapter_every_n_sec = optarg[0]; start = 3; }
+ chapter_every_n_sec = atoi(optarg); start = 4;
+ path = av[3]; printf("Chapter interval: %i \n", chapter_every_n_sec );}
else
start = 2;
-
+ if( mkbdmv(path) ) return 1;
for( int ii=start; ii<ac; ++ii ) {
char *ap = av[ii];
// any dash seq followed by number sets curr title pgm_pid